# Help to solve four Simultaneous Equations with 4 unknowns

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

• Does NonlinearModelFit give acceptable results? Nov 26 '19 at 22:35
• Looks like you need to use FindRoot here. Nov 26 '19 at 23:17

Clear["Global*"]

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


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}]]


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}]


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}]


{}`