2011WT2final.solutions - 1 University of British Columbia...

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.[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.
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 difference approximation to the solutionf(x) at uniformly spacedpointsx0, x1, . . . , xN.[2](a) Write down finite difference approximation tof00(x) at an interior pointxi.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture