Calculus/Distinct Roots
Expert: Paul Klarreich - 10/5/2006
QuestionHi Paul, thank you for all of your help so far... you have helped me immensely!!
My name is Mary and I am studying Calculus 1. I am very rusty with my calculus and therefore need some help. I can solve functions, but have no idea how to find roots. Here is the problem:
The equation f (x)=x3 −3x+1 has three distinct real roots. Approximate their locations by evaluating f at -2, -1, 0, 1, and 2. Then use Newton's method to approximate each of the three roots to four-place accuracy.
Also, they threw me a loop with a dx/dt question:
Find dx/dt given x = 1 + cot 3t
Thanks again Paul
AnswerMary Asks in Category Calculus ...
Subject: Distinct Roots
Question: Hi Paul, thank you for all of your help so far... you have helped me immensely!
My name is Mary and I am studying Calculus 1. I am very rusty with my calculus and therefore need some help. I can solve functions, but have no idea how to find roots. Here is the problem:
The equation f (x)= x^3 - 3x + 1 has three distinct real roots. Approximate their locations by evaluating f at -2, -1, 0, 1, and 2. Then use Newton's method to approximate each of the three roots to four-place accuracy.
Also, they threw me a loop with a dx/dt question:
Find dx/dt given x = 1 + cot 3t
Thanks again Paul
........................................
Hi, Mary,
For f(x) = x^3 - 3x + 1 you start with your evaluations:
x f(x)
-----+-----
-2 -1
-1 3
0 1
1 -1
2 3
Since the function values change sign between -2 and -1, there must be an x-intercept, therefore a zero, between x = -2 and x = -1. Likewise between 0 and 1, and between 1 and 2.
Now here's how Newton's method works. (that is, WHEN it works -- sometimes it doesn't work very well.)
Take some point x1 that is near your hypothetical zero. I will do this for the one between -2 and -1, because there are 'issues' there. [A nice 21st century word for 'difficulties'.] I'll leave the others to you - they work about the same.
Here's the general idea: The graph is near your zero, and the tangent line at the known point, x1, 'aims' you at the zero. (we hope) So you just follow that tangent line until it crosses the x-axis, and that crossing is your zero.
Well, it isn't, of course, but it is a better approximation than x1, the one we started with. Now we repeat the process -- take x2 as our starting point, find the tangent line pointing to the next approximation, and find the next crossing point. These crossing points CONVERGE TO THE SOLUTION. (we hope)
What's the math involved? We start with these things:
P1(x1, y1 = f(x1) ) is our point on the graph.
f'(x1) is the slope of the tangent line at that point.
P2(x2, y2 = f(x2) ) is the crossing point we are aiming at.
HOWEVER, if P2 is supposed to be a crossing point on the x-axis, then y2 must be zero.
We use the basic point-slope form of the equation of a line. [Be a good girl, now, and don't call it a formULA.]
y2 - y1 = m(x2 - x1)
and put in our stuff: m = f'(x1), and y2 = 0
and we try to solve for x2, our hypothetical root.
- y1 = f'(x1)(x2 - x1)
-y1
x2 - x1 = ------
f'(x1)
y1
x2 = x1 - ------, and y1 = f(x1)
f'(x1)
That's it -- Newton's method. Two things to notice:
1) It gives you x2 in terms of all the One-things: x1, y1, f'(x1)
2) You must divide by f'(x1). That means you never use this if f'(x1) is zero. In fact, the numerical-methods people don't like to use it when f'(x1) is small.
Ok, so what do we do? First, what is f'(x)?
f'(x) = 3x^2 - 3
Next, what is x1? The root is between x = -2 and x = -1. Which one should we make our x1? One criterion would be: Look at the graph on your graphing calculator and pick the closer one. Or look at the y-values and pick the one closer to zero.
Another one, and a real biggie, is:
f'(-1) = 3(-1)^2 - 3 = 0. Very bad, that. So, for sure, we won't use x1 = -1.
Ready to go. Here's what you will do, and I recommend using a spreadsheet for the computation, MS Excel or something.
f(-2)
Compute: x2 = (-2) - ------
f'(-2)
x2 = x1 - [ x1^3 - 3(x1) + 1 ]/[3 x1^2 - 3]
Once you have done that, you get a row in your spreadsheet that gives your x2, a second approximation.
Now use the answer, the x2, in the same computation on the next row, to get an x3. And so on, until the values in consecutive rows do not differ by more than 0.0001. [You did say four places, right?]
It's messy to do by hand, that's why a spreadsheet is good for it.
...........................................................
After that, your second question is nothing.
Find dx/dt given x = 1 + cot 3t
How much trigonometry do you know?
D(sin u) = cos u du/dx
D(cos u) = - sin u du/dx
D(cot u) = - csc^2(u) du/dx.
If you know the last one, it's just a chain rule exercise. If you don't, then write:
cos(3t)
x = 1 + -------
sin(3t)
Because cot x = cos x/sin x
now use quotient rule and chain rule.
I'll leave that to you.