Newton's Method Calculator Help: approx. soln to sinx=x^2−3x+1

FritoTaco

New member
Joined
Nov 14, 2015
Messages
42
Hello,

I'm trying to use my calculator to find an approximation of a solution to \(\displaystyle sinx=x^2-3x+1\) to four decimal places.

The iterative step of Newton's Method: \(\displaystyle x_{n+1}=x_{n}-\dfrac{f(x_{n})}{f'(x_{n})}\)

Also, to use Newton's Method, the function must = 0.

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

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

Now calculate f'(x)

\(\displaystyle f'(x)=cosx-2x+3\)

To choose our \(\displaystyle x_{0}\), we need to find where f(x)=0, by doing so I picked random values and plugged it into f(x) to see where there's a zero in between.

f(0) = -1
f(1) = 1.8

So there has to be a 0 between 0 and 1 so I will pick \(\displaystyle x_{0}=0.5\)
I also discovered where there is another 0.

f(2) = 1.9
f(3) = -0.85

So there has to be a 0 between 2 and 3 so I will pick \(\displaystyle x_{0}=2.5\)

So now I'm going to solve for the first part where there's a 0 between 0 and 1, and I want to find the first iteration (\(\displaystyle x_{1}\)) by plugging in my first guess of 0.5 into the f(x) andf'(x) that's used in \(\displaystyle x_{n+1}=x_{n}-

\dfrac{f(x_{n})}{f'(x_{n})}\) to get \(\displaystyle x_{n+1}=0.5-\dfrac{sin(0.5)-(0.5)^2+3(0.5)-1}{cos(0.5)-2(0.5)+3}\)

My answer for the first iteration is 0.268881345

My question is, how do I use my calculator to get the next iteration? I'm using a TI-30IIS scientific Calculator and this is my input:

First I type 0.5 and click enter which will be stored as my "ANS" (answer).

Note: ANS = 0.5

Then type the equation in: \(\displaystyle ANS-(sin(ANS)-ANS^2+3*ANS-1)/(cos(ANS)-2*ANS+3)\)

This equals \(\displaystyle 0.268881345\). Now how do I calculate the next iteration? (i.e. \(\displaystyle x_{1}\))

Thank you.
 
Last edited:
Well, you might want to double check your answer. You probably had a "fat finger" error, as I get a different answer. I tried it twice on my calculator and again on WolframAlpha and I get 0.2465...

But, that aside, what's stopping you from just doing exactly the same process to find x2 as you did to find x1? That is to say, now that 0.2465... is stored in my calculator as ANS, if I plug in \(\displaystyle ANS-(sin(ANS)-ANS^2+3*ANS-1)/(cos(ANS)-2*ANS+3)\), I get 0.2687... which, again, matches WolframAlpha's answer (it might be off by a little bit, as I rounded when plugging it into WA).
 
Well, you might want to double check your answer. You probably had a "fat finger" error, as I get a different answer. I tried it twice on my calculator and again on WolframAlpha and I get 0.2465...

But, that aside, what's stopping you from just doing exactly the same process to find x2 as you did to find x1? That is to say, now that 0.2465... is stored in my calculator as ANS, if I plug in \(\displaystyle ANS-(sin(ANS)-ANS^2+3*ANS-1)/(cos(ANS)-2*ANS+3)\), I get 0.2687... which, again, matches WolframAlpha's answer (it might be off by a little bit, as I rounded when plugging it into WA).

It's my fault. I didn't look close enough and the values appear to be changing. I don't know why I wasn't able to see it before. Sometimes it's nice to write out a problem online too because it helps you explain and pay more attention to what you're trying to solve, thank you!
 
Yeah, I've had that happen before too, where simply writing it out helped me realize where I was going wrong. Glad you got it though. :)
 
Top