しおり's question at Yahoo Answers regarding Newton's method

In summary, to find all roots of the equation sinx=x^2-3x+1 correct to six decimal places using Newton's Method, we first plot the function to get an idea of where the roots are. Then, we define the function f(x) and its derivative f'(x). Using the recursive algorithm, we can find the two roots of the equation, which are approximately 0.268881 and 2.770058.
  • #1
MarkFL
Gold Member
MHB
13,288
12
Here is the question:

Use Newton's Method to find all roots of the equation sinx= x^2-3x+1 correct to six decimal places.?


I think first thing that I need to do is
let x^2-3x+1-sinx=0
then f(x)=x^2-3x+1-sinx

But I am stuck here...
I don't know how to get the interval and how to get x1

Please please explain how to solve this question for me.

Thank you!

I have posted a link there to this thread so the OP can see my work.
 
Mathematics news on Phys.org
  • #2
Hello しおり,

The first thing I would do is plot:

\(\displaystyle \sin(x)=x^2-3x+1\)

in order to get an idea where the roots are:

View attachment 1670

So, we see the smaller root is about $0.25$ and the larger root is about $2.75$.

Now, as you did, I would define:

\(\displaystyle f(x)=x^2-3x+1-\sin(x)\)

Hence:

\(\displaystyle f'(x)=2x-3-\cos(x)\)

Newton's method gives us the recursive algorithm:

\(\displaystyle x_{n+1}=x_n-\frac{f\left(x_n \right)}{f'\left(x_n \right)}\)

Using our function $f(x)$, we have:

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

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

i) The smaller root: \(\displaystyle x_0=0.25\)

\(\displaystyle x_1\approx0.253025027391\)

\(\displaystyle x_2\approx0.268799448273\)

\(\displaystyle x_3\approx0.268881342724\)

\(\displaystyle x_4\approx0.268881344942\)

\(\displaystyle x_5\approx0.268881344942\)

ii) The larger root: \(\displaystyle x_0=2.75\)

\(\displaystyle x_1\approx2.77019710423\)

\(\displaystyle x_2\approx2.77005756932\)

\(\displaystyle x_3\approx2.77005756269\)

\(\displaystyle x_4\approx2.77005756269\)

Hence, the two roots of the given equation, rounded to 6 decimal places, are:

\(\displaystyle x\approx 0.268881,\,2.770058\)
 

Attachments

  • newtmethroots.jpg
    newtmethroots.jpg
    6.7 KB · Views: 71

FAQ: しおり's question at Yahoo Answers regarding Newton's method

What is Newton's method?

Newton's method is a mathematical algorithm used for finding the roots of a function. It involves repeatedly updating an initial guess for the root based on the function's derivative until a satisfactory level of accuracy is reached.

How does Newton's method work?

Newton's method follows a simple process of taking an initial guess for the root, calculating the function's derivative at that point, and using this information to update the guess. This process is repeated until the desired level of accuracy is achieved.

What are the advantages of using Newton's method?

One of the main advantages of Newton's method is its efficiency. It typically converges to the root much faster than other methods, especially when the initial guess is close to the root. It is also a relatively simple algorithm to implement.

Are there any limitations to using Newton's method?

Yes, there are a few limitations to using Newton's method. One is that it may not always converge to the root, especially if the initial guess is far from the root or if the function has multiple roots. Additionally, it requires the function's derivative to be known and continuous.

In what fields is Newton's method commonly used?

Newton's method has many applications in various fields such as engineering, physics, economics, and computer science. It is commonly used for root finding, optimization, and solving differential equations.

Similar threads

Back
Top