# Recursion depth and solving equations using Solve

I am trying to solve an equation:

  Solve[{q == ((1 - 0.2)*669000000 + 200000000*a + 350000000*e + 50000 - 133800000)/((a^0.25) (e^(1/3))*(0.03766^0.25)),
e == (((1 - 0.550510257)^0.6)*(q^2.4)*(1.2^2.4)*(0.550510257^1.8)*(0.03766^0.45))/((108^0.6)*(350000000^1.8)*(200000000^0.6)),
a == (81*((1 -  0.550510257)^1.6)*(q^2.4)*(1.2^2.4)*(0.03766^0.2))/((108^1.6)*(350000000^9.8)*(200000000^1.6)*(0.03766^4))}, {q, e, a}]


And I get an error

recursion depth of 1024 exceeded during evaluation of ((4.0145*10^8+200000000 a+350000000 e)/(a^0.25 e^(1/3)))^2.4

4.0145*10^8 + 200000000 a + Hold[((4.0145*10^8 + 200000000 a + 350000000 e)/(a^0.25 e^(1/3)))^2.4]

Any suggestions ?

Mathematica is a very useful tool, especially Solve, but it cannot make "miracles", it just follows rules. So in your case you'd need to help Solve a bit, in order to process it.

Lets try to simplify the problem: Let's use Simplify to make the problem more readable:

Simplify[{q == ((1 - 0.2)*669000000 + 200000000*a + 350000000*e + 50000 - 133800000)/((a^0.25) (e^(1/3))*(0.03766^0.25)),
e == (((1 - 0.550510257)^0.6)*(q^2.4)*(1.2^2.4)*(0.550510257^1.8)*(0.03766^0.45))/((108^0.6)*(350000000^1.8)*(200000000^0.6)),
a == (81*((1 -  0.550510257)^1.6)*(q^2.4)*(1.2^2.4)*(0.03766^0.2))/((108^1.6)*(350000000^9.8)*(200000000^1.6)*(0.03766^4))}]


and we get

q == ((9.113*10^8 + 4.54004*10^8 a + 7.94507*10^8 e)/(a^0.25 e^(1/3)))
e == 1.96877*10^-23 q^2.4
a == 4.87005*10^-94 q^2.4


Looking at your problem, a and e are not really independent, so we could just put them into a common equation:

e = 1.96877*10^-23 q^2.4
a = 4.87005*10^-94 q^2.4
q == ((9.113*10^8 + 4.54004*10^8 a + 7.94507*10^8 e)/(a^0.25 e^(1/3)))

q == (1.78957*10^31 (4.0145*10^8 + 6.89071*10^-15 q^2.4))/(q^2.4)^0.583333


You see, Mathematica has problems merging the two powers of the last part. I'm not completely sute why. Mathematica has often different rules when you enter floating point vs. integers or fractions. But that doesn't help here either. However, when we manually simplify it we get

q == (1.78957*10^31 (4.0145*10^8 + 6.89071*10^-15 q^2.4))/(q^1.4)


which we can finally solve for q. I get:

{{q -> 7.9171*10^8 - 2.9547*10^9 I}, {q -> 7.9171*10^8 + 2.9547*10^9 I}}


So I'm not sure, why Mathematica has problems on this particular case, especially on the simplification of the double power. But at least we can bring it to a point where it works.