I use (LK4 is defined below, but its shape should have nothing to do with my problem)
NMinimize[f[NMinimize[LK4[{a, b, c, d}, I, 0, 0, 0, 0], {a, b, c, d}]
f[LK4[{a, b, c, d}, I, 0, 0, 0, 0]/.%%[[2]]
returns 3.3493*10^-17
, while f[P1LK4[P1, I, 0, 0, 0, 0]
returns 0.373542
.
What's worse is that f[LK4[({a, b, c, d}/.%%%%[[2]]), 0, 0, 0, 0]
also returns the inaccurate result 0.373542
.
What I wanted to do is find a linear combination that minimizes at the first spot, then define a coefficient vector from that and minimize at the second spot with the constraint that the coefficient vector has to be orthogonal to the first. f[LK4[{a, b, c, d}, tau, xi1, xi2, x, y]
normalizes the coefficient vector btw.
Edit:
The function f
is calledDefinition of LK4 below, I take tau = I
, xi1 = xi2 = 0
for now, i.e. f[{a, b, c, d}, x, y] = LK4[{a, b, c, d}, I, 0, 0, x, y]
: