Professional Documents
Culture Documents
FINAL OUTPUT
In
EE-313
(Numerical Methods and Analysis)
Submitted by:
Attach your
picture here
. GREZEL M. MALASAGA .
BSEE – 3B
Submitted to:
Topics Page
Reflection …………………………………………………………………………………………………….. 10
i
Note:
1. No students shall have the same problem and solution sets, each student should modify
its own and different type or form of paragraph or sentences.
2. All submission with identical entries will obtain an average score.
3. Please refer to the given rubrics on the messenger group chat to serve you as a guide in
formulating your modified problems and solution sets in ME312.
4. Grades will be derived from total points based on given rubrics
ii
TEST I
1. Bisection Method
- Find a root of an equation f(x)=(x2+2x+1) using Bisection method.
Solution:
Here x2+2x+1=0
Let f(x)=x2+2x+1
Here x 0 -1 -2
f(x) 1 0 1
Here f(-1)=0
∴Root of the equation x2+2x+1 is -1
Here x2+2x+1=0
Let f(x)=x2+2x+1
Here x 0 -1 -2
f(x) 1 0 1
Here f(-1)=0
∴Root of the equation x2+2x+1 is -1
TEST II
Iterative Non – Bracketing Method
Here x2+2x+1=0
Let f(x)=x2+2x+1 2nd iteration :
∴f′(x)=2x+2 f(x1)=f(0.5)=0.52+2⋅0.5+1=2.25
x0=2 f′(x1)=f′(0.5)=2⋅0.5+2=3
x2=x1-f(x1)f′(x1)
1st iteration : x2=0.5-2.253
x2=-0.25
f(x0)=f(2)=22+2⋅2+1=9
f′(x0)=f′(2)=2⋅2+2=6 Relative percent error
x1=x0-f(x0)f′(x0) 𝑋2 −𝑋1 −0.25−0.5
e=| |×100%=| |×100%=300%
𝑋2 −0.25
x1=2-96
x1=0.5
1
4. Secant Method
- Find a root of an equation f(x)=ln(x+2) using Secant method.
Solution:
Here ln(x+2)=0
Let f(x)=ln(x+2) Here f(-1)=0
∴Root of the equation ln(x+2) is -1
Here
x 0 -1 -2
f(x) 0.6931 0 "Undefined"
Solution: Here
Let f(x)=x2+2x+1
x 0 -1 -2
Here x2+2x+1=0
f(x) 1 0 1
∴2x=-x2-1
Here f(-1)=0
∴x=-x2-12
Root of the equation x2+2x+1 is -1
∴ϕ(x)=-x2-12
TEST III
6. Muller’s Method
- Find a root of an equation f(x)=2x+1 using Muller method. (must reach 0%)
Solution: h1=x1-x0=0-(-1)=1
h2=x2-x1=-0.5-0=-0.5
Here 2x+1=0
Let f(x)=2x+1 δ1=f(x1)-f(x0)h1=1-(-11)=2
δ2=f(x2)-f(x1)h2=0-1-0.5=2
Here a=δ2-δ1h2+h1=2-2-0.5+1=0
x 0 -1 -2
b=a×h2+d2=0×-0.5+2=2
f(x) 1 -1 -3 c=f(x2)=0
x0=-1 x3=x2+-2cb±√b2-4ac
x1=0 x3=x2+-2cb+sign(b)√b2-4ac
x2=-0.5 =-0.5+-2×02+√22-4×0×0
=-0.5+02+√4
1st iteration : =-0.5+02+2
f(x0)=f(-1)=2⋅(-1)+1=-1 =-0.5
f(x1)=f(0)=2⋅0+1=1
f(x2)=f(-0.5)=2⋅(-0.5)+1=0 Relative percent error
𝑋 −𝑋 −0.5−0.5
ɛa1=| 3𝑋 2|×100%=| 0.5 |×100%=0%
3
Approximate root of the equation 2x+1=0 using Muller method is -0.5 (After 1 iterations)
2
7. Bairstow’s Method
- Find all roots of polynomial using Bairstow method
f(x)=x3-x2-x+1 and r=-1,s=-1
q2=q1+Δq=-2+1=-1
Δp=-b3⋅c0-b2⋅c1c21-c0⋅(c2-b2)=-1-1=1
Δq=-b2⋅(c2-b2)-b3⋅c1c21-c0⋅(c2-b2)=--1-1=-1 Approximate root p=0 and q=-1
3
TEST IV
x+2y=8→(2) R2←R2×-2
1 2.5 10.5
Converting given equations into matrix
form 0 1 5
2 5 21 R1←R1-2.5×R2
1 2 8 1 0 -2
R1←R1÷2 0 1 5
1 2.5 10.5
x=-2
1 2 8 y=5
R2←R2-R1
1 2.5 10.5 Solution By Gauss Jordan elimination
method
0 -0.5 -2.5 x=-2andy=5
10. Cramer’s Rule Method
- Solve Equations 1 -11
2x+5y=16,3x+y=11 using
Cramer's Rule method =5×(-11)-(-16)×1
Solution: =-55+16
The equations can be expressed as =-39
2x+5y-16=0
3x+y-11=0 2 -16
Dy =
3 -11
=2×(-11)-(-16)×3
Use Cramer’s Rule to find the values of =-22+48
x, y, z. =26
xDx=-yDy=1D
2 5
Dx = 5 -16 D=
3 1
4
=2×1-5×3
=2-15 ∴x-39=1-13,-y26=1-13
=-13
∴x=-39-13,y=-26-13
xDx=-yDy=1D
∴x=3,y=2
∴x-39=-y26=1-13
TEST V
Least Square Regression
11. Least Square Regression (LSR)
- Solve for the m, y=mx+b and its errors using Least Square Regression.
x y x2 xy x y Y=mx+b errors
1 2 1 2 1 2 1.9067 -0.0933
4 5 16 20 4 5 5.3867 0.3867
6 7 36 42 6 7 7.7067 0.7067
11 15 53 64
∑
N=3 𝑵∑(xy)−∑x∑y
m= 2 =1.16
𝑵∑(𝑥2 )−(∑𝑥)
Sum of X = 11
∑y−m∑x
Sum of Y = 15 b= 𝑵
=0.7467
Sum of x2= 53
Sum of xy= 64
TEST VI
Numerical Interpolation Technique
5
h=x1-x0=1901-1891=10
p=x-x0h=1900-189110=0.9 y(1900)=46+0.9×20+0.9(0.9-1)2×-
5+0.9(0.9-1)(0.9-2)6×2+0.9(0.9-1)(0.9-
Newton's forward difference 2)(0.9-3)24×-3
interpolation formula is y(1900)=46+18+0.225+0.033+0.026
y(x)=y0+pΔy0+p(p-1)2!⋅Δ2y0+p(p-1)(p- y(1900)=64.284
2)3!⋅Δ3y0+p(p-1)(p-2)(p-3)4!⋅Δ4y0
6
15--93- 161
0 -6 7
-1=6 1
39-- The value of x at you want to find
41-66-- the f(x):x=1
63-
1=5
0=15
Newton's divided difference interpolation
261- formula is
13-57-
3 39 156- f(x)=y0+(x-x0)f[x0,x1]+(x-x0)(x-
-1=1
0=41 x1)f[x0,x1,x2]+(x-x0)(x-x1)(x-
822- 132- x2)f[x0,x1,x2,x3]+(x-x0)(x-x1)(x-x2)(x-
396- 417- x3)f[x0,x1,x2,x3,x4]
3=261 0=13
y(1)=3+(1+1)×-9+(1+1)(1)×6+(1+1)(1)(1-
789- 3)×5+(1+1)(1)(1-3)(1-6)×1
6 822 2617-
3=132 y(1)=3+(2)×-9+(2)(1)×6+(2)(1)(-
1611- 2)×5+(2)(1)(-2)(-5)×1
8227-
6=789 y(1)=3-18+12-20+20
y(1)=-3
x f(x)
2 45 Hence Δ4y0=0
Solution: (E-1)4y0=0
3 49.2 The value of table for x and y (E4-4E3+6E2-4E+1)y0=0
4 54.1 y4-4y3+6y2-4y1+y0=0
x 2 3 4 5 6 ∴67.4-4(a)+6(54.1)-4(49.2)+45=0
5 ?
y 45 49.2 54.1 ? 67.4 ∴-4a+240.2=0
6 67.4
∴-4a=-240.2
Here we are given 4 values of y. We ∴a=-240.2-4
assume that y is polynomial of ∴a=60.05
degree 3.
TEST VII
7
1. 6.049 0.242 0.009
8 6 9 4 [dy/dx]x=x0=1h⋅(Δy0-
12⋅Δ2y0+13⋅Δ3y0-14⋅Δ4y0)
1.339 0.053
5 5 ∴[dy/dx]x=1.4=10.2⋅(0.8978-
7.389 0.296 12×0.1988+13×0.0441-14×0.0094)
2
1 4
∴[dy/dx]x=1.4=4.0538
1.635
9
2. [d2y/dx2]x=x0=1h2⋅(Δ2y0-
9.025 Δ3y0+1112⋅Δ4y0)
2
h=x1-x0=1.6-1.4=0.2 ∴[d2y/dx2]x=1.4=4.0829
[dydx]x=xn=1h⋅(∇yn+12⋅∇2yn+13⋅∇3yn+14
x 1.4 1.6 1.8 2 2.2 ⋅∇4yn)
y 4.0552 4.953 6.0496 7.3891 9.025
∴[dydx]x=2.0=10.2×(1.3395+12×0.2429+13
×0.0441+14×0)
Newton's backward differentiation table
x y ∇y ∇2y ∇3y ∇4y ∴[dydx]x=2.0=7.3782
1. 4.055
4 2
[d2ydx2]x=xn=1h2⋅(∇2yn+∇3yn+1112⋅∇4yn
0.897 )
8
1. 0.198 ∴[d2ydx2]x=2.0=10.04⋅(0.2429+0.0441+111
4.953 2×0)
6 8
1.096 0.044 ∴[d2ydx2]x=2.0=7.175
6 1
1. 6.049 0.242 0.009
8 6 9 4
1.339 0.053
5 5
7.389 0.296
2
1 4
1.635
9
8
18. Newton’s Divided Difference
- Using Newton's Divided Difference formula to find solution.
1 98
x f(x) 0 0
2 4
4 56 Newton's divided difference interpolation
9 711 formula is
f(x)=y0+(x-x0)f[x0,x1]+(x-x0)(x-
10 980
x1)f[x0,x1,x2]+(x-x0)(x-x1)(x-
x2)f[x0,x1,x2,x3]
x=5
Solution: f(x)=4+(x-2)×26+(x-2)(x-4)×15+(x-2)(x-
The value of table for x and y 4)(x-9)×1
x 2 4 9 10 f(x)=4+(x-2)×26+(x2-6x+8)×15+(x3-
15x2+62x-72)×1
y 4 56 711 980
f(x)=4+(26x-52)+(15x2-90x+120)+(x3-
Numerical divided differences method to
find solution 15x2+62x-72)
56-44-2=26
f′′(x)=6x
131-269-
4 56
2=15 Now, substitute x=5
711-569- 23-1510-
4=131 2=1 f′(5)=3×52-2=73
71 269-13110-
9
1 4=23 f′′(5)=6×5=30
980-71110-
9=269
TEST VIII
9
20. Simpson’s 1/3 Rule
- Find Solution using Simpson's 1/3 rule.
- x 7.47 7.48 7.49 7.5 7.51
x f(x)
y 1.93 1.95 1.98 2.01 2.03
7.47 1.93
Using Simpsons 13 Rule
7.48 1.95
7.49 1.98 ∫ydx=h3[(y0+y4)+4(y1+y3)+2(y2)]
7.50 2.01 ∫ydx=0.013[(1.93+2.03)+4×(1.95+2.01)+2×(
7.51 2.03 1.98)]
∫ydx=0.013[(1.93+2.03)+4×(3.96)+2×(1.98)]
Solution: ∫ydx=0.0792
The value of table for x and y
∫ydx=3×0.258[(1+0.8415)+2×(0.9089)+3
×(1.9485)]
Solution:
The value of table for x and y ∫ydx=0.8911
Reflection
Numerical Methods and Analysis (EE313) is a course subject that every Electrical Student
should take. This subject taught me how to understand complicated problems using different kinds
of methods in solving. We do not use this kinds of solving in our daily lives, but I am certain that
this would be helpful in my future endeavours.
From the very beginning of this subject, we discussed from the basic methods – bisection,
false-position, etc. We also had some laboratories, where we inputted our problems and solve it
using MS Excel. It was fun though, even it was sometimes difficult to get the correct answer,
regardless – it was worth it.
Now, we’ve reached the last part of the topics, and all I could say is that, I learned a lot. I
did not expect to digest all of the topics, but I did, thankfully. Of course, this learning would never
be possible and accessible if it weren’t because of our instructor who gave his undivided and
unconditional attention to us, his students. We will be forever grateful for all the hardships and all
the laughter’s we’ve all shared. Charr! Ehem plus points hihi.
10