# Solving system of 5 equations with 5 unknowns.

I am new user of Mathematica, admire the software, but encounter the error while trying to solve large systems of equations. For example

A1 = (a/1417 + b*1417 + c)*Exp[d/(e - 190)] == 15.838
B1 = (a/2046 + b*2046 + c)*Exp[d/(e - 190)] == 10.876
C1 = (a/4035.1 + b*4035.1 + c)*Exp[d/(e - 190)] == 6.1272
D1 = (a/6032.4 + b*6032.4 + c)*Exp[d/(e - 190)] == 4.9133
E1 = (a/8043.2 + b*8043.2 + c)*Exp[d/(e - 190)] == 3.9884
FindRoot[{A1, B1, C1, D1, E1}, {{a, 41}, {b, 1}, {c, 23}, {d, 324}, {e, 11}}]


Every time it gives this error:

FindRoot::jsing: Encountered a singular Jacobian at the point {a,b,c,d,e} = {41.,1.,23.,324.,11.}. Try perturbing the initial point(s).

My guessed values are close to the solution, which I got from matlab. Can anyone help me with this issue?

• since the quantity Exp[d/(e - 190)] is the same in every equation you effectively have only 4 unknowns. – george2079 Feb 8 '18 at 19:58

A naive approach, solving the equations one by one:

A1 = (a/1417 + b*1417 + c)*Exp[d/(e - 190)] - 15.838
B1 = (a/2046 + b*2046 + c)*Exp[d/(e - 190)] - 10.876
C1 = (a/4035.1 + b*4035.1 + c)*Exp[d/(e - 190)] - 6.1272
D1 = (a/6032.4 + b*6032.4 + c)*Exp[d/(e - 190)] - 4.9133
E1 = (a/8043.2 + b*8043.2 + c)*Exp[d/(e - 190)] - 3.9884

a = a /. First@Solve[A1 == 0, a]
b = b /. First@Solve[B1 == 0, b]
c = c /. First@Solve[C1 == 0, c]
Simplify[D1]
(* 0.375437 *)


So there is no chance that D1 == 0: your system has no solutions.

By the way, the guessed values are not "close to the solution", e.g. A1 /. {a -> 41, b -> 1, c -> 23, d -> 324, e -> 11} returns 219.

Edit As per your comment, if you want to minimize the sum of the squares, then do:

 NMinimize[A1^2 + B1^2 + C1^2 + D1^2 + E1^2, {a, b, c, d, e}]
{0.12353, {a -> 22002.5, b -> 0.000180488, c -> -0.0569829,
d -> -4.81166, e -> -11766.7}}


That confirms that there is no root (the cost function would have been 0) but gives you the values that make the equation the "least wrong" (in a certain meaning).

• Do you mean no solutions at all? I meant to enter these ones as guessed values: FindRoot[{A1, B1, C1, D1, E1}, {{a, 20617}, {b, 0}, {c, 0}, {d, -26}, {e, 11}}] – vladib Feb 8 '18 at 20:35
• @vladib Yes, not solutions at all (except maybe if 0.3757437=0 :)). Your values do not yield zero in {A1, B1, C1, D1, E1} /. {a -> 20617, b -> 0, c -> 0, d -> -26, e -> 11}. Maybe you want to weaken your problem and look for a mimimum instead of a root? – anderstood Feb 8 '18 at 20:39
• thanks a lot man, i'll adjust it. – vladib Feb 8 '18 at 20:44