{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exam3_sol

# exam3_sol - (c The cubic spline through the four points...

This preview shows page 1. Sign up to view the full content.

CE 335 Exam 3 Solutions 1] (a) The function v = aP b can be transformed to make it linear in the unknown parameters log(a) and b: log(v) = log(a) + b log(P). The coefficient matrix X of the linearized problem has ones in the first column and log(P i ) in the second column, and the right-hand side column vector y has entries log(v i ). With this notation, the system of normal equations can be written as X T Xz = X T y , where the elements of the vector z are the unknown parameters log(a) and b. Written out, the system is 4 log(a) - 7.71 b = -1.05 -7.71 log(a) + 35.19 b = 3.64 (b) P = [0.01 0.03 0.5 3]'; v = [0.62 0.68 0.85 0.98]'; X = [ones(4, 1) log(P)]; y = log(v); z = X \ y; a = exp(z(1)); b = z(2); 2] (a) Newton form of the interpolating polynomial is (using t = T - 294 for simplicity) r(t) = 2 + t - t(t - 1)/4 + t(t - 1)(t - 2)/12 at T = 295.5, t = 1.5 and r(t) = 2 + 1.5 - 1.5/8 - 1.5/48 = 3.28 (b) t = 0:3; r = [2 3 3.5 4]; p = polyfit(t, r, 3); r_find = polyval(p, 1.5);
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (c) The cubic spline through the four points will have three segments, each different cubic polynomials and in general not the same as the interpolating cubic polynomial through the four points. With not-a-knot end conditions, the first and second and second and third segments will have the same cubic polynomial, so all three segments will have a single cubic polynomial. Because this polynomial interpolates all four points and the interpolating cubic polynomial is unique, this must be the same as the interpolating polynomial. 3] (a) f(0) = 0, f(2.5) = 0.794, f(5) = 0.893, f(7.5) = 0.935, f(10) = 0.958 composite trapezoid rule with 2 segments: T 2 = 10 * (f(0) + 2f(5) + f(10)) / 4 = 6.86 composite trapezoid rule with 4 segments: T 4 = 10 * (f(0) + 2f(2.5) + 2f(5) + 2f(7.5) + f(10)) / 8 = 7.75 (b) We can combine T 2 and T 4 to cancel out the lowest-order error term (Romberg integration): T = (4T 4 - T 2 )/3 = 8.05...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern