Piecewise cubic interpolation:
x0
=a
x1
xN
=L
Piecewise cubic Hermite polynomials:
DOF: 4N 2(N 1) = 2(N + 1) prescribe f (xi ) and f (xi ) at i = 0, . . . , N .
Presentation of f in terms of Hermite basis functions
N
f (x) h(x) =
where
N
(0)
f (xi )hi (x)
Interpolation and approximation
0.1
0.1.1
Interpolation and approximation
Approximating functions
A geometric view of representing arbitrary functions in terms of some basis functions:
Vector Algebra:
Representation:
Approximation:
b3
v
v
v
2
i=1 i bi
b2
2. For the Chebyshev density (x) =
1
1x2
the associated potential is:
(z) = log 
z
z2 1

2
From the limiting values (0) = log 21 and (1) = log 21 we observe that
2N
p(z) = eN N
0.2
throughout [1, 1]
Piecewise polynomial interpolation
Idea: to limit
Numerical Integration
Basic Idea: Integrate polynomial interpolants to approximate integrals.
fN
f1
f2
f0
h
x0 = a
x1
xN = b
x2
f (x) = pn (x) +
b
b
f (x) dx =
a
a
f (N +1) ()
(N + 1)!
N
N
j=0
(x xj )
f (N +1) ()
pN (x) dx +
(N + 1)!
b
N
=
fk
k=0
N
=
k=0
y0 x0
et
x
y
=
1
0
0 100
x = et x0
y = e100t y0
x
y
e100t
FE: If we were to use the FE method in the useful regime we would requre 2 < hk < 0
1 = 1 h < 2
2 = 100 h < 1/50
We do not particularly care about y since it decays to zero very rapidly but we are
Truncation Error: The truncation error (T.E.) is the remainder you get when you substitute the
exact solution to Duxx + bu = f () into the dierence equation.
Th =
i.e.:
2
ui + Bi ui Fi = O(h2 ).
h2
A dierence scheme is consistent with the dierential equa
Integrating Functions on Innite Intervals:
Eg.
I=
f (x) dx
0
If f (x) xp as x then
x1p

1p a
xp dx =
a
exists only if p > 1.
Truncate the Innite Interval:
c
f (x) dx +
I =
a
f (x) dx
c
= I1 + I2
Use the asymptotic behaviour of f to determine how large
0.3.2 Integrating functions with singularities
1
I=
0
1
I=
0
dx
= 2x1/2
x1/2
1
=2
0
ex
dx
x2/3
We cannot just use the trapezoidal rule in this case as f0 . In
this case we use what are called open integration formulae.
1. Open integration formulae
The Mid
Numerical Solution of PDE
2. Introduction to PDE
2.1 Classication of PDE
1st order PDE
F (x, y, ux , uy ) = 0
Eg:
uux + ut = 1
shock waves in trac ow and uid mechanics
Solving 1st order PDE using the method of characteristics
a(x, y, u)ux + b(x, y, u)uy =
Using the integral form of y = f (x, y(x)
xn+1
y(xn+1 ) = y(xn ) +
f (x, y(x)dx
xn
h
= y(xn ) + [f (xn , y (xn ) + f (xn+1 , y (xn+1 )] + O(h3 )
2
()
There are a number of dierent ways we can choose to exploit ()
yn+1
(1)
The Improved EulerExplicit/ Heun