I have solved a system of non-linear equations with findRoot. I tried to avoid inexact coefficients and also assign a high working precision. This is my snippet:

rho0=1.0; rho1=1.0;rho2=10^(-5);rhoint=10^(0);lambdaD=210;
sol=FindRoot[frprecise,{{x,9/100},{y,8/10}},AccuracyGoal->20, PrecisionGoal->20,WorkingPrecision->48, MaxIterations->200000];
tab60 = Table[sol[[i]] // N[#, 60] &, {i, Length[sol]}]
Table[fr[[i, 1]] /. tab60, {i, Length[fr]}]

However, when I get the residue from the replacement of solutions in the non-linear equations, one of the residues is just zero. I want to know the exact residue. This 0 in the output is misleading. Can any body hint me on this?


  • $\begingroup$ You do use inexact numbers when you set rho0=1.0; rho1=1.0;. Better use rho0 = 1; rho1 = 1; instead. Then you may also use FindRoot[fr,[...]] instead of FindRoot[frprecise,[...]]. $\endgroup$ – Henrik Schumacher Mar 30 at 20:17
  • 5
    $\begingroup$ Your system of equations can be solved by Solve as well. If you use exact input (e.g., use rho0 = 1; rho1 = 1 as recommended by @Henrik), then you will get an exact answer that you can numericize to any desired precision. $\endgroup$ – Carl Woll Mar 30 at 20:32
  • $\begingroup$ Thanks Henrik. That was a good hint. Mistakenly, I was still using inexact coefficients. $\endgroup$ – bobi Mar 30 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.