# Two non-linear simultaneous equations

what is wrong with this? It runs forever and never displays anything on the screen.

NSolve[{E^-k == (Cg + m)/(Cs - (Cs/q) + ((E^(\[Theta]q\[Alpha]E^(-k))
-1)/(q\[Theta]E^(-k) \[Tau] (E^(\[Theta]q\[Alpha]E^(-k)) + \
\[Tau] - 1)))) \[Tau] + (\[Alpha]/\[Tau]) + m,
(E^(\[Theta]q\[Alpha]E^-k) - 1)/(\[Tau] +
E^(\[Theta]q\[Alpha]E^(-k)) -1) == \[Theta]E^(-k) \[Tau] (Cs + (q\[Beta]/(1
-E^(-k) \[Tau])^2)) /. {q -> 0.5, \[Alpha] -> 4, Cg -> 5,
m -> 5, Cs -> 7, \[Beta] -> 0.5, \[Theta] -> 0.3}}, {\[Tau], k}, Reals]


• You see the brackets are red? THat means they are mis-matched. Please place the code in executable format (not an image) so that we can run it and see. Feb 11, 2018 at 18:31
• NSolve[{E^-k == (Cg + m)/(Cs - (Cs/ q) + ((E^([Theta]q[Alpha]E^(-k)) - 1)/(q[Theta]E^(-k) [Tau] (E^([Theta]q[Alpha]E^(-k)) + \ [Tau] - 1)))) [Tau] + ([Alpha]/[Tau]) + m, (E^([Theta]q[Alpha]E^-k) - 1)/([Tau] + E^([Theta]q[Alpha]E^(-k)) - 1) == [Theta]E^(-k) [Tau] (Cs + (q[Beta]/(1 - E^(-k) [Tau])^2)) /. {q -> 0.5, [Alpha] -> 4, Cg -> 5, m -> 5, Cs -> 7, [Beta] -> 0.5, [Theta] -> 0.3}}, {[Tau], k}, Reals] Feb 11, 2018 at 18:53
• Please, do not post images of your code. Instead, read how to type a post in mathematica.stackexchange.com in helpful way to others can reproduce and assist you. Feb 11, 2018 at 18:54
• user55225 -- it is not possible to copy/paste the code you have posted in the comment. Repost by editing your original. Check to make sure that the code you enter actually can be run (even if it does not do what you want it to). Otherwise people cannot help you. Feb 11, 2018 at 19:29
• I posted my code Feb 11, 2018 at 19:56

FindRoot[{
E^-k == (Cg+m)/(Cs-Cs/q+(E^(θ*q*α*E^-k)-1)/(q*θ*E^-k*τ*(E^(θ*q*α*E^-k)+τ-1)))*τ+α/τ+m,
(E^(θ*q*α*E^-k)-1)/(τ+E^(θ*q*α*E^-k)-1) == θ*E^-k*τ*(Cs+q*β/(1-E^-k*τ)^2)} /.
{q->1/2, α->4, Cg->5, m->5, Cs->7, β->1/2, θ->3/10}, {{τ, 1}, {k, 1}},
WorkingPrecision -> 16]


immediately returns

{τ->4.045735266605817, k->37.94584124554267}


but if you increase that working precision you get different values for k from 19 out to 106 and beyond so there may be multiple solutions for this.

If for each of your equations you Plot the left hand side-right hand side with that value of τ substituted in and for values of k ranging from 1 to 106 then you can see the somewhat inconvenient behaviour of your two equations.

• Thank you so much for your help..But do we need to mention working precision always? Feb 11, 2018 at 21:24
• Also, It is still taking a lot of time to run the code.I still could see only "running" status Feb 11, 2018 at 21:33
• I am using 11.2 version and I just copy pasted the code pasted by you. Feb 11, 2018 at 21:38
• Thank you very much. I appreciate your help. Feb 11, 2018 at 22:01