# Why does this expression take a long time to evaluate?

I was just wondering whether there's an easy to see reason for this expression to take a very long time to evaluate:

Solve[((z - 2)^(14/5) + (z + 3)^(7/10))/(z - 1)^(7/2) == c*x, z]


Actually Mathematica didn't spit out a solution for about twenty minutes now, but interestingly it won't say it's unsolvable, or anything. Naively I would think Mathematica recognizes unsolvable problems, or problems that would take an irreasonable time to solve and at least warn the user. But apparently not.

### Update

Finally the kernel shut down due to insufficient memory.

So what's up with this?

• Mathematica recognizes unsolvable problems (although that may also take time; also I think detecting all unsolvable problems is not possible in principle), but how is Mathematica supposed to know what you consider an unreasonable time? I might be interested enough in a solution that I'm willing to wait a week to get it. Note that you can tell Mathematica to stop after a certain time using TimeConstrained. – celtschk Mar 19 '15 at 16:17
• Ok, I see these, but I'm still at loss as why would this certain expression prove this difficult. I'm not a student of mathematics, so I might be missing a very evident point, or something. – Benjamin Márkus Mar 19 '15 at 16:19
• My best guess is that it has something to do with the fractional powers. I think that there is no closed-form solution; however, Mathematica is trying lots of transformations involving the different combinations of exponents. Even NSolve has trouble. I would suggest using FindRoot to get numerical roots, it seems to handle it fine. – 2012rcampion Mar 19 '15 at 17:36
• The equation has this form: something * z^(7/2) == (z-2)^(14/5)+(z+3)^(7/10). By raising to powers a sufficient number of times, this can be converted to a polynomial equation with only integer exponents. However, those exponents (and the equation) will be very large. I believe this is why it is taking so long. This is just a guess on my part based on how I would start solving something like this ... I don't know what Mathematica does. – Szabolcs Mar 19 '15 at 22:14

OK, I see these, but I'm still at loss as why would this certain expression prove this difficult.

I really don't know how Mathematica is solving equations with fractional powers like this, but think about how you would solve them. Take a simple example:

$$\sqrt{x+1} + \sqrt{x+2} = 5$$

We have two square roots, i.e. two fractional power terms. Let's keep one on the lhs and move everything else to the rhs, then square both sides:

$$(\sqrt{x+1})^2 = (5 - \sqrt{x+2})^2$$

This got rid of one fractional power:

$$x+1=x - 10 \sqrt{x+2}+27$$

Now do the same with the other fractional power term:

$$(10 \sqrt{x+2})^2 = 26^2$$

Then we finally arrive to a simple polynomial equation with no fractional powers in it and can get the solution.

You can do the very same thing with your equation. But soon you'll end up with lots and lots of terms and very high powers. Try it. This is likely why Mathematica computes for such a long time and ends up running out of memory.

Interpreting your right hand side as cz (rather than cx)) the solution z0 can be computed as a function of c (where 0 < c < 3/2) with the help of FindRoot thus:

z0[c_] := z /.
FindRoot[c == (1/z) (((z - 2)^(14/5) + (z + 3)^(7/10))/(z - 1)^(7/2)), {z, 2}][[1]]

Plot[z0[c], {c, 0, 1.5}, PlotRange -> {0, 5},
PlotLabel -> "Solution z0 of an equation\nas a function of the parameter c",
AxesLabel -> {"c", "z0[c]"}]