# Newtons Method

• Oct 27th 2007, 10:41 PM
coe236
Newtons Method
Use Newtons method to find the two solutions of e^x=5*x to three decimal places.
Newtons Method: X(n+1) = Xn - f(Xn)/f'(Xn)

I just dont understand how you would set this up. Do you set both the approximations equal to each other to solve or do you solve them individually and keep checking?
• Oct 27th 2007, 10:52 PM
Jhevon
Quote:

Originally Posted by coe236
Use Newtons method to find the two solutions of e^x=5*x to three decimal places.
Newtons Method: X(n+1) = Xn - f(Xn)/f'(Xn)

I just dont understand how you would set this up. Do you set both the approximations equal to each other to solve or do you solve them individually and keep checking?

there are two solutions for x. one is around 2.5 (a little more), the other is between 0.2 and 0.5.

first rewrite: $e^x - 5x = 0$

thus we let $f(x) = e^x - 5x$

now we guess a root. let's say we're going after the one around 2.5. so we guess 2.5 (that is, we let $x_n = 2.5$)

then $x_{n + 1} = 2.5 - \frac {f(2.5)}{f'(2.5)}$

you will get a value for $x_{n + 1}$

then repeat the same process, using the last value you got as $x_n$, and keep doing it until you realize the values settling (you always get the same first three decimal places).

do this again for the other root, guess 0.5

below is the graph
• Oct 27th 2007, 11:00 PM
earboth
Quote:

Originally Posted by coe236
Use Newtons method to find the two solutions of e^x=5*x to three decimal places.
Newtons Method: X(n+1) = Xn - f(Xn)/f'(Xn)

I just dont understand how you would set this up. Do you set both the approximations equal to each other to solve or do you solve them individually and keep checking?

Hello,

1. make a rough sketch: You'll notice that there are 2 points of intersection thus

2. the equation $e^x-5x = 0$ have 2 solutions.

3. consider the function $f(x) = e^x-5x~\implies~f'(x) = e^x-5$

then you have:

$x_{n+1}=x_{n}-\frac{e^{x_n}-5x_n}{e^{x_n}-5}$

Code:

start:            0                  2 2. step:      0.25                3.092876765 3. step:      0.25915...          2.70696...   .   . answer:        0.259171101..      2.542641358...
• Oct 28th 2007, 12:46 AM
coe236
ohh i understand, I kept solving for x and that messed me up. That sounds simple enough. Thanks guys
• Oct 28th 2007, 01:14 AM
earboth
Quote:

Originally Posted by coe236
ohh i understand, I kept solving for x and that messed me up. That sounds simple enough. Thanks guys

Hello,

if (and only if) your calculator has a $\boxed{ANS}$-key then these kinds of problems are simpler than they appear.

= [you only hit the $\boxed{=}$-key]