Skip to main content
Notice removed Draw attention by Neuneck
Bounty Ended with Michael E2's answer chosen by Neuneck
Notice added Draw attention by Neuneck
Bounty Started worth 100 reputation by Neuneck
added 7 characters in body
Source Link
Neuneck
  • 675
  • 4
  • 17

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]:

I use

NMinimize[f[{a, b, c, d}, 0, 0], {a, b, c, d}]

f[{a,b,c,d}, 0, 0]/.%%[[2]] returns 3.3493*10^-17, while f[P1, 0, 0] returns 0.373542.

What's worse is that f[({a, b, c, d}/.%%%%[[2]]), 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[{a, b, c, d}, x, y] normalizes the coefficient vector btw.

Edit: The function f is called 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]

I use (LK4 is defined below, but its shape should have nothing to do with my problem)

NMinimize[LK4[{a, b, c, d}, I, 0, 0, 0, 0], {a, b, c, d}]

LK4[{a, b, c, d}, I, 0, 0, 0, 0]/.%%[[2]] returns 3.3493*10^-17, while LK4[P1, I, 0, 0, 0, 0] returns 0.373542.

What's worse is that 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. LK4[{a, b, c, d}, tau, xi1, xi2, x, y] normalizes the coefficient vector btw.

Definition of LK4:

added 64 characters in body
Source Link
Neuneck
  • 675
  • 4
  • 17

Edit: The function f is called 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]

Edit: The function f is called LK4 below, I take tau = I, xi1 = xi2 = 0 for now.

Edit: The function f is called 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]

added 1235 characters in body
Source Link
Neuneck
  • 675
  • 4
  • 17

Edit: The function f is called LK4 below, I take tau = I, xi1 = xi2 = 0 for now.

    Phi[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Surd[2 qM Im[tau]/Abs[tau]^2, 4] Exp[
    I 2 Pi (xi1 x + xi2 y)]  Exp[- Pi I Conjugate[tau]/Abs[tau]^2 ( 
       j^2/qM + qM x^2) + 
     2 Pi I j Conjugate[tau]/Abs[tau]^2 (x + tau y)] * 
   N[EllipticTheta[3, 
     Pi Conjugate[tau]/Abs[tau]^2 (qM (x + tau y) - j), 
     Exp[ -Pi I Conjugate[tau]/Abs[tau]^2 qM]], 20];
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Phi[j, qM, x, y, tau, xi1, xi2] /; j == 0;
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Phi[j, qM, x, y, tau, xi1, xi2] /;  
   qM/2 \[Element] Integers && j == qM/2;
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  1/Sqrt[2] (Phi[j, qM, x, y, tau, xi1, xi2] + 
     Phi[qM - j, qM, x, y, tau, xi1, xi2]);
PhiOdd[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  1/Sqrt[2] (Phi[j, qM, x, y, tau, xi1, xi2] - 
      Phi[qM - j, qM, x, y, tau, xi1, xi2]) /; j != 0 && j != qM/2;
LK4[coeff_, tau_, xi1_, xi2_, x_, y_] := 
  Sum[coeff[[a]]/(Sqrt@Total[coeff^2]) PhiEven[a - 1, 6, x, y, tau, 
     xi1, xi2], {a, 1, 4}];

Edit: The function f is called LK4 below, I take tau = I, xi1 = xi2 = 0 for now.

    Phi[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Surd[2 qM Im[tau]/Abs[tau]^2, 4] Exp[
    I 2 Pi (xi1 x + xi2 y)]  Exp[- Pi I Conjugate[tau]/Abs[tau]^2 ( 
       j^2/qM + qM x^2) + 
     2 Pi I j Conjugate[tau]/Abs[tau]^2 (x + tau y)] * 
   N[EllipticTheta[3, 
     Pi Conjugate[tau]/Abs[tau]^2 (qM (x + tau y) - j), 
     Exp[ -Pi I Conjugate[tau]/Abs[tau]^2 qM]], 20];
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Phi[j, qM, x, y, tau, xi1, xi2] /; j == 0;
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  Phi[j, qM, x, y, tau, xi1, xi2] /;  
   qM/2 \[Element] Integers && j == qM/2;
PhiEven[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  1/Sqrt[2] (Phi[j, qM, x, y, tau, xi1, xi2] + 
     Phi[qM - j, qM, x, y, tau, xi1, xi2]);
PhiOdd[j_, qM_, x_, y_, tau_, xi1_, xi2_] := 
  1/Sqrt[2] (Phi[j, qM, x, y, tau, xi1, xi2] - 
      Phi[qM - j, qM, x, y, tau, xi1, xi2]) /; j != 0 && j != qM/2;
LK4[coeff_, tau_, xi1_, xi2_, x_, y_] := 
  Sum[coeff[[a]]/(Sqrt@Total[coeff^2]) PhiEven[a - 1, 6, x, y, tau, 
     xi1, xi2], {a, 1, 4}];
Source Link
Neuneck
  • 675
  • 4
  • 17
Loading