100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 5 out of 14 pages.
1University of British ColumbiaMath 307, FinalApril 23, 20123.30-6.00pmName: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 thequestion.3. Show all your work. Answers without any explanation or without the correct accompanying work couldreceive no credit, even if they are correct.4. Answer the questions in the space provided. Continue on the back of the page if necessary.QuestionMarkMaximum11221231241651261671288Total100
21. 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.(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(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.
42. 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 di↵erence approximation to the solutionf(x) at uniformly spacedpointsx0, x1, . . . , xN.(a) Write down finite di↵erence approximation tof00(x) at an interior pointxi.