# Solve a set of equations

I am not an expert in Mathematica and I am trying to solve simultaneously the following equations.

VoBB = (625 dreal)/(11 (1 - dreal)) - 25/28 (1.008 + 0.075 (784/(625 (1 - dreal)^2) + (15625 dreal^2)/13068) + 0.013 (1 - dreal) (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33) (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) + 0.0333333 dreal (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) + (31 (625/11 + VoBB))/40000 + (43 (56/(25 (1 - dreal)) + (125 dreal)/33) (625/11 + VoBB))/80000 + (27 (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) (625/11 + VoBB))/40000 + 8.31434 dreal^0.692 (1.24608 dreal +
0.00578199 (1 - dreal) VoBB^1.33));

VoBt = 625/(11 (1 - dreal)) - 25/28 (1.008 + 0.075 (784/(625 (1 - dreal)^2) + (15625 dreal^2)/13068) + 0.013 (1 - dreal) (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33) (-((125 dreal)/33) +  1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) + 0.0333333 dreal (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33) (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) + 8.31434 dreal^0.692 (1.24608 dreal + 0.00578199 (1 - dreal) (625/11 - VoBt)^1.33) + (31 VoBt)/40000 + (43 (56/(25 (1 - dreal)) + (125 dreal)/33) VoBt)/80000 + (27 (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) VoBt)/40000);

625 = VoBB + VoBt;


where dreal,VoBB and VoBt are the variables. Since they are not polynomials, Solve and NSolve don't work. I tried also FindRoot and Reduce, but I didn't get any results.

Could anyone suggest me a method how to solve the problem?

• Step 1) use == instead of =. Commented Sep 2, 2018 at 17:31
• yes I have done this, only here I put =, but while trying to solve the problem I put == of course Commented Sep 2, 2018 at 17:32
• Do any of these variables have any restrictions on the range of allowed values e.g. are any known to be positive? Commented Sep 2, 2018 at 19:41
• yes, thank you for noticing. They are all positve and specifically: 0<dreal<0.99, 0<VoBB<625, 0<VoBt<625 Commented Sep 3, 2018 at 6:06

FindRoot needs higher precision and reasonable starting values.

eq1 = VoBB == (625 dreal)/(11 (1 - dreal)) -
25/28 (1.008 +
0.075 (784/(625 (1 - dreal)^2) + (15625 dreal^2)/13068) +
0.013 (1 -
dreal) (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) +
0.0333333 dreal (1/
4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33))^2) + (31 (625/11 + VoBB))/
40000 + (43 (56/(25 (1 - dreal)) + (125 dreal)/33) (625/11 +
VoBB))/
80000 + (27 (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) (625/11 +
VoBB))/40000 +
8.31434 dreal^0.692 (1.24608 dreal +
0.00578199 (1 - dreal) VoBB^1.33)) //
Rationalize[#, 0] & // Simplify;

eq2 = VoBt ==
625/(11 (1 - dreal)) -
25/28 (1.008 +
0.075 (784/(625 (1 - dreal)^2) + (15625 dreal^2)/13068) +
0.013 (1 -
dreal) (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) +
0.0333333 dreal (1/
4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) +
8.31434 dreal^0.692 (1.24608 dreal +
0.00578199 (1 - dreal) (625/11 - VoBt)^1.33) + (31 VoBt)/
40000 + (43 (56/(25 (1 - dreal)) + (125 dreal)/33) VoBt)/
80000 + (27 (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) VoBt)/
40000) // Rationalize[#, 0] & // Simplify;

sol = FindRoot[{eq1, eq2,
625 == VoBB + VoBt}, {{dreal, 5}, {VoBB, 500}, {VoBt, -50}},
WorkingPrecision -> 20]

(* {dreal -> 2.6863110684610678957, VoBB -> 655.93572228732459724,
VoBt -> -30.935722287324597235} *)

{eq1, eq2, 625 == VoBB + VoBt} /. sol

(* {True, True, True} *)

• The fsolve and DirectSearch:-SolveEquations commands of Maple need not "reasonable starting values {{dreal, 5}, {VoBB, 500}, {VoBt, -50}}" . Commented Sep 3, 2018 at 5:13
• It is sometimes difficult to know the starting values. Could you tell me how can I add constraints 0<dreal<0.99, 0<VoBB<625, 0<VoBt<625? Commented Sep 3, 2018 at 8:06
• Constraints (e.g., inequalities) can be used in NSolve; however, if the constraints don't include a solution you will get { } for a result. FindRoot[lhs == rhs, {x, Subscript[x, start], Subscript[x, min], Subscript[x, max]}] searches for a solution, stopping the search if x ever gets outside the range Subscript[x, min] to Subscript[x, max]. Starting values can sometimes be determined by plotting or an understanding of the problem. Your constraints do not appear consistent with these equations. Commented Sep 3, 2018 at 18:14
• You wrote "Starting values can sometimes be determined by plotting or an understanding of the problem ". Can you kindly demonstrate how {{dreal, 5}, {VoBB, 500}, {VoBt, -50}} were found by you? TIA. Commented Sep 3, 2018 at 19:59
• @user64494 - I used values close to those that you said Maple provided. Commented Sep 3, 2018 at 21:06
VoBB == (625 dreal)/(11 (1 - dreal)) - 25/28 (1.008 +
0.075 (784/(625 (1 - dreal)^2) + (15625 dreal^2)/13068) +
0.013 (1 - dreal) (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) +
0.0333333 dreal (1/4 (56/(25 (1 - dreal)) + (125 dreal)/33)^2 +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33) (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) + (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) + (31 (625/11 + VoBB))/
40000 + (43 (56/(25 (1 - dreal)) + (125 dreal)/33) (625/11 + VoBB))/
80000 + (27 (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) +
(125 dreal)/33)) (625/11 + VoBB))/40000 + 8.31434 dreal^0.692*
(1.24608 dreal + 0.00578199 (1 - dreal) VoBB^1.33));

VoBt == 625/(11 (1 - dreal)) - 25/28 (1.008 + 0.075 (784/(625 (1 -
dreal)^2) + (15625 dreal^2)/13068) + 0.013 (1 - dreal) (1/4 (56/(25 (1 -
dreal)) + (125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33) (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/
33)) + (-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) +
(125 dreal)/33))^2) + 0.0333333 dreal (1/4 (56/(25 (1 - dreal)) +
(125 dreal)/33)^2 + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)*
(-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) +
(-((125 dreal)/33) + 1/2 (56/(25 (1 - dreal)) + (125 dreal)/33))^2) +
8.31434 dreal^0.692 (1.24608 dreal + 0.00578199 (1 - dreal) (625/11 -
VoBt)^1.33) + (31 VoBt)/40000 + (43 (56/(25 (1 - dreal)) +
(125 dreal)/33) VoBt)/80000 + (27 (-((125 dreal)/33) +
1/2 (56/(25 (1 - dreal)) + (125 dreal)/33)) VoBt)/40000);

sol = NMinimize[Norm[625 - (VoBB + VoBt)], {VoBB, VoBt, dreal}]


which instantly returns {1.55979*10^-6, {VoBB->274.375, VoBt->350.625, dreal->-433.183}}

and

VoBB + VoBt /. sol[[2]]


instantly returns 625.

• Maple answers $\{ VoBB = 655.935722286923, VoBt = -30.9357222869234, dreal = 2.68631106848311 \}.$ Commented Sep 2, 2018 at 18:00
• MMA NMinimize[Norm[VoBB - expr1] + Norm[VoBt - expr2] + Norm[625 - (VoBB + VoBt)], {VoBB, VoBt, dreal}] returns VoBB -> 346.456, VoBt -> 278.537, dreal -> 0.87113 With that many denominators and rational powers I expect there is a forest of solutions. Can anyone enumerate all the solutions?
– Bill
Commented Sep 2, 2018 at 18:30
• Maple performs the only real solution $\{VoBB = 655.935722286924, VoBt = -30.9357222869235, dreal = 2.68631106848311\}$ by two independent ways. Commented Sep 2, 2018 at 19:56
• Putting WorkingPrecision->12 in your NMinimize command, I obtain " NMinimize::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations". Commented Sep 2, 2018 at 20:20
• @Bill thank you very much, your solution seems to help. Specifically, I added some constraints: NMinimize[{Norm[VoBB - expr1] + Norm[VoBt - expr2] + Norm[625 - (VoBB + VoBt)], 0 < dreal < 0.99, 0 < VoBB < 625, 0 < VoBt < 625}, {VoBB, VoBt, dreal}] and it gives me the results: {30.5878, {VoBB -> 288.167, VoBt -> 334.416, dreal -> 0.849056}} which seem somewhat correct, although VoBt+VoBB=625 is False. Could you explain how did you choose NMinimize and Norm? I read the definitions, but I cannot understand the use here, because I don't want to find any minimum. Commented Sep 3, 2018 at 7:57