

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
Math 433 - numerical analysis homework from spring 2008, including 6 problems on splines, newton-cotes, quadrature formulas, gram-schmidt orthogonalization method, and one-step methods. Students are asked to approximate shapes using polynomial interpolants and cubic spline interpolants, find the number of panels required for composite trapezoidal and simpson's rules, construct quadrature formulas, apply the gram-schmidt orthogonalization method, and find solutions of differential equations using various methods.
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Math 433 - Numerical Analysis - Spring 2008
Homework 11 Assigned: Monday, April 21, 2008. Due: Friday, May 2, 2008.
x=[0.0 0.5 1.0 1.5 1.7 1.85 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 5.75 6.0];
y=[0.0 0.9 1.2 1.35 1.4 1.7 1.95 2.3 2.35 2.4 2.35 2.25 1.8 1.0 0.7 0.0 ];
v=[0.0 0.5 1.0 1.25 1.5 1.75 2.0 2.25 2.5 2.75 3.0 3.25 3.5 3.75 4. 4.25 4.5 4.75 5.0 5.25 5.5 5.75 6.0];
w=[0.0 0.0 0.0 0.0 0.0 0.45 0.6 0.45 0.0 0.0 0.0 0.0 0.0 0.0 0. 0.45 0.6 0.45 0.0 0.0 0.0 0.0 0.0];
Points (x, y) describe the upper part of the car while points (u, w) give the lower part of the car. Approximate the shape of the car using
(a) polynomial interpolant; (b) cubic spline interpolant with ”not-a-knot” boundary conditions.
Which approximation is more accurate? Why? Note. The Matlab commands ”polyfit”, ”polyval” and ”spline” may be useful.
T (h) −
∫ (^) b
a
f (x)dx =
(b − a) h^2 12
f ′′(ξ)
for some ξ ∈ [a, b]. The error in the composite Simpson’s rule S(h) with panel width h is
S(h) −
∫ (^) b
a
f (x)dx =
(b − a) h^4 180
f (4)(ξ)
for some (different) ξ ∈ [a, b].
(a) Let f (x) = e−x^ sin x. For the composite trapezoidal rule and the composite Simpson’s rule, find the number of panels n required to integrate f on the interval [0, 2 π] with error at most 10−^4. Recall that h = 2π/n. How many function evaluations are required in each case? (b) Using the number of panels determined in the last part of the problem, use each rule to approximate the integral numerically. Compare your results with the actual value of the integral. For your information, an antideriva- tive of f is ∫ e−x^ sin xdx = − 0 .5 e−x(sin x + cos x).
∫ (^) b a f^ (x)dx^ using a second order poly- nomial approximation to f (x). The polynomial should pass through the points x 0 = a, x 1 = a + h + ε, and x 2 = a + 2h, where h = b− 2 a and ε ∈ (−a+ 2 b, a+ 2 b). (b) Show that for any choice of ε other than ε = 0, the method is O(h^4 ) instead of being O(h^5 ).
(a) Apply the Gram-Schmidt orthogonalization method to find the 4th degree Legendre polynomial P 4 (x). The first 3 were derived in class and are:
P 0 = 1, P 1 = x
P 2 = x^2 −
, P 3 = x^3 −
x
(b) Express x^4 as a linear combination of the first four Legendre polynomials {P 0 , P 1 , P 2 , P 3 , P 4 }.
0
x exp−x
2 dx.
(a) Use the 4-point Gaussian quadrature rule to approximate the integral (after changing variables to obtain an integral over [− 1 , 1]). The points and weights are:
x 1 = − 0. 861136311594053 c 1 = 0. 347854845137454 x 2 = − 0. 339981043584856 c 2 = 0. 652145154862546 x 3 = −x 2 c 3 = c 2 x 4 = −x 1 c 4 = c 1