Solution to HW6 - Solution to HW#6 EGM6341 Spring 2009 1....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Solution to HW#6 EGM6341 Spring 2009 1. #28a. Find a polynomial p(x) of degree 2 that satisfies p(x 0 )= y 0 , p (x 0 )=y 0 , p (x 1 )=y 1 Given a formula in the form of p(x) = y 0 l 0 (x) + y 0 l 1 (x) + y 1 l 2 (x). Solution: For the suggested p(x), it is seen that p(x 0 )= y 0 => l 0 (x 0 ) = 1 , l 1 (x 0 ) = 0 , and l 2 (x 0 ) =0 ; p (x 0 )=y 0 => l 0 (x 0 ) = 0 , l 1 (x 0 ) = 1 , and l 2 (x 0 ) = 0 ; p (x 1 )=y 1 => l 0 (x 1 ) = 0 , l 1 (x 1 ) = 0 , and l 2 (x 1 ) = 1 . At any interval, l i (x j ) = l i (x j ) = 0 => l i (x)= c i (x-x j ) 2 => l 2 (x)= c 2 (x-x 0 ) 2 Furthermore, l 2 (x 1 ) = 1 => c 2 =1/[2(x 1 -x 0 )] For polynomials of degree 2, there can only one place where p (x)=0. If there are two places where p (x)=0, which is the case for l 1 (x), the polynomial must be a constant. Thus, l 0 (x) =1 . For l 1 (x), l 1 (x 1 ) = 0 => l 1 (x) = a(x - x 1 ) 2 +b (line of symmetry of the parabola at x= x 1 ). l 1 (x 0 ) = 0 => a(x 0 - x 1 ) 2 +b=0 l 1 (x 0 ) = 1 => 2a(x 0 - x 1 )=1 => a= -1/[2(x 1 - x 0 )], b=(x 1 - x 0 )/2 => l 1 (x) = -(x - x 1 ) 2 /[2(x 1 - x 0 )] + (x 1 - x 0 )/2 Finally, p(x) = y 0 + y 0 { -(x - x 1 ) 2 /[2(x 1 - x 0 )] + (x 1 - x 0 )/2 }+ y 1 (x-x 0 ) 2 /[2(x 1 - x 0 )] 2. p185-194 #35 “not-a-knot” condition for cubic spline Solution: a) Given: i x y h i y[1] 0 0 1.4 1 -0.8 1 1 0.6 1 0.4 2 2 1 0.5 -0.7 3 2.5 0.65 0.5 -0.1 4 3 0.6 1 0.4 5 4 1 * General equation:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/23/2009 for the course EGM 6341 taught by Professor Mei during the Spring '09 term at University of Florida.

Page1 / 7

Solution to HW6 - Solution to HW#6 EGM6341 Spring 2009 1....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online