# Solve equation for one variable

I have the following two equations,

di - (39.18 (0.07 + 2.61 (de + di)^0.28) +
1891.93 (de - di)^0.218)/(0.0119 + 0.0626 (de + di)^0.28)=0


and

de - (724.85 (0.17 + 2.61 (de - di)^0.28) +
102.26 (de - di)^0.28)/(0.0119 + 0.0626 (de + di)^0.28)=0


I want to solve these equations for de and di, however, solve is taking too much time. Is there any alternative in mathematica.

• FindInstance[{di - (39.18 (0.07 + 2.61 (de + di)^0.28) + 1891.93 (de - di)^0.218)/(0.0119 + 0.0626 (de + di)^0.28) == 0, de - (724.85 (0.17 + 2.61 (de - di)^0.28) + 102.26 (de - di)^0.28)/(0.0119 + 0.0626 (de + di)^0.28) == 0}, {de, di}]
– Moo
Mar 11 at 14:16
• FindRoot[{di - (39.18 (0.07 + 2.61 (de + di)^0.28) + 1891.93 (de - di)^0.218)/(0.0119 + 0.0626 (de + di)^0.28) == 0, de - (724.85 (0.17 + 2.61 (de - di)^0.28) + 102.26 (de - di)^0.28)/(0.0119 + 0.0626 (de + di)^0.28) == 0}, {de, 10000}, {di, 10000}] // Chop
– Moo
Mar 11 at 14:25

\$Version

(* "14.0.0 for Mac OS X ARM (64-bit) (December 13, 2023)" *)

Clear["Global*"]


Rationalize and Simplify the equations

eqns = {di - (39.18  (0.07 + 2.61  (de + di)^0.28) +
1891.93  (de - di)^0.218)/(0.0119 + 0.0626  (de + di)^0.28) == 0,
de - (724.85  (0.17 + 2.61  (de - di)^0.28) +
102.26  (de - di)^0.28)/(0.0119 + 0.0626  (de + di)^0.28) == 0} //
Rationalize // Simplify

(* {di == (2 (13713 + 9459650 (de - di)^(109/500) + 511299 (de + di)^(7/25)))/(
119 + 626 (de + di)^(7/25)),
de == (5 (246449 + 3988237 (de - di)^(7/25)))/(119 + 626 (de + di)^(7/25))} *)

(sol = NSolve[eqns, {de, di}, Reals]) // AbsoluteTiming

(* {19.8772, {{de -> 21177.3, di -> 13061.1}, {de -> 6354.62, di -> 6315.78}}} *)


Check the solutions:

eqns /. sol

(* {{False, False}, {False, False}} *)


There is a precision issue. Use FindRoot to refine the solutions:

sol2 = FindRoot[eqns, {{de, #[[1]]}, {di, #[[2]]}}] & /@ ({de, di} /. sol)

{{de -> 21177.3, di -> 13061.1}, {de -> 6354.62, di -> 6315.78}}


Checking the refined solutions:

eqns /. sol2

(* {{True, True}, {True, True}} *)


The differences are small.

({de, di} /. sol) - ({de, di} /. sol2)

(* {{-1.19799*10^-8, -5.61886*10^-9}, {-2.89638*10^-8, -4.33574*10^-8}} *)
`