0% found this document useful (0 votes)
23 views17 pages

ACA 3 Numerical Analysis GROUP G

1) The paper presents the numerical analysis of two functions using the fixed point and Newton-Raphson methods to find roots. 2) Also apply Lagrange interpolation to find a polynomial that interpolates specific data. 3) Finally, conclude that the fixed point method is more accurate than Newton-Raphson.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views17 pages

ACA 3 Numerical Analysis GROUP G

1) The paper presents the numerical analysis of two functions using the fixed point and Newton-Raphson methods to find roots. 2) Also apply Lagrange interpolation to find a polynomial that interpolates specific data. 3) Finally, conclude that the fixed point method is more accurate than Newton-Raphson.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

ACA 3 Numerical Analysis GROUP G

VICTOR RICARDO RUALES

Presented to:

Robinson Pardo Pardo

Teacher.

CV
National Unified Corporation
of Higher Education

National Unified Higher Education Corporation

Systems engineer

NUMERICAL ANALYSIS/51142
1
Content

1. Find the roots (all) of the following functions using the fixed point method and

the Newton – Raphson method.

2
1.1. f( x ) = x 5 +3 x 3 - x - 2
Graph of the function
2

1.1.1. Fixed Point Method

- We find the cut-off points, where the sign changes

0,7 -2,303263333
0,8 -2,130986667
0,9 -1,82351
1 -1,333333333
1,1 -0,602156667
1,2 0,44032
1,3 1,877596667
1,4 3,807573333
1,5 5,34375
1A q 16/KK67

- The root of the function is between 1.1 and 1.2

- We take 1.1 as a fixed point

- We solve for x and apply the method in Excel.

g(x) = % = x5 + 2 3
x3- 2
When we replace the function we realize that it does not work, since the percentage of
the

absolute error does not decrease.


Iteration x EA%
0 1.1O00O00O00O00O0OOOO
OO
1 0,497843333333334000000 120,95 3 04413034900000
2 !! 1! YO! )!!! 1! 1! 1! YO! )!!! 1! 1! 126,3805 7835554400000

3 1! 1! I!»»1! YO! 1! 1! 1! I!»»1! 93,79551620005990000


4 1! 1! YO! )!!! 1! 1! 1! YO! )!!! 1! 1! 99,99988324480670000
5 1! 1! I!»»1! YO! 1! 1! 1! I!»»1! 100,00000000000000000
5 1! 1! YO! )!!! 1! 1! 1! YO! )!!! 1! 1! 100,00000000000000000
7 #NUM! #i NUM!
8 #/NUM! #NUM!
9 #NUM! #i NUM!
10 #/NUM! #NUM!
3

S
Jx — 3 % +
g(x) = % =
2

- We solve for x again and apply the method in Excel.


With this new function g(x) we find the root.

Iteration x EA%
0 1,100000000000000000000
1 1,17215 0018300240000000 6,155357008386210000000
2 1,159797704439180000000 1,065040378488670000000
3 1,162135348791430000000 0,20115 0782882254000000
4 1,161700385613 810000000 0,037441941399000700000
5 1,1617815 79124780000000 0,006988707036325390000
6 1,161766431981900000000 0,001303802766230220000
7 1,161769258088590000000 0,000243258862855126000
8 1,161768730813390000000 0,000045385556518979000
9 1,161768829189090000000 0,000008467751606571470
10 1,161768810834780000000 0,000001579858833706480
11 1,161768814259210000000 0,000000294759988968603
12 1,161768813620300000000 0,000000054994440558312
13 1,161768813739500000000 0,000000010260502130599
14 1,161768813717260000000 0,000000001914340392968
15 1,161768813 721410000000 0,000000000357157765231
16 1,161768813720640000000 0,000000000066626637213
17 1,161768813720780000000 0,000000000012442323817
18 1,161768813720760000000 0,000000000002331741176
19 1,161768813720760000000 0,000000000000439590550
20 1,161768813720760000000 0,000000000000076450530
21 1,161768813 720760000000 0,000000000000000000000
22 1,161768813720760000000 0,000000000000000000000

- In Iteration 21 we find the root of the function 1.161768813720760000000 with

an Absolute Error of 0%

- We verify in Geogebra, It gives us the same value.


4

A = Root(f)

(1.1617688137208, 0)

1.1.2. Newton Raphson method

f(x) = x5 + 3 % 3 — x — 2

- We find the cut-off points, where the sign changes


0,7 -2,303263333
0,8 -2,130986667
0,9 -1,82351
1 -1,333333333
1,1 -0,602156667
1,2 0,44032
1,3 1,877596667
1,4 3,807573333
1,5 6,34375
1R Q61 f/KK67

- The root of the function is between 1.1 and 1.2

- We take 1.1 as a fixed point

- We find the derivative of the function


f'(w) = 5x4 + 2x2 — 1
- We apply the method in Excel.
iteration xi f(xi) f'(xi) f(x)/f'(x) ea%
Or 1.1000000000000 -0.6021566666667 8.7405000000000 -0.0688927025532
1 1,1688927025533 0,0779135086911 11,0666374312532 0,0070403958904 5,8938431562421
2 1,1618523066629 0,0009025135157 10,8109621779376 0,0000834813313 0,6059630686264
3 1,1617688253315 0,0000001254888 10,8079558842605 0,0000000116108 0,0071857093705
4 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000009994056
5

5 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000


6 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000
7 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000
8 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000
9 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000
10 1,1617688137208 0,0000000000000 10,8079554661792 0,0000000000000 0,0000000000000

- In Iteration 5 we find the root of the function 1.1617688137208 with an Error

0% absolute

- We verify in Geogebra, It gives us the same value.

A = Root(f)

(1.1617688137208, 0)
1.2. f( ) = cos(2x) —x5 + 2x - 1
x

Graph of the function


6

1.2.1. Fixed point method.

We find all the cut points, where the sign changes

-1,6 5,287465224
-1,5 2,603757503
-1,4 0,636017659
-1,3 -0,74395 8753
-1,2 -1,649073716
-1,1 -2,177991117
-1 -2,416146837
-0,9 -2,436712095
-0,8 -2,301519522
-0,7 -2,061962857
-0,6 -1,759882246
-0,5 -1,428447694
-0,4 -1,09305 3 291
-0,3 -0,772234385
-0,2 -0,478619006
-0,219923422
-0,1 0
0
0,1 0,180056578
0,2 0,320740994
0,3 0,422905615
0,4 0,486466709
0,5 0,509052306
0,6 0,484597754
0,7 0,401897143
0,8 0,243120478
0,9 -0,017692095
1 -0,416146837
1,1 -0,999011117

The root of the function lies between (-1.4,-1.3), (-0.1,0), (0.8,0.9)

We take as fixed points -1.4, 0 and 0.8

We solve for x and apply the method in Excel.


7

g(x) = x = x5-cos(2x)+1
8

When we replace the function we realize that it does not work, since the percentage of

the absolute error does not decrease

Iteration x EA%
0 -1,400000000000000000000
1 - 1, 718008829665 670000000 18,51031404347060000
2 - 6,504881001472430000000 73,5889 2761794130000
3 ####################### 99,88829408324980000
4 99,99999999999980000
F
5 #i NUM! #NUM!
F
6 #NUM! #NUM!
F
7 #i NUM! #NUM!
F
8 #NUM! #NUM!
F
9 #i NUM! #NUM!
F
10 #NUM! #NUM!

- We solve for x again and apply the method in Excel.

g(x) = Vcos(2x) + 2x-1


With this new function g(x) we find the roots.

Iteration x EA%
0 0,800000000000000000000
1 0,893916318821780000000 10,50616448590690000
2 0,894446822380731000000 0,05931079921991250
3 0,894454638028103000000 0,00087378912686675
4 0,894454753738142000000 0,00001293637703241
5 0,894454755451344000000 0,00000019153585692
6 0,894454755476710000000 0,00000000283588514
7 0,894454755477085000000 0,00000000004199077
8 0,894454755477091000000 0,00000000000062061
9 0,894454755477091000000 0,00000000000000000
10 0,894454755477091000000 0,00000000000000000

- In Iteration 9 we find the first root of the function

0.894454755477091000000 with an Absolute Error of 0%


9

- In Iteration 21 we find the second root of the function

-1.358585888102500000000 with an Absolute Error of 0%

- In Iteration 1 we find the third root of the function

0.00000000000000 with an undetermined Absolute Error


1
0
- Any division by 0 is indeterminate

- We verify in Geogebra, it gives us very approximate values.

g(x) = cos(2 x)-x5+2x-1

Roots (g, -103152380952381, 6.7323809523809) :

— A (-1.3585858881293, 0)

B = (0, 0)

C = (0.8944547448722, 0)

1.2.2. Newton Raphson method

- We find the cut-off points.

-1,6 5,287465224
-1,5 2,603757503
-1,4 0,636017659
-1,3 -O, 743958753
-1,2 -1,649073716
-1,1 -2,177991117
-1 -2,416146837
-0,9 -2,436712095
-0,8 -2,301519522
-0,7 -2,061962857
-0,6 -1,759882246
-0,5 -1,428447694
-0,4 -1,093053291
-0,3 -0,772234385
-0,2 -0,478619006
-0,1 -0,219923422
0 0
0,1 0,180056578
0,2 0,320740994
0,3 0,422905615
0,4 0,486466709
0,5 0,509052306
0,6 0,484597754
1
1
0,7 0,401897143
0,8 0,243120478
0,9 -0,017692095
1 -0,416146837
1,1 -0,999011117

The root of the function lies between (-1.4,-1.3), (-0.1,0), (0.8,0.9)

To find the roots we take the points -1.4, -0.1 and 0.9

We find the derivative of the function and apply the method in Excel.
f'(x) = —2sin(2x) — 5x4 + 2
iteration xi f(xi) f(xi) f(x)/f(x) ea%
0 -1,40000000000000 0,63601765933134 -14,53802369968820 -0,04374856393617
1 -1,35625143606383 -0,03302734291552 -12,08520557309010 0,00273287390237 3,22569715119618
2 -1,3589843099662 0 0,00566603812319 -12,23192587621760 -0,0004632171728 7 0,20109679577105
3 -1,35852109279333 -0,00092065969518 -12,20699715533800 0,00007542065288 0,03409716458080
4 -1,35859651344621 0,00015099430027 -12,21105436195200 -0,00001236537778 0,00555136511359
5 -1,35858414806843 -0,00002472664262 -12,21038912976960 0,00000202504952 0,00091016649924
6 -1,35858617311795 0,00000405020934 -12,21049807212220 -0,0000003316989 5 0,00014905565491
7 -1,35858584141900 -0,00000066339493 -12,21048022755680 0,00000005432996 0,00002441501569
8 -1,35858589574897 0,00000010866000 -12,21048315037070 -0,00000000889891 0,00000399900828
9 -1,35858588685006 -0,00000001779782 -12,21048267163190 0,00000000145759 0,00000065501278
10 -1,35858588830764 0,00000000291517 -12,21048275004630 -0,00000000023874 0,00000010728695
11 -1,35858588806890 -0,00000000047749 -12,21048273720250 0,00000000003910 0,00000001757292
12 -1,35858588810800 0,00000000007821 -12,21048273930620 -0,00000000000640 0,00000000287832
13 -1,35858588810160 -0,00000000001281 -12,21048273896160 0,00000000000105 0,00000000047145
14 -1,35858588810265 0,00000000000210 -12,21048273901810 -0,00000000000017 0,00000000007722
15 -1,35858588810247 -0,00000000000035 -12,21048273900880 0,00000000000003 0,00000000001265
16 -1,35858588810250 0,00000000000006 -12,21048273901040 0,00000000000000 0,00000000000208
17 -1,35858588810250 -0,00000000000001 -12,21048273901010 0,00000000000000 0,00000000000034
18 -1,35858588810250 0,00000000000000 -12,21048273901020 0,00000000000000 0,00000000000007
19 -1,35858588810250 0,00000000000000 -12,21048273901010 0,00000000000000 0,00000000000002
20 -1,35858588810250 0,00000000000000 -12,21048273901010 0,00000000000000 0,00000000000000
21 -1,35858588810250 0,00000000000000 -12,21048273901010 0,00000000000000 0,00000000000000

- In Iteration 20 we find the first root of the function -1.35858588810250

with an Absolute Error 0%

38 -0,00000000000036 -0,00000000000073 4,00000000000145 -0,00000000000018 100,00374935696900


39 -0,00000000000018 -0,00000000000036 4,00000000000073 -0,00000000000009 100,00749899517400
40 -0,00000000000009 -0,00000000000018 4,00000000000036 -0,00000000000005 99,98446721727160
41 -0,00000000000005 -0,00000000000009 4,00000000000018 -0,00000000000002 100,02999814995300
42 -0,00000000000002 -0,00000000000005 4,00000000000009 -0,00000000000001 100,06001430309500
43 -0,00000000000001 -0,00000000000002 4,00000000000005 -0,00000000000001 99,87575903398250
44 -0,00000000000001 -0,00000000000001 4,00000000000002 0,00000000000000 100,24019621276400
45 0,00000000000000 -0,00000000000001 4,00000000000001 0,00000000000000 99,50367405319360
1
2
- In Iteration 45 we find the second root of the function 0.000000000 with a

Absolute Error 99.5036%

iteration xi f(xi) f'(xi) f(x)/f(x) ea%


0 0,90000000000000 -0,01769209469309 -1,22819526175639 0,01440495273348
1 0,88559504726652 0,02741163187477 -1,03544106053885 -0,02647338696469

1,62658460861364
2 0,91206843423120 -0,05765899591059 -1,39618984871872 0,04129738943705 2,90256585702363
3 0,87077104479415 0,07099128755027 -0,84557290961491 -0,08395643562257 4,74262318251657
4 0,95472748041672 -0,21599357314141 -2,04060512247738 0,10584780502716 8,79375919774729
5 0,84887967538956 0,13034822288761 -0,58020007635176 -0,22466081650184 12,46911760239560
6 1,07354049189140 -0,82374154513286 -4,31814257711962 0,19076293346533 20,92709294141490
7 0,88277755842607 0,03591212405996 -0,99870173314964 -0,03595880818861 21,60939997222440
8 0,91873636661468 -0,08062170309244 -1,49162994215566 0,05404939979679 3,91394196368979
9 0,86468696681789 0,08807355978525 -0,77005925456755 -0,11437244505907 6,25074759663582
10 0,97905941187696 -0,31918305763128 -2,44600819137695 0,13049140994561 11,68186972839600
11 0,84856800193135 0,13115183333924 -0,57654663704275 -0,22747827307075 15,37783768049300
12 1,07604627500210 -0,83964444701185 -4,3748825347639 6 0,19192388374769 21,14019427931290

- In Iteration 1 we find the third root of the function 0.88559504726652 with

an Absolute Error 1.626584. The more we continue iterating the function gets

closer to the next root.


1
3
2. Apply Lagrange interpolation to find the polynomial that interpolates the

following data (—5,8),(6,4),(2,-3),(1,7); Also, find the value of the function

polynomial when x=4.

- We locate the points based on xf(x)

- We express the Polynomial from f(x)


P(x) = 8L0 (%) + 4L1(x) — 3L 2 (x) + 7L 3 (x)
We find each of the L(x)

Lo(x) (% – 6)(x – 2)(% – 1)


(—5 — 6)(—5 — 2)(—5 — 1)
x3 — 9x2 + 20% —
Lo(x) 12
—462

1
( _(X+5)(X—2)(X—1)
(6 + 5)(6 — 2)(6 — 1)
% 3 + 2x 2 — 13% +
L1(x) 10
220

L2(x) =
(% + 5)(% — 6)(%
— 1)
(2 + 5)(2 — 6)(2 —
% 3 — 2x2 — 29% +
L2(x) 30
28
1
4

and ( ) _(+5)(X-6)(X-2)
% 3 — 3x2 — 28% +
L3(x) 60
30
3- (1 + 5)(1 - 6)(1 - 1)
- We will substitute the L(x) found in the Polynomial P(x)
x 3 — 9x2 + 20% — %3 + 2%2 — 13% +
P(x) = 8
12 10
—462 220
% — 2x2 — 29% +
3
%3 — 3%2 — 28% +
30 60
3------------—------------ 30
P(x) = —4 (% 3 — 9% 2 + 20% — 12) + — (% 3 + 2x2 — 13% + 10)
— ' 231 7 55
— (%3 — 2%2 — 29% + 30) + — (%3 — 3%2 — 28% + 60)
- We solve the equation and we have that the Polynomial sought is the following
P(%) = 0.34x3 — 0.72x2 — 10.22% + 17.6
- now we can interpolate to x=4
2
— 10,22 * 4 +
17,6

Conclusions

• Newton Raphson's method is less accurate.

• The Newton Raphson method, when there are several roots in a function, tends to
approximate the closest cut point.

• The fixed point method is very accurate


1
5

• The fixed point method is not applicable for all functions f(x), the appropriate one
must be found to work as a solution.
1
6
Reference List

- Jiménez, J. (April 19, 2020). Lagrangian interpolation.

- https://www.geogebra.org/graphing?lang=es

- https://www.edu-casio.es/wp-content/uploads/2020/04/Errores-absolutos-y-

relative-errors.pdf

You might also like