0
$\begingroup$

I want to solve these simultaneous equations to get the values of a, b, c, and d.

y == a x (x + 1) Exp[b (1 - x/85)^(1/2)] + c x^2 + d x

for x and y values x={16,18,20,22}, and y={337,377,416,454}

I used the following command

Solve[{337 == 256 c + 16 d + 272 a E^(Sqrt[69/85] b), 
  377 == 324 c + 18 d + 342 a E^(Sqrt[67/85] b), 
  416 == 400  c + 20 d + 420 a E^(Sqrt[13/17] b), 
  454 == 484 c + 22 d + 506 a E^(3 Sqrt[7/85] b)}, {a, b, c, d}]

But didn't get the desirable solving

$\endgroup$
2
  • $\begingroup$ Does NonlinearModelFit give acceptable results? $\endgroup$
    – LouisB
    Nov 26 '19 at 22:35
  • $\begingroup$ Looks like you need to use FindRoot here. $\endgroup$ Nov 26 '19 at 23:17
2
$\begingroup$
Clear["Global`*"]

eqns = Thread[
   y == a x (x + 1) Exp[b (1 - x/85)^(1/2)] + c x^2 + 
      d x /.
    {x -> {16, 18, 20, 22}, y -> {337, 377, 416, 454}}];

The exact solutions include Root objects

sol = Solve[eqns, {a, b, c, d}, Reals] // Simplify

enter image description here

The approximate numeric solutions are

soln = sol // N

(* {{a -> 9.74433*10^-6, b -> 10.5665, c -> -0.0281118, 
  d -> 19.2541}, {a -> -5.95966*10^-18, b -> 39.3615, c -> -0.101709, 
  d -> 22.9454}} *)

Verifying the solutions

eqns /. sol // FullSimplify

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

eqns /. soln

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

Plot[Evaluate[
  a x (x + 1) Exp[b (1 - x/85)^(1/2)] + c x^2 + d x /.
   soln], {x, 
  15, 25},
 PlotStyle -> {Automatic, Dashed},
 PlotRange -> {300, 500},
 AxesLabel -> {x, y},
 Epilog -> {Red, AbsolutePointSize[4],
   Point[Transpose[
     {{16, 18, 20, 22}, {337, 377, 416, 454}}]]},
 PlotLegends -> Placed[Automatic, {0.7, 0.3}]]

enter image description here

$\endgroup$
0
$\begingroup$

Maybe I'm wrong, but it seems there is no solutions to this system. One can see the system is linear in {a, c, d}, so it is convenient to eliminate them:

beq = Eliminate[{337 == 256 c + 16 d + 272 a E^(Sqrt[69/85] b), 
   377 == 324 c + 18 d + 342 a E^(Sqrt[67/85] b), 
   416 == 400 c + 20 d + 420 a E^(Sqrt[13/17] b), 
   454 == 484 c + 22 d + 506 a E^(3 Sqrt[7/85] b)}, {a, c, d}]

And we get single equation on b:

253 E^(3 Sqrt[7/85] b) + 513 E^(Sqrt[67/85] b) - 136 E^(Sqrt[69/85] b) == 630 E^(Sqrt[13/17] b)

Solve, NSolve and friends can not find solution, so we can investigate this with plotting:

Plot[Evaluate[Subtract @@ beq], {b, -1, 1}]

enter image description here

I tried more wide intervals for b, but the only solution is b = 0. But substitution this in original system gives no solution:

Solve[{337 == 256 c + 16 d + 272 a E^(Sqrt[69/85] b), 
   377 == 324 c + 18 d + 342 a E^(Sqrt[67/85] b), 
   416 == 400 c + 20 d + 420 a E^(Sqrt[13/17] b), 
   454 == 484 c + 22 d + 506 a E^(3 Sqrt[7/85] b)} /. b -> 0, {a, c, d}]

{}

$\endgroup$

Your Answer

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

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