Download - Numerical Solutions of Equations (6)
-
8/9/2019 Numerical Solutions of Equations (6)
1/15
Kosturi Ash 12/3
A2 Mathematics Coursework C3
Year 12
Numerical solutions of equations
Solving 0 = ! "#! using the $Change %f Sign& Metho'
The method I will use to solve 0 = !"#! is the Change of Sign Metho' involving
the (ecimal Search method. I have drawn this graph using the Autograph Software,
and the print screen of this is elow!
1
This is the root of
this e"uation that I
need to find. See
)igure 1
-
8/9/2019 Numerical Solutions of Equations (6)
2/15
Kosturi Ash 12/3
#rom m$ graph aove, I can see that the root of this e"uation is etween =1 and =
1*!. The tale of values and f+, values is shown elow. I can wor% out the f+,
values $ sustituting the #values into the e"uation.
1 1*1 1*2 1*3 1*- 1*!
f+, #3 #2*2./-/ #1*311. 0*012/3 1*.2- -*0/3!
#rom m$ tale of values aove, it is clear that the change of sign from negative to
positive occurs etween = 1*2 and = 1*3. So, I can narrow these values down
further to find another change of sign.
f+,
1*21 #1*1/2
1*22 #1*02/
1*23 #0*/!-/
1*2- #0*.2.3
1*2! #0*/.2-
1*2 #0*!-20
1*2 #0*-21
1*2. #0*2.-03
1*2/ #0*13/
1*30 0*012/3
I can see that the change of sign is etween = 1*2/ and = 1*30*
f+,
1*2/1 #0*122.3
1*2/2 #0*10/2
1*2/3 #0*0/2/
1*2/- #0*0/
1*2/! #0*02/3
1*2/ #0*0-.-
1*2/ #0*0321
1*2/. #0*01!-
1*2// #0*002331*300 0*012/3
The change of sign is in the interval 1*2// 1*3004
f+,
1*2//1 #0*000.0!
1*2//2 0*00020
1*2//3 0*0022--
The root of this e"uation lies in the interval 1*2//1 1*2//24. This means that I can
ta%e the root to e = 1*2//1! +! 'ecimal 5laces,*
2
-
8/9/2019 Numerical Solutions of Equations (6)
3/15
Kosturi Ash 12/3
The ma&imum error of the root would e 0*0000!
'owever, there are some functions for which the (ecimal Search method would not
wor%. An e&le is +1*!!"3*-,-=0* This would not wor% ecause the curve is
touching the &(a&is, so there would not e a change of sign. The graph of this function
and the calculations are elow!
I can see that the root lies etween = #2 and = #3.
f+,
#2 0*00.10000
#2*1 0*000--20!
#2*2 0*00000001
#2*3 0*000-120
#2*- 0*010-.!
#2*! 0*0!0/0-
#2* 0*1!!2/1
#2* 0*3/332!#2*. 0*.0-./
#2*/ 1*-30/!
#3*0 2*--1-02!
As I have rightl$ guessed, there is no change of sign according to m$ calculations
aove. This is ecause the e"uation has an even power in it. Therefore, the (ecimal
Search method has failed to find the root of +1*!!"3*-,-=0*
Solving 0=- "#1 using the $Newton#6a5hson& metho'
3
I would not e ale
to find this root
ecause there is no
change of sign. See
)igure 2
-
8/9/2019 Numerical Solutions of Equations (6)
4/15
Kosturi Ash 12/3
As stated aove, the e"uation I will use for the $Newton#6a5hson& method is
-"#1=0* I can see from the graph that two roots need to e found using this method.
The graph of this is elow )or see )igure 3*.
The iterative formula for the $Newton#6a5hson& method is!
n"1=n# f+n,
f7+n,
#or m$ e"uation, f7+n, = -3"1 when m$ function is differentiated to find the
gradient function. The iterative formula I will use to find the roots of this function is!
n"1 = n# n- "n#1
-n3"1
I will start $ finding out the negative root first. +$ loo%ing at the diagram )see
)igure 3*, I can see that m$ starting value )1* is 81*!.
1 = #1*!
2 = #1*2/! )I sustituted 1 = #1*! into the iterative formula to get the value for 2*
3 = #1*22/0 )I sustituted 2 = #1*2/! into the iterative formula to get 3*
- = #1*220.12
! = #1*220--
= #1*220--0.!
= #1*220--0.!
I can see some convergence from !. There has een no change in the &(values
etween and for this numer of decimal places. I %now that this method for
finding the root has wor%ed.
I would need to find
these two roots of this
e"uation
-
8/9/2019 Numerical Solutions of Equations (6)
5/15
Kosturi Ash 12/3
-$ negative root is = #1*220-- + 'ecimal 5laces,
ow I will find the positive root of this function. The starting value +1, is
appro&imatel$ 1*! when f+,=0*
1 = 1*!2 = 1*113/
3 = 0*.20.
- = 0*-!1
! = 0*2!0-/
= 0*2--/2
= 0*2--/1/!/
. = 0*2--/1/!/
I can see some convergence from . There has een no change in &(values etween and . for this numer of decimal places. It is clear that another root has een
successfull$ found using this method.
-$ positive root is = 0*2--/1/!/ +/ 'ecimal 5laces,
The error ound is! 0*000000000!
'owever, the Newton#6a5hson method would not wor% with the graph elow!
If I start from the turning point of the curve, I do not thin% it will converge )see
)igure -*. The e"uation for this function is 0 = -"23"3#- f7+, = -3"2"3
The iterative formula is! n"1 = n# f+n,
f7+n,
So the iterative formula for this e"uation is! n"1 = n# n- "2n3 "3n#- -n3"n2"3
I wish to find this root
-
8/9/2019 Numerical Solutions of Equations (6)
6/15
Kosturi Ash 12/3
0n m$ diagram of this function, I have ta%en m$ 1 value to e aout 81*
1 = #1*
2 = 3*.2!/1
3 = 2*!./- = 1*.//.!
! = 1*3!3/
= 1*0033!
= 0*.-11
. = 0*.1/12
/ = 0*.1.3/0
10 = 0*.1.3./
11 = 0*.1.3./
#rom that, I can "uite clearl$ see that there is a convergence eginning to show
towards the positive root. 'owever, m$ aim was to find the negative root, and I couldnot find it. Therefore, the Newton#6a5hson method has failed to find that particular
root, even though the starting value was close to it.
Another e&le where the ewton(aphson would not wor% is the function
+"2192,192 ln +"2192, = 0. The graph and calculations of this is elow!
The function is! +"2192,192 ln +"2192, = 0
f7+, = ++"2192,192 X 1 , " +ln +"2192, X : +"2192, #192,
" 2 192
+"2192 ,192 " ln +"2192 , +"2192 , #192
+"2
192
,
1
2
I wish to find this
root
-
8/9/2019 Numerical Solutions of Equations (6)
7/15
Kosturi Ash 12/3
1 " ln+"2192 ,
+"2192,192 2+"2192, 192
= 2" ln++"2192 ,
2+"2192, 192
The iterative formula for the Newton#6a5hson method is!
n"1 = n = f7+n,
f7+n,
n"1 = n # 2+"2192 ,ln+"2192 ,
2 " ln+"2192,
I choose m$ starting value of +1, to e aout 81*3.
1 = #1*3
2 = #-*220/
3 = not 'efine'
- =
Another e&le where the Newton#6a5hson method would fail is with the function
3#!"0*1=0. The graph of this, along with the calculations is shown elow!
I wish to find this
root
-
8/9/2019 Numerical Solutions of Equations (6)
8/15
Kosturi Ash 12/3
f+, = 3#!"0*1 f7+, = 32#!
The iterative formula for the Newton#6a5hson method is! n"1 = n# f+n,
f7+n,
-$ iterative formula is! n"1 = n# 3 #!"0*1
32#!
I will ta%e m$ starting value of )1* to e 1*1.
1 = 1*1
2 = #1*.003
3 = #2*-000!3
- = #2*2!/1.
I can see that there is no convergence to the positive root I am loo%ing for. Therefore,
the Newton#6a5hson method has failed to find that particular root despite ta%ing a
starting value close to it. This is shown graphicall$ in )igure ;.
Solving 0= ! "- 2 #2 using the $6earranging metho'&
The graph of this is shown elow )or see )igure !*!
4
)This is the same graph as
the one on previous page*.
I wish to find this root
-
8/9/2019 Numerical Solutions of Equations (6)
9/15
Kosturi Ash 12/3
I will rearrange f+,=0 in the form of = g+,* As m$ e"uation is 0= !"-2#2 there
are possile rearrangements of this. I will onl$ pic% out two possile rearrangements.
earrangement 1! 0= !"-2#2
#!
= -2
#2!= #-2"2
= +#-2"2,19!
0n the Autograph software, I will draw the e"uation
-
8/9/2019 Numerical Solutions of Equations (6)
10/15
Kosturi Ash 12/3
earrangement 2! 0= !"-2#2
#-2= !#2
-2= #!"2
2= +#!"2,9-
= ++#!"2,9-,,192
0n Autograph software, I will draw the e"uation < = g+, = ++#!"2,9-,,192 and the line
< = . This is what it loo%s li%e elow )or see )igure *!
I can see from the diagram directl$ aove for earrangement 2 that g7+, is etween 1and 81, so there should e a convergence.
16
I wish to find this
intersection
-
8/9/2019 Numerical Solutions of Equations (6)
11/15
Kosturi Ash 12/3
Therefore, m$ chosen rearrangement is earrangement 2, which is! = ++#!"2,9-,,192
So m$ iterative formula for this rearrangement is! n"1= ++#n!"2,9-,,192
I can see from m$ graph aove that the point of intersections of the two lines is
etween = 0 and = 1. So m$ starting value for +1, would e 0*!.
1 = 0*! )I sustitute 1 = 0*! into iterative formula to get 2*
2 = 0*01!1 )I sustitute 2 value into iterative formula to get 3*
3 = 0*3/
- = 0*.11/
! = 0*.000
= 0*.0.02
= 0*.02
. = 0*.0/.
/ = 0*.0.3
10 = 0*.0.11 = 0*.0.!
12 = 0*.0.!
I can see a convergence from . and there is no change etween 11 and 12 for this
numer of decimal places. I %now that this method has wor%ed successfull$ to find a
root. This is shown graphicall$ in )igure .
-$ root is! = 0*.0 +! 'ecimal 5laces,*
I %now that using earrangement 2 helped me find a root of 0=!"-2 82. 'owever,
earrangement 1 of this function would not have helped me find the same root. This
is e&plained with a diagram of earrangement 1 and its iterative formula elow. This
failure is shown graphicall$ in )igure !
earrangement 1! 0= !"-2#2
11
I would not e ale to
find this root using
this rearrangement
ecause the gradient
of
-
8/9/2019 Numerical Solutions of Equations (6)
12/15
Kosturi Ash 12/3
#!= -2#2
!= #-2"2
= +#-2"2,19!
The iterative formula is! n"1= +#-n2"2,19!
#rom the graph aove and from )igures I can see that the point of intersection
etween < = and < = g+, = +#-2"2,19! is etween = 0 and = 1. 7i%e efore, I
will ta%e m$ starting value of +1, to e 0*!. The same process of sustituting values
of & into the iterative formula, as in the last earrangement is carried out here.
1 = 0*!
2 = 1
3 = #1*1-./.
- = #1*2.010
! = #1*3-.1
I can immediatel$ see that there is no convergence in this rearrangement towards the
particular root I am loo%ing for, that I found in the previous rearrangement
)earrangement 2** Therefore, I have found a rearrangement of the same e"uation
)earrangement 1* where the iteration has failed to converge to the re"uired root.
Com5arison of metho's
I will now use the e"uation 0=!"-2#2 that I solved using the 6earrangement
metho' and see if I can find the same root using the other two methods( the (ecimal
Search method and the Newton#6a5hson method. I will start off with the (ecimal
Search method.
#rom the graph 0=!"-2#2, I can see that the root lies etween = 0*! an' = 1
f+,
0*! #0*/.!
0* #0*-.22-
0* 0*12.0
I can see that the change of sign is etween = 0* and = 0**
f+,
0*1 #0*-21-0
0*2 #0*30.
0*3 #0*3131!
0*- #0*2!-22
0*! #0*1/3/1
0* #0*1323
0* #0*0/3.
0*. #0*00!00
0*/ 0*00.03
12
-
8/9/2019 Numerical Solutions of Equations (6)
13/15
Kosturi Ash 12/3
The change of sign is etween = 0*. and = 0*/
f+,
0*.0 #0*00!00
0*.1 0*001!10
The change of sign is etween = 0*.0 and = 0*.1
f+,
0*.01 #-*3!!!10#3
0*.02 #3*0-!--10#3
0*.03 #3*0!32/10#3
0*.0- #2*-01.210#3
0*.0! #1*!032210#3
0*.0 #1*0/.2/10#3
0*.0 #-*-/210
#-
0*.0. 2*0!1.10#-
The change of sign is etween = 0*.0 and = 0*.0.
f+,
0*.01 #3*.101210#-
0*.02 #3*1-0.310#-
0*.03 #2*!121-010#-
0*.0- #1*.01.210#-
0*.0! #1*20.21010#-
0*.0 #!*!223210#!
0*.0 /*!!10#
I can see that the change of sign is etween = 0*.0 and = 0*.0
As there is a change of sign, I can finall$ sa$ that the root of this function is in the
interval 0*.0 0*.04. Therefore, using this method, I can ta%e the root of this
e"uation to e = 0*.0!, which is similar to the answer I got when finding the
same root using the $6earrangement metho'&.
I will now use the Newton#6a5hson method to find the same root for this function.
0=!"-2#2 f7+, = !-".
The iterative formula for the Newton#6a5hson method is! n"1=n# f+n,
f7+n,
So m$ iterative formula is! n"1=n# n! "-n2 #2
!n-".nI thin% that a good starting value for 1 would e 1*2
1 = 1*2
2 = 0*..0.33 = 0*20!/
13
-
8/9/2019 Numerical Solutions of Equations (6)
14/15
-
8/9/2019 Numerical Solutions of Equations (6)
15/15