# How to solve complicated algebraic problem that Wolfram *Mathematica* can't solve?

I need to solve an equation relating to investment for a particular variable. Wolfram alpha failed to solve it due to computation time. Mathematica gives up after about ten seconds. Perhaps I am typing in something incorrectly. The variable i is not in the complex number system.

Here is what the equation looks like in prettyPrint on wolfram alpha. (Give it about 10 seconds to print to the screen). Tiny Url isn't permitted. This link is too long to display normally with an easy click so you'll have to copy it. Don't just click on the link it will be the wrong problem.

$$\frac{(i+1) \left(\frac{r+1}{i+1}-1\right) \left(\frac{r+1}{i+1}\right)^p}{(r+1) \left(\left(\frac{r+1}{i+1}\right)^p-1\right)}=z$$

https://www.wolframalpha.com/input/?i=solve+for+r,+(((1%2B((1%2Br)%2F(1%2Bi)-1))%5Ep((1%2Br)%2F(1%2Bi)-1))%2F(((1%2B((1%2Br)%2F(1%2Bi)-1))((1%2B((1%2Br)%2F((1%2Bi))-1))%5Ep-1)))%3Dz


This is what I type into mathematica. It errors out after a while and says that the system cannot be solved with the methods available to Solve. Is anyone aware of a different function to use?

Solve[((1 + ((1 + r)/(1 + j) - 1))^
p*((1 + r)/(1 + j) -
1))/(((1 + ((1 + r)/(1 + j) -
1))*((1 + ((1 + r)/((1 + j)) - 1))^p - 1))) == z, r]


I have no desire to solve this by hand unless there is some trick.

• Ask this question here. Indeed check this. – Masacroso Feb 22 '17 at 0:44
• @Masacroso, the edited equation looks very different from the original equation given, I'm not sure that you copied the whole link correctly. – B. Mehta Feb 22 '17 at 0:48
• @B.Mehta yes, sorry, I left again unchanged – Masacroso Feb 22 '17 at 0:51

If you let $t = (1+r)/(1+j)$, your equation (as taken from the Mathematica version) is $$\frac{t^p(t-1)}{t(t^p-1)} = z$$ Thus $$(1-z) t^{p} - t^{p-1} + z = 0$$ where the solution $t=1$ is not wanted. If $p$ is a positive integer, this reduces to a polynomial in $t$ of degree $p-1$ which, in general, is not solvable by radicals.

• Shouldn't this be equal to r not 0? – frillybob Feb 22 '17 at 1:30
• No, it shouldn't. But $r = t (1+j)-1$. – Robert Israel Feb 22 '17 at 5:24