Session 16
Session 16
wi
Review on
previous approaches:
1-
specify two points ↓
those for point. approach
Lagrangian
interpolate line from -
2- a
specify
1- three points -
Equally spaced
int
2 -
-
in exactly for poly-
/Rute:
Equally spaced
specify
1- four its
poin
/Moe, a de
->
↑
2 -
interpolate a
rd
order polynomial from three points ->
Lagrangian approach
Interpolation polynomial : Locnsfon+ Hicnfal + tamfan+tyfund
Simpson 113 3 2
Simpson 3/8
4 3
&
Question: Are we able to use tower number ofpoints to have enact value for higher
polynomial?
② Garss. Quadrature Rule:
d. a,x
-
M) =
+
p() a,x =
so the
integral cam on written
Sdn 2
=
asj'fousda-e, for
Sndn-win
I
1, de-w,;
i
inde o
=
two-point Gauss quadrature rule: No. ofpts.
Find two pointmine and w, we so thatthe resultisexactfor
up to
241=3
representative polynomials fal=1; fas=n; faxl-x2; fm3=x'
So the
integral can be written as I
-
jdn
I
=
I, dx w, W2
2
= +
Linde =
Juss-win,
-
i
I
we
areafee e
I nde 0
Guide s
-
=wx? +we
=
~I
E
W, Nz 2
syst.
+ =
of W,x,+W2kz
i YW W2=
0
=
x -
-D =
=
=
monline -
We, + Wx?=s
equations we? Wx?o
I For up to sitpoly enact
is
(adn =6(
so
-55)+f(-) ** Since we
x,
exactly
and
end
or
determine
for
up to poly.
-
↑
ofintegral:
-range
In Gauss
quadrature rule, range ofintegral is
alwayI,). I
the
Using
relation,
following we can
alway convert any finite integral to
1,4
--
Linear
fee.......... I-----
·
x
.u
.
a
=
x b
=
transformation = -1
x mt n
=
+
S m=B
e
a mc 1) 4
x mt+n
-
E
+
=
- D
=
b m(1) +n
=
E
xa 1
bat a xt 5a(2x
= = = -
a =
+
=
= -
(a b)
+
x b
=
- t +1 =
du=b, dt
"Fida-a fetidt
"Stre by Gauss-Quadrature rule.
Example: b
1
=
Solve
I
Faith Gauss
using quadrature rule:
at
t
ia(2x b))
= -(a +
2x
=
-
1 -x x
t;dn Edt
=
=
I
faacti=f(t)-
IT 4
-
4 +
(0.96725
0.61652)
+ 0.78r
=
() = -
(5). f()+
()+(is) 5 5 =
=
= +
Analytical
Sol.
Inda-bu?!" 5 -15) 3 =
=
Example;two-point GQ
Sudn=wyf(u + wif (n) f( =
-
) f() (i)(e)" +-
+ =
manualSuidn =45)
S
5 5-I):*: 5
=
-
tion
-
to
differentialEquations:
Euler's methods
Most real physical processes are
governed only by differential Equations. IV-UDEXRK's methods
-
Differental Equations Ordinary Differential Equatius CODE) BU_ODE
-
- >
I
relationship between function
A a
ofa single independant variable and
-
- >
Partial Differential Equations (PDE): -
-Arm
FEM
relationship between
A fraction oftwo a or more
independant
variables and partial derivatives of its function art these
independent variables.
if at
eg.
- p Arial Displacement of
a uniform rod.
In (EAd] x=b
-
=
/EAG) =
=
(d/EAGT=) =
EA =
EA/du=c,du um)
E+ 2 (ocx 7.) =
= =
we know;
(10) = o
:(en) *
ihm Mult ·xI1
classification ofODES:
There are two different
types (classes) ofODES, depending on the annitary
condition specified. *=f(y,t
yut' a
① Intial-value ODE -
ifall own.
Conditions are
specified
at the
vanable.
same value
ofthe independent
y,
-
⑧
& yet
*
I,
② Boundary-value ODE
-> ifthe arm, conditions are
specified
at two different value ofthe independent
variable.
yet
t,i
I, ⑧
t, to
Solution ofisorder initial-value ordinary differential equationss
Numerical Solutionto storer can he into
classified
IV-ordinary
equations
into
① single-step
/
method: use the
only one
pastvalue to march the
Solution
In+= F( an,In yuch.)
byn, hxut-tut
② multi-step methods use several ofgens & gins to construct
past values a
and entrapolate
polynomial that approximate the deviatives into the next
a.
interval. Int1 f(ansmn..... KakH'Yuth--Yurkts 1.
*
Method:
Series
order
fetis consider the nonlinear
B= fimy):
ODE
yo-yo
about
Taylor series
expansion offunction yous no
n=
The order
higher can be
derivatives determined by successively differentiating the lower-
zmy; y'c0)
=
y
- 0
=
y" =((2xy) = =
-2y- 21n--zy-zay; "w)=-2
y"= 11 27-2y')
-
= -
4y'-zy"; y'"wl--
(4)
y* (-4y'-zy") =-by"-zay";
=
y I 12
15)
y =
-
by- zy i y 0
=
y(6) =
-
yy) zxy(5)
-
;y* =
- 96
yu 1-x - =
+ + m
15
y(0.1) 1-10.12
(*- ol =0.9200448
= +
backs:
and differentiation
require integration
- As these method analytically, they can not
be
implemented on the
computer.
methods with simple arithmetic operation be
implemented the
computer)
sonly
can on
become
-
obtaining higher-order derivative
progressively mor
complicated. Therefore .
in
Let us
approximate coscu) 4
in -4[u=6.
Recal 6
Yut=Yuthf(an1y+Ent
↳residual or Trucation ever
sigible
Euler
the general
Consider nonlinear ODE:
y'-fcary), yM0 y, =
in
aboutan y'
Truncation ofTaylor series expansion -
with Inti)
semplicitfuncion
Features:
Jut1 =
Y Am
+
aJane, e
eg( x-y2,
I
=
y(11 =2, An=0.1, 14
Explicit No =1, y= 2
Enter
method:
Yn+1 In+
=
Axy' =x
y, Yo+
=
Anf(x,y) y, =2 0.1(1
-4 +
-
22 2
= +
0.1) 3)-
I, 1.7
=
1 +0.1=1.)
2, No+ Ax
= =
4, 1+ 0-1 1.1, y, 67
= =
yz y,=
+
=
-
Implicit (Backward) Enter methods
the general
↳
Consider nonlinear ODE
y'-fcary), yM0 y, =
aboutanti
Truncation ofTaylor series expansion
In Ynx
= -
hF(Rn+1/Yn+1.
->
Yuts Inth cent, Intl
=
simplicitfunction
ar t Inti)
Features:
1 - This method is
implicit since fits depends on
Inti
2)
ImplicitEnter Abynt
method:Yut -but **Y=Y.+ Anfer, y,) 2, It01=1.1
=
=>
y, 2
=
0.1(11-y,7
+ = 2+
0.11-0.1y?
->
v1y? -y, +2.11
-
0
=
y!
= -
=
11.7547X
Ax
⑯+
=
3,
1.7897-
So x, 41& y, 1.7897
=
22x,
=
An
=
+
12 y, + =
Auf(x,y) -
xyz 1.7497+
=
0.1 (1.2-y))
·32 1.7847 +0.12-0.1y?
=
-
-0.14% -y, + 1.909750
=
y -
11.6406 X
*
3=1.64056 U
⑧