




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The concept of numerical integration, focusing on the orthonormal basis of polynomials and the trapezoidal method. The construction of an orthonormal basis of polynomials using laplace's equation and the legendre polynomials. It also explains the trapezoidal method for numerical integration, its error, and an example of its application.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Recall that we constructed on orthonormal basis on the space of quadratic functions on [− 1 , 1],
a 0 (x) =
a 1 (x) = x a 2 (x) =
3 x^2 − 1
2
2 5
These polynomials can be continued using a recursion process. Each resulting polynomial an is of degree n − 1 and is orthonormal to the other polynomials in the set,
am · an =
− 1
amandx = δmn
The recursion relation is given in problem 7. It can also be derived from the Laplace partial differential equation describing the spherical harmonics in R^3 ,
∂ 11 u + ∂ 22 u + ∂ 33 u = 0
where ∂ 11 = ∂ 2 ∂x^2 and so on for^ x^2 =^ y^ and^ x^3 =^ z.
Write the equation in spherical polar coordinates. We seek solutions that are dependent only on r and θ,
u = rnp(x)
where x = cos θ.
Note. The x in our assumed form of the solution of Laplace’s differential equation is not the same as the x coordinate in R^3.
The differential equation for p(x) becomes, { (1 − x^2 )p′
Note. x = 1 corresponds to cos θ = 1 ⇒ θ = 0, i.e. the north pole of the coordinate system. Likewise x = −1 corresponds to the south pole.
The functions that satisfy 1 are the Legendre polynomials. pn defined in this way is an nth degree polynomial which is bounded at x = ±1. These polynomials can be normalized such that
∫ (^1)
− 1
a^2 ndx = 1
We found the first three polynomials above in the previous lecture. We showed these functions are orthogonal. Now we show that all other pm con- structed in this was are orthogonal.
Proof. Consider the differential equation 1 applied to two particular Legendre polynomials pn and pm. Multiply the equation for pm by pn and the equation for pn by pm,
pn
(1 − x^2 )p′ m
(1 − x^2 )p′ n
Subtract these two equations and integrate from −1 to 1,
∫ (^1)
− 1
1 − x^2
(pnp′ m − p′ npm)
dx = {n(n + 1) − m(m + 1)}
− 1
pmpndx
The trapezoidal approximation of each subinterval is then equal to the area of the trapezoid formed by the x axis and the linear approximation of the function, ∫ (^) xj+
xj
(fj + fj+1)h
The trapezoidal approximation to the integral over the entire interval is a function of the mesh spacing. Writing this dependence explicitly,
T (h) =
h 2
(f 0 + f 1 ) +
h 2
(f 1 + f 2 ) +... +
h 2
(fn− 1 + fn)
=
h 2
h 2
fn
= h {f 0 + f 1 +... + fn} −
h 2
(f 0 + fn)
Note. We take the negative sign on the error term by convention. This formula sometimes appears slightly differently with the error term defined to be positive.
The error within each interval is the difference between the approximated value of the integral and the exact value,
j (h) =
h 2
(f (xj ) + f (xj + h)) −
∫ (^) xj +h
xj
f (x)dx
Make a change of variables in the integral,
t = x − xj
With this substitution,
j (h) =
h 2
(f (xj ) + f (xj + h)) −
∫ (^) h
0
f (xj + t)dt
Because h is small, Taylor expand f (xj + h) in powers of h about xj. We have done this calculation previously, where we obtained,
j (h) =
f ′′(xj )h^3 + O(h^4 )
The total error is then,
(h) = T (h) −
∫ (^) b
a
f (x)dx =
∑^ n−^1
j=
j (h)
h^2 12
∑^ n−^1
j=
f ′′(xj )h + O(h^3 )
Note. In our original expression for the error, we had a term of the form O(h^4 ). When this term is summed over n, it becomes O(nh^4 ). Since n = b−ha , O(nh^3 ) reduces to O(h^3 ).
In the limit h → 0, the summation becomes an integral,
lim h→ 0
∑^ n−^1
j=
f ′′(xj )h →
∫ (^) b
a
f ′′(x)dx
The integral of a derivative can be evaluated using the Fundamental Theorem of Calculus,
(h) =
h^2 12
{f ′(b) − f ′(a)} + O(h^3 )
In general, (h) is a power series in h. However, it can be shown using advanced analysis that only even powers of h appear in this expansion.
Theorem (Deep result). Let f (x) be analytic on an open interval [a, b]. Then,
T (h) −
∫ (^) b
a
f (x)dx = c 2 h^2 + c 4 h^4 +... ︸ ︷︷ ︸ even powers only
Consider a simple integral for which we know the value exactly,
∫ (^1)
0
exdx = e − 1
The final expression for the trapezoidal approximation is,
T (h) =
h 2 tanh
(h 2
)(e − 1)
The error term is,
(h) = T (h) −
0
exdx = T (h) − (e − 1)
h 2 tanh
(h 2
(e − 1)
This expression for (h) can be Taylor expansion in even powers of h, starting with h^2. The Taylor series expansion for (h) in terms of h is in even powers of h, as claimed above.
3 Midterm 2
There will be four problems. One or two will have multiple sections.
f (x) − p(x) =
f (n+1)(ζ) (n + 1)!
∏^ n
j=
(x − xj )
∏^ n
j=
(x − xj )
≤ Ln+
A much better bound can be found by actually maximizing the argument of the product.
n + 1 → 2 n + 2 (x − xj ) → (x − xj )^2