iteractively solve power equation

49 Views Asked by At

I have an equation like that: $$ x = (x-A)^{2/3}+B $$ And I want to find the value of x. The problem is that during the iteration, x can became negative and then appears complex number. But that x is a distance, then I don't want complex number. How can I solve it?

Thanks

2

There are 2 best solutions below

4
On BEST ANSWER

First consider $y = x-A$. Then $y+A = y^{2/3} + B$ which we can rearrange into $$ y - y^{2/3} + A - B = 0 $$ If $A = B$, then this has the two solutions $y = 1, y = 0$, which is to say $x = 1+A, x = A$.

Assuming $A\neq B$, then we also have $y\neq 0$, and we can divide the whole equation by $(A-B)y$ to get $$ \frac1{A-B} - \frac{1}{A-B}y^{-1/3} + y^{-1} = 0 $$ Now consider $z = 1/\sqrt[3]y$. We have $$ \frac1{A-B} - \frac{1}{A-B}z + z^3 = 0 $$ which is a depressed cubic. As such it may be solved through, for instance, the Cardano formula.

0
On

Consider that you look for the zero of function $$f(x)=x-(x-A)^{2/3}-B$$ $$f'(x)=1-\frac{2}{3 \sqrt[3]{x-A}}$$ $$f''(x)=\frac{2}{9 (x-A)^{4/3}}$$

The first derivative cancels at $$x_*=A+\frac{8}{27}\implies f(x_*)=A-B-\frac{4}{27}$$ which correspond to a minimum since $f''(x_*)=\frac{9}{8}$.

So, assuming that you use Newton method, by Darboux theorem, you should not have any problem if you select $x_0$ such that $f(x_0) > 0$. You would have one overshoot if this is not the case but if $x_0 > x_*$.

For example, let us use $A=123$ and $B=456$. The minumum is $x_*=\frac{3329}{27}\approx 123.296$. Let us start with $x_0=100$ and get the unpleasant first iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 100.0000000 \\ 1 & 480.3936273-79.5455497\, i \\ 2 & 508.7267057+0.1540812\, i \end{array} \right)$$ which will converge

Do the same with $x_0=150$ to get $$\left( \begin{array}{cc} n & x_n \\ 0 & 150.0000000 \\ 1 & 555.0000000 \\ 2 & 509.0984264 \\ 3 & 509.0155407 \\ 4 & 509.0155404 \end{array} \right)$$

Edit

After @Arthur's answer, let $\alpha=\frac 1 {A-B}$ to make the cubic $z^3-\alpha z+\alpha=0$. If there is only one real root (this corresponds to $\alpha < \frac {27}4$), the solution is given by $$z=\frac {2\sqrt{-\alpha}}{\sqrt 3}\sinh\left(\frac 13 \sinh^{-1}\left(\frac{3\sqrt 3 }{2\sqrt{-\alpha} } \right)\right) \qquad \text{if} \qquad \alpha <0$$ $$z=-\frac {2\sqrt{\alpha}}{\sqrt 3}\cosh\left(\frac 13 \cosh^{-1}\left(\frac{3\sqrt 3 }{2\sqrt{\alpha} } \right)\right) \qquad \text{if} \qquad \alpha >0$$ then $x=A+\frac 1{z^3}$ is the solution.