simple equation using Newton-Raphson Method

129 Views Asked by At

I was trying to solve the equation $$3^y=y^3$$ but I kept going in circles. My question is can I use Newton-Raphson method to solve $$3^y-y^3=0$$

3

There are 3 best solutions below

0
On BEST ANSWER

A trivial solution occurs at $x = 3$. For the rest, let's Newton.

$$f(x) = 3^x - x^3$$

Lest start by studying the derivative: $f'(x) = 3^x\ln(3) - 3x^2$

By Newton's method we have to take an initial guess. Observing the function I'd go with a mere $x_0 = 2$, hence:

$$x_1 = x_0 - \frac{f(x_0)}{f'(x_0)} = 2 - \frac{f(2)}{f'(2)} = 2.47338$$

Then again

$$x_2 = 2.47338 - \frac{f(2.47338)}{f'(2.47338)} = 2.47803$$

And again

$$x_3 = 2.47803 - \frac{f(2.47803)}{f'(2.47803)} = 2.47805$$

Then we can say a solution is very near to $x_3 = 2.47805$

Numerical precise methods show the "true" solution is

$$x_t = 2.47805(...)$$

0
On

(Not exactly an answer to your question, but not a comment either)

The equation can be solved using the Lambert W Function as follows: $$3^y=y^3$$ $$3^{-y}y^3=1$$ $$3^{-y/3}y=1$$ $$e^{-y\ln(3)/3}y=1$$ $$-\frac{y\ln(3)}{3}e^{-y\ln(3)/3}=-\frac{\ln(3)}{3}$$ $$-\frac{y\ln(3)}{3}=W\bigg(-\frac{\ln(3)}{3}\bigg)$$ $$y=-\frac{3}{\ln(3)}W\bigg(-\frac{\ln(3)}{3}\bigg)$$ This yields two solutions, one on each branch of the Lambert-W function.

0
On

You can make life simpler with Newton method if, instead of searching for the zero of $$f(x)=3^x-x^3$$ which would give as "nasty" iterates $$x_{n+1}=x_n-\frac{3^{x_n}-x_n^3}{3^{x_n} \log (3)-3 x_n^2}$$ you search for the zero of $$g(x)=\log(3^x)-\log(x^3)=x\log(3)-3\log(x)$$ which would give as "nice" iterates $$x_{n+1}=\frac{3 x_n (\log (x_n)-1)}{x_n \log (3)-3}$$