205.q4.2 very painful Newton's Method

In summary: Use Newton's Method: }$ \begin{align} \displaystyle x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)} \end{align} $\textsf{b. Use Newton's Method to solve: }$ \begin{align} \displaystyle f_{q4.2}(x)&=x^3-\sin\left({x}\right)-2\end{align} $\textsf{accurate to 3 decimal places.}$ x_0&=\frac{f(0)}{f'(0)}\\ &=\frac{x^3
  • #1
karush
Gold Member
MHB
3,269
5
%\section{Newton's Method }
%\subsubsection{205.q4.2 }
%\footnote{Leeward Community College}method m ,
$\textsf{a. Use Newton's Method: }$0000
\begin{align}
\displaystyle
x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}
\end{align}
$\textsf{b. Use Newton's Method to solve: }$
\begin{align}
\displaystyle
f_{q4.2}(x)&=x^3-\sin\left({x}\right)-2
\end{align}
$\textsf{accurate to 3 decimal places.}$
\begin{array}
\displaystyle
x_0&=\frac{f(0)}{f'(0)}
\therefore\frac{x^3-\sin(x)-2}{3x^2 - \cos(x)}&=0 \\
x_1&=0- \frac{f(0)}{f'(0)} &=-2.00... \\
x_2&=2.00- \frac{f(2.00)}{f'(2.00)}&=-1.267...\\
x_3&=1.267- \frac{f(1.267)}{f'(1.267)}&=-0.586...\\
x_4&=0.586- \frac{f(0.586)}{f'(0.586)}&=7.739...\\
x_5&=7.739- \frac{f(7.739)}{f'(7.739)}&=5.174.. \\
x_6&=5.174- \frac{f(5.174)}{f'(5.174)}&=3.453... \\
x_7&=3.454- \frac{f(3.454)}{f'(3.454)}&=2.378... \\
x_8&=2.378- \frac{f(2.378)}{f'(2.378)}&=1.770... \\
x_9&=1.770- \frac{f(1.770)}{f'(1.770)}&=1.502... \\
x_{10}&=1.502- \frac{f(1.502)}{f'(1.502)}&=1.443... \\
x_{11}&=1443- \frac{f(1443)}{f'(1443)}&=1.440... \\
x_{12}&=1440- \frac{f(1440)}{f'(1440)}&=1.440...\\
x_1 &\approx x_{12}
\end{array}
 
Last edited:
Physics news on Phys.org
  • #2
Your choice of first guess at the root was made at a place on the function where the sign of its derivative is different than that on the part containing the root. $f$ is decreasing when $x=0$, but it is increasing where $f=0$. That's why Newton's method didn't behave nicely at first. :D
 
  • #3
karush said:
%\section{Newton's Method }
%\subsubsection{205.q4.2 }
%\footnote{Leeward Community College}method m ,
$\textsf{a. Use Newton's Method: }$0000
\begin{align}
\displaystyle
x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}
\end{align}
$\textsf{b. Use Newton's Method to solve: }$
\begin{align}
\displaystyle
f_{q4.2}(x)&=x^3-\sin\left({x}\right)-2
\end{align}
$\textsf{accurate to 3 decimal places.}$
\begin{array}
\displaystyle
x_0&=\frac{f(0)}{f'(0)}
\therefore\frac{x^3-\sin(x)-2}{3x^2 - \cos(x)}&=0 \\
x_1&=0- \frac{f(0)}{f'(0)} &=-200... \\
x_2&=1.267- \frac{f(1.267)}{f'(1.267)}&=-1.267...\\
x_3&=1.267- \frac{f(1.267)}{f'(1.267)}&=-0.586...\\
x_4&=0.586- \frac{f(0.586)}{f'(0.586)}&=7.739...\\
x_5&=7.739- \frac{f(7.739)}{f'(7.739)}&=5.174.. \\
x_6&=5.174- \frac{f(5.174)}{f'(5.174)}&=3.453... \\
x_7&=3.454- \frac{f(3.454)}{f'(3.454)}&=2.378... \\
x_8&=2.378- \frac{f(2.378)}{f'(2.378)}&=1.770... \\
x_9&=1.770- \frac{f(1.770)}{f'(1.770)}&=1.502... \\
x_{10}&=1.502- \frac{f(1.502)}{f'(1.502)}&=1443... \\
x_{11}&=1443- \frac{f(1443)}{f'(1443)}&=1440... \\
x_{12}&=1440- \frac{f(1440)}{f'(1440)}&=1440...\\
x_1 &\approx x_{12}
\end{array}
I didn't check the actual numbers, but there are some errors that need to be looked into.

1) x_0 is wrong.

2) You are missing decimal places for x_1, x_11, and x_12.

3) x_2=1.267- f(1.267)/f'(1.267) This number is copied wrong.

4) x_3=1.267- f(1.267)/f'(1.267) So is this one.

5) Is your answer correct? You never said why you are posting this.

There might be more errors. Fix these and I'll take another look.

-Dan
 
  • #4
$\textsf{a. Use Newton's Method: }$
\begin{align}
\displaystyle
x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}
\end{align}
$\textsf{b. Use Newton's Method to solve: }$
\begin{align}
\displaystyle
f_{q4.2}(x)&=x^3-\sin\left({x}\right)-2
\end{align}
$\textsf{accurate to 3 decimal places.}$
\begin{array}
\displaystyle
x_0&=\frac{f(0)}{f'(0)}
\therefore\frac{x^3-\sin(x)-2}{3x^2 - \cos(x)}&=0 \\
x_1&=0- \frac{f(0)}{f'(0)} &=-2.00... \\
x_2&=2.00- \frac{f(2.00)}{f'(2.00)}&=-1.267...\\
x_3&=1.267- \frac{f(1.267)}{f'(1.267)}&=-0.586...\\
x_4&=0.586- \frac{f(0.586)}{f'(0.586)}&=7.739...\\
x_5&=7.739- \frac{f(7.739)}{f'(7.739)}&=5.174.. \\
x_6&=5.174- \frac{f(5.174)}{f'(5.174)}&=3.453... \\
x_7&=3.454- \frac{f(3.454)}{f'(3.454)}&=2.378... \\
x_8&=2.378- \frac{f(2.378)}{f'(2.378)}&=1.770... \\
x_9&=1.770- \frac{f(1.770)}{f'(1.770)}&=1.502... \\
x_{10}&=1.502- \frac{f(1.502)}{f'(1.502)}&=1.443... \\
x_{11}&=1443- \frac{f(1443)}{f'(1443)}&=1.440... \\
x_{12}&=1440- \frac{f(1440)}{f'(1440)}&=1.440...\\
x_{11} &\approx x_{12}
\end{array}

was wondering why so many iterations thot 3 would be enough
 
  • #5
At a glance we can see:

\(\displaystyle 0<f\left(\frac{\pi}{2}\right)<1\)

So, let's let \(\displaystyle x_0=\frac{\pi}{2}\)

And then we have:

\(\displaystyle x_{n+1}=x_n-\frac{x_n^3-\sin\left(x_n\right)-2}{3x_n^2-\cos\left(x_n\right)}\)

Hence:

\(\displaystyle x_1\approx1.4524822857659487\)

\(\displaystyle x_2\approx1.4410028287773716\)

\(\displaystyle x_3\approx1.4408982227972972\)

\(\displaystyle x_4\approx1.4408982141519631\)
 
  • #6
karush said:
$\textsf{a. Use Newton's Method: }$
\begin{align}
\displaystyle
x_{n+1}&=x_n-\frac{f(x_n)}{f'(x_n)}
\end{align}
$\textsf{b. Use Newton's Method to solve: }$
\begin{align}
\displaystyle
f_{q4.2}(x)&=x^3-\sin\left({x}\right)-2
\end{align}
$\textsf{accurate to 3 decimal places.}$
\begin{array}
\displaystyle
x_0&=\frac{f(0)}{f'(0)}
\therefore\frac{x^3-\sin(x)-2}{3x^2 - \cos(x)}&=0 \\
x_1&=0- \frac{f(0)}{f'(0)} &=-2.00... \\
x_2&=2.00- \frac{f(2.00)}{f'(2.00)}&=-1.267...\\
x_3&=1.267- \frac{f(1.267)}{f'(1.267)}&=-0.586...\\
x_4&=0.586- \frac{f(0.586)}{f'(0.586)}&=7.739...\\
x_5&=7.739- \frac{f(7.739)}{f'(7.739)}&=5.174.. \\
x_6&=5.174- \frac{f(5.174)}{f'(5.174)}&=3.453... \\
x_7&=3.454- \frac{f(3.454)}{f'(3.454)}&=2.378... \\
x_8&=2.378- \frac{f(2.378)}{f'(2.378)}&=1.770... \\
x_9&=1.770- \frac{f(1.770)}{f'(1.770)}&=1.502... \\
x_{10}&=1.502- \frac{f(1.502)}{f'(1.502)}&=1.443... \\
x_{11}&=1443- \frac{f(1443)}{f'(1443)}&=1.440... \\
x_{12}&=1440- \frac{f(1440)}{f'(1440)}&=1.440...\\
x_{11} &\approx x_{12}
\end{array}

was wondering why so many iterations thot 3 would be enough
You still have plenty of sign problems. Such as, why are you saying x_0 = 0 when it's clearly -2.00? etc. for x_1 through x_3. I suspect these are all problems with copying seeing as you are getting the correct answer.

MarkFL answered for the rest. Newton's method is not a high accuracy/speed algorithm. That's why you have to look at your graph and carefully choose an x_0. And even then you might not get an answer that converges and you might get a zero that you weren't even looking for. The advantage is that it's an easy algorithm to use.

-Dan

Addendum: Oh, and I don't know how many decimals you are actually using. Don't round much. The rounding can really screw you up in a problem like this one.
 
  • #7
it was supposed to go to 3 decimals but yes i see the decimal points missing...must be going blind☕
 
  • #8
Dan's right, don't round in the intermediary steps...carry as many digits as your machine allows. If you are told to approximate a root to $n$ decimal places, then carry out the recursion as accurately as you can until two successive iterations agree to $n+1$ decimal places so that you can properly round to $n$ places. :D
 
  • #9
well what i learned from this was start closer to avoid so many iterations and extend the round off at least dounle what is sougth for matching.
I was able to get the TI cx cas to do the recrusion up to 12 but need to extend the round off.

probably best just to graph it first then pick the $x_0$
☕
 

FAQ: 205.q4.2 very painful Newton's Method

What is Newton's Method and how does it work?

Newton's Method is an iterative mathematical algorithm used to find the roots of a function. It works by making successive approximations to the root of a function by using the derivative of the function at each step.

How is Newton's Method used in scientific research?

Newton's Method is commonly used in various fields of science, such as physics, engineering, and economics, to solve complex mathematical equations and determine critical points, such as maximum and minimum values, of a function.

What makes 205.q4.2 very painful for Newton's Method?

The term "painful" in this context refers to the complexity and difficulty of using Newton's Method to solve for the root of the function 205.q4.2. This function may have multiple roots or a very steep and erratic slope, making it challenging for the algorithm to converge to a single solution.

Are there any alternative methods to Newton's Method for solving equations?

Yes, there are several other numerical methods for finding the roots of a function, such as the Secant Method, Bisection Method, and Regula Falsi Method. Each method has its own advantages and limitations, and the most suitable method depends on the specific function being solved.

How can I improve the accuracy of Newton's Method for solving 205.q4.2?

There are a few ways to improve the accuracy of Newton's Method for solving this particular function. One approach is to use an initial guess that is closer to the actual root, which can help the algorithm converge faster. Another way is to use a smaller step size or increase the number of iterations for the algorithm. Additionally, using a combination of different numerical methods may also lead to a more accurate solution.

Similar threads

Replies
13
Views
2K
Replies
3
Views
2K
Replies
2
Views
1K
Replies
7
Views
2K
Back
Top