# 2011WT2final.pdf - 1 University of British Columbia Math...

• Test Prep
• 14
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 1 - 5 out of 14 pages.

1 University of British Columbia Math 307, Final April 23, 2012 3.30-6.00pm Name: Student Number: Signature: Instructor: Instructions: 1. No notes, books or calculators are allowed. A MATLAB/Octave formula sheet is provided. 2. Read the questions carefully and make sure you provide all the information that is asked for in the question. 3. Show all your work. Answers without any explanation or without the correct accompanying work could receive no credit, even if they are correct. 4. Answer the questions in the space provided. Continue on the back of the page if necessary. Question Mark Maximum 1 12 2 12 3 12 4 16 5 12 6 16 7 12 8 8 Total 100
2 1. Suppose you are given a set ofNdata points (xn, yn), withxnincreasing, and you wish to interpolatethese points with a spline functionf, wheref(x) is given by a cubic polynomialpn(x) on each interval(xn, xn+1), forn= 1, . . . , N-1:pn(x) =an(x-xn)3+bn(x-xn)2+cn(x-xn) +dn.[3](a) Write down the equations required forf(x) to be continuous and to pass through the data points.How many equations does this provide? (b) Write down the equations required forf(x) to have continuous first and second derivatives. Howmany equations does this provide?
3 [2] (c) Now supposey1=yNand you wish the spline to beperiodic, which means adding the twoconditionsf0(x1) =f0(xN) andf00(x1) =f00(xN).Write down the two equations required forthese conditions. (d) Write down the matrix equation to be solved for the coefficients of the polynomials in the caseN= 3, withx1= 1,x2= 2,x3= 3.
4 2. Suppose that you want to solve the boundary value problemf00(x)-x2f(x) = 10x1,f(0) = 1,f(1) = 1.LetF= [f0, f1, . . . , fN]Tbe the finite dierence approximation to the solutionf(x) at uniformly spacedpointsx0, x1, . . . , xN.[2](a) Write down finite dierence approximation tof00(x) at an interior pointxi.