Monday, September 20, 2010

H2 #4

Use Newton's and the Secant Method to find the 6th root of 2 correct to six decimal digits.
we are looking for 1.12246204830937298

the first part is relatively easy (thanks go to liz for this one)

EDIT 9.15: added f(x) and f'(x) and fixed in sheet; 6x is actually 6x^5.


6root2 = x
2 = x^6
0 = x^6 - 2

f(x) = x^6 - 2
f'(x) = 6x^5





p0
1
=A2-(A2^6-2)/(6*A2^5)

and drag down

the Secant Method takes a few more steps (if you use several rows).



The work is as follows:

addition 9.21: I was in a hurry so I didn't put any real explanation into the answer so it probably doesn't make too much sense. Hopefully this will clarify

I chose initial values; 2 as my p0, 1 as my p1 (or vice-versa). The equation is repeated 3 times due to the numbers being in 3 columns:

f(x) = (x^6 - 2)

= 2 - f(1)*(1-2) / f(1)-f(2)
= 2 - (1^6 - 2) * (1 - 2) / ( (1^6 - 2) * ( 2^6 - 2))
= 1.01587302

and then repeat...

The results are:







p0 p1 pn
1 2 =(A2 - (A2^6-2) * (A2-B2) / ((A2^6-2) - (B2^6-2)))
=(C2-(C2^6-2)*(C2-A2)/((C2^6-2)-(A2^6-2)))
=(C3-(C3^6-2)*(C3-C2)/((C3^6-2)-(C2^6-2)))


then drag from there.

NOTE: This is a more complicated method (but it's how I first did it). It is much easier to make one row, preset the 2 initial values, and then make the third value equation refer back to them that way, it skips having to re-enter the equation manually.

also worth noting: around the 10th iteration you may get the error div/0, this is normal.

No comments:

Post a Comment