# Solving coupled transcendental equations with Nsolve

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?

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 '14 at 4:24
You can exclude the term l==j in the product with Product[..., {l, Complement[Range[nbosons], {j}]}]. – b.gatessucks Jan 23 '14 at 10:40
You can use additional conditions as NSolve[Join[BAE[c, L], {Total[k]==0}], ...]. – b.gatessucks Jan 23 '14 at 10:41