## Transcribed Text

Problem Set
1. (10 points) Consider the following data
t1234 y 11 29 65 125
Construct a third-order interpolating polynomial of the form P(t)=a0 +a1t+a2t2 +a3t3
Use the interpolating points to form a matrix equation Ax = b where x is the unknown vector [a0; a1, a2; a3]. Use Matlab x = A\b to solve for x. Interpolate for the value of P(t = 3.3).
2. (25 points) Consider a form of the Runge’s function below (not exactly the same as what was presented in class),
1
f (x) = 1 + x2 .
on the interval x ∈ [−5, 5]. Do the following and plot your answers
(a) Use 11 equally spaced points and find the interpolating Lagrange polynomial. Plot the graph of the polynomial along with the original function. What do you observe?
(b) Now let’s use unequally spaced points. Consider the points xj given by jπ
xj = −5cos n , j = 0,1,2,...,n
With 11 points (n = 10), construct the Lagrange interpolating polynomial and plot. How does this interpolating polynomial behave compared to the one in the previous step?
(c) Now construct a cubic spline that passes through 11 equally spaced points in x ∈ [−5, 5] and compare the result to the two polynomials you obtained earlier. Use Matlab spline for this part.
3. (25 points) (Problem from “Fundamentals of Engineering Numerical Analysis”) The concentration of a certain toxin in a system of lakes downwind of an industrial area has been monitored very accurately at intervals from 1978 to 1992 as shown in the table below. It is believed that the concentration has varied smoothly between these data
Year Toxin Concentration 1978 12.0
1980 12.7
1982 13.0
1984 15.2 1986 18.2 1988 19.8 1990 24.1 1992 28.1 1994 ???
(a) Interpolate the data with the Lagrange polynomial. Plot the polynomial and the data points. Use the polynomial to predict the condition of the lakes in 1994 (extrapolation). Discuss this prediction.
(b) Use Matlab spline to find the toxin concentration in 1994 and compare with the Lagrange extrapolation.
(c) Interpolation may also be used to fill holes in the data. Say the data from 1982 and 1984 disappeared. Predict these values using the Lagrange polynomial and Matlab spline fitted through the other known data points.
4. (25 points) In this problem you will explore a construction of a quadratic spline. The concept and development process is similar to that of a cubic spline, except the inter- polating polynomial is piecewise quadratic (parabola). This means,
Sj′(x)=linear, j=0,1,...,n−1 Sj(x)=quadratic, j=0,1,...,n−1
The quadratic spline is of the form:
Sj(x)=aj +bj(x−xj)+cj(x−xj)2, xj ≤x≤xj+1 (1)
and hj = xj+1 − xj
Below are two additional conditions imposed on each spline:
Sj (xj ) = yj must pass thru interpolating point, xj (2)
Sj(xj+1) = Sj+1(xj+1) continuity of S (3)
S′ (x ) = S′ (x ) continuity of slope S′ (4) j j+1 j+1 j+1
Follow the same procedure for cubic spline presented in class to construct the quadratic spline. Note the following.
points.
(a) Combine Eq. (1) with the 3 conditions (2) through (4) to establish an equation forbj,j=1,2,3,...,n−1. Hint: youwillgetarecursiverelationshipforbj and not a linear tridiagonal system as in equation for cj in cubic spline.
(b) Recall that, for the cubic spline, you need to select the end-conditions for S′′(x ) j0
and S′′(x ) (e.g., free run-out, parabolic run-out, ...). Thus for the quadratic
′
5. (15 points) This problem is to be fully hand calculated (not Matlab). Make sure you show all you work, don’t just guess.
(a) Perform Gauss elimination on the following linear system
2x1 −3x2 +3x3 = 2, 3x1 + 3x2 + 9x3 =15, 3x1 + 3x2 + 5x3 =11.
(b) Compute the LU factorization of the matrix in part (a) from your hand calcula- tion. Then compare with the L and U matrices given by the Matlab command: [L,U,P] = lu(A). Explain the difference.

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.