## anonymous one year ago Need Help! Use Newton's method to find all roots of the equation (x-2)^2=ln(x). Must be correct to 6 decimal places.

1. misty1212

HI!!

2. misty1212

is this an on line class or do you really have to use newton's method?

3. anonymous

I really have to use newtons method...

4. misty1212

ok then you have to start with something like $f(x)=\ln(x)-(x-2)^2$ and look for the zero of that one

5. misty1212

better still $f(x)=x^2-4x+4-\ln(x)$

6. misty1212

then you make a guess you got a good guess in mind?

7. misty1212

woah lot of algebra method you can use that too, but it is sometimes easier not to

8. misty1212

lets make a guess i guess 3

9. misty1212

$f(3)=3^2-4\times 3+4-\ln(3)=-0.098612$

10. misty1212

pretty close to zero already

11. misty1212

you gotta start somewhere right?

12. misty1212

figure it is easier to start with an integer

13. DanJS

for reference if needed... http://tutorial.math.lamar.edu/Classes/CalcI/NewtonsMethod.aspx

14. misty1212

now for the second approxmition it is $3-\frac{f(3)}{f'(3)}$

15. misty1212

$f'(x)=2x-4-\frac{1}{x}$ so $f'(3)=2\times 3-4-\frac{1}{3}=\frac{5}{3}$

16. misty1212

so next guess is $3+\frac{-0.098612}{\frac{5}{3}}$ at this point you really need a calculator

17. misty1212

this gets very very messy quick but you can do it with wolfram or a spreadsheet

18. misty1212

i get $x_2=2.9408328$

19. misty1212

now you have to repeat it so it is really going to be messy

20. anonymous

Yea, didnt get it...

21. misty1212

what did you not get?

22. anonymous

why are you using 3? whats so special about it

23. misty1212

oh , you have to make an educated guess first you can guess, graph, use wolfram (what i did) you have to do something to guess a number close to the zero of the function

24. misty1212

here is a picture of the function http://www.wolframalpha.com/input/?i=x%5E2-4x%2B4-ln%28x%29 click on "real values plot" so as not to get too confused you see it has two zeros

25. misty1212

one is very near 3, so i picked 3 as $$x_1$$

26. mathmate

ouch! I think it should be: $$\large 3\color{red}{-}\frac{-0.098612}{\frac{5}{3}}$$

27. misty1212

yeah you are right, it should be a plus

28. misty1212

so $x_2=3.0591672$

29. misty1212

you really want to make life easy on yourself here is what you can do for newton's method you are going to have to use a calculator anyways, so here is what we get if we make a first guess of 3 http://www.wolframalpha.com/input/?i=x-%28%28x-2%29%5E2-ln%28x%29%29%2F%282x-4-1%2Fx%29%2C+x%3D3

30. misty1212

click on the numeric answer, then rewrite with it substituted where i wrote x = 3

31. misty1212
32. mathmate

To resume how we could solve a problem using Newton's method. 1. define the equation in the form of f(x)=0, because Newton's method is for finding zeroes of an equation. Here (x-2)^2=ln(x) becomes f(x)=(x-2)^2-ln(x)=0 2. Graph the function and visually search for zeroes, which will be the potential initial values of the solutions. Also, visually check the graph to be convinced that all possible roots are counted. for the above f(x), we see that the graph is basically a quadratic, slightly modulated by the function ln(x), and which also restricted the domain to x>0. If we examine the graph between 1 and 4, we see that the roots are located near 1.5- and 3+. These will therefore be our initial approximations. Note: if a root of higher multiplicity is suspected, a different procedure from the following is required. 3. set up the iterative equation, x(n+1)=x(n) - f(x(n))/f'(x(n)) Here we have f(x)=(x-2)^2-ln(x) f'(x)=2(x-2)-1/x so the iterative equation is (x is used to stand for x(n) for simplicity) x(n+1)=x(n)-f(x)/f'(x) =x(n)- ((x-2)^2-ln(x))/)2(x-2)-1/x) =(xln(x)+x^3-5x)/(2x62-4x-1) 4. Apply the iteration solution a number of times to attain the required accuracy. Keep at least 2 decimals beyond the required accuracy for all calculations. Newton's method typically doubles the number of correct digits at each iteration, except for special circumstances such as multiple roots. Use calculator, Excel, Wolfram or any other tool to help you calculate accurately. Here the results are: A. for initial approximation of 3: 3 3.059167373200866 3.0571060546916 3.057103549998436 3.057103549994738 B. for initial approximation of 1.5 : 1.5 1.406720935135101 1.412369957251193 1.412391171725005 1.412391172023884 Clearly, the roots are 3.057104 and 1.412391 each to 6 decimal places.