0
$\begingroup$

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?

Thanks in advance!

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

2 Answers 2

1
$\begingroup$

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} *)
$\endgroup$
5
  • $\begingroup$ The fsolve and DirectSearch:-SolveEquations commands of Maple need not "reasonable starting values {{dreal, 5}, {VoBB, 500}, {VoBt, -50}}" . $\endgroup$
    – user64494
    Sep 3, 2018 at 5:13
  • $\begingroup$ 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? $\endgroup$
    – harazogo
    Sep 3, 2018 at 8:06
  • $\begingroup$ 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. $\endgroup$
    – Bob Hanlon
    Sep 3, 2018 at 18:14
  • $\begingroup$ 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. $\endgroup$
    – user64494
    Sep 3, 2018 at 19:59
  • $\begingroup$ @user64494 - I used values close to those that you said Maple provided. $\endgroup$
    – Bob Hanlon
    Sep 3, 2018 at 21:06
0
$\begingroup$
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.

$\endgroup$
6
  • $\begingroup$ Maple answers $ \{ VoBB = 655.935722286923, VoBt = -30.9357222869234, dreal = 2.68631106848311 \}.$ $\endgroup$
    – user64494
    Sep 2, 2018 at 18:00
  • $\begingroup$ 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? $\endgroup$
    – Bill
    Sep 2, 2018 at 18:30
  • $\begingroup$ Maple performs the only real solution $\{VoBB = 655.935722286924, VoBt = -30.9357222869235, dreal = 2.68631106848311\}$ by two independent ways. $\endgroup$
    – user64494
    Sep 2, 2018 at 19:56
  • $\begingroup$ Putting WorkingPrecision->12 in your NMinimize command, I obtain " NMinimize::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations". $\endgroup$
    – user64494
    Sep 2, 2018 at 20:20
  • $\begingroup$ @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. $\endgroup$
    – harazogo
    Sep 3, 2018 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.