Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm trying to solve a system of coupled nonlinear equations using NSolve:

nbosons = 2;

x = Table[Symbol["x" <> ToString[i]], {i, 1, nbosons}];
k = Table[Symbol["k" <> ToString[i]], {i, 1, nbosons}];

u[j_] := Part[k, j];

BAE[c_, L_] := 
  Table[Exp[I u[j] L] + 
     Product[(u[j] - u[l] + I c)/(u[j] - u[l] - I c), {l, nbosons}, 
      Assumptions -> l != j] == 0, {j, 1, nbosons}];

BAEroots[c_, L_] := NSolve[BAE[c, L], {k1, k2}, Complexes]

But something goes wrong:

In[71]:= BAEroots[1, 1]

During evaluation of In[71]:= NSolve::nsmet: This system cannot be solved with the methods available to NSolve. >>

Out[71]= NSolve[{E^(I k1) - (I + k1 - k2)/(-I + k1 - k2) == 0, 
  E^(I k2) - (I - k1 + k2)/(-I - k1 + k2) == 0}, {k1, k2}, Complexes]

In general, I know that the values โ€‹โ€‹of k's are such that

i) -2 Pi/L < Re[k] < 2 Pi/L and -2 Abs[c] < Im[k] < 2 Abs[c]

ii) k1 + ... + knbosons = 0

how could I use this extra information in Nsolve?

Thanks in advance!

share|improve this question
1  
Assumptions is not doing what you think it's doing. You should replace it with Boole[l != j]. That is, Product[Boole[l != j] (u[j] - u[l] + I c)/(u[j] - u[l] - I c), {l, nbosons}] == 0 –  RunnyKine Jan 23 at 4:24
    
You can exclude the term l==j in the product with Product[..., {l, Complement[Range[nbosons], {j}]}]. –  b.gatessucks Jan 23 at 10:40
    
You can use additional conditions as NSolve[Join[BAE[c, L], {Total[k]==0}], ...]. –  b.gatessucks Jan 23 at 10:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.