hmwk_4_2010_solutions_rev

hmwk_4_2010_solutions_rev - CE 30125 Computational Methods:...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: CE 30125 Computational Methods: Assignment 4 KEY Provided courtesy of Jake T. Lussier November 1, 2010 Problem 1 For this problem we develop a Hermite interpolating polynomial which utilizes all the available data points and the corresponding functional and/or derivative values shown in Table 1. i x i f(x i ) f (1) (x i ) 1.5 119.6460-31.7500 1 2.5 No data-76.0000 2 6.0-74.6040 No data Table 1: Data points and the corresponding functional and/or derivative values. Given this tabulated data, we note that p = 1 and N + 1 = 3. Therefore, if we had complete data for these points, we would impose (1+1)(3) = 6 constraint equations to match the function and its derivative at three data points. However, since we are missing f(x 1 ) and f (1) (x 2 ), we have the four following constraint equations: g ( x ) = f g ( x 2 ) = f 2 g (1) ( x ) = f (1) g (1) ( x 1 ) = f (1) 1 Therefore we require a 3rd degree polynomial. g ( x ) = a + a 1 x + a 2 x 2 + a 3 x 3 g (1) ( x ) = a 1 + 2 a 2 x + 3 a 3 x 2 Application of constraints: g (1 . 5) = f = 119 . 6460 = a + 1 . 5 a 1 + 2 . 25 a 2 + 3 . 375 a 3 g (6 . 0) = f 2 = - 74 . 6040 = a + 6 . a 1 + 36 . a 2 + 216 . a 3 g (1) (1 . 5) = f (1) = - 31 . 7500 = a 1 + 3 . a 2 + 6 . 75 a 3 g (1) (2 . 5) = f (1) 1 = - 76 . 0000 = a 1 + 5 . a 2 + 18 . 75 a 3 Constraint equations may be written in matrix form AX = B. 1 1 . 5 2 . 25 3 . 375 1 6 . 0 36 . 0 216 . 1 3 . 6 . 75 1 5 . 18 . 75 a a 1 a 2 a 3 = 119 . 6460- 74 . 6040- 31 . 7500- 76 . 0000 1 Calculating inv(A) * B in Matlab to solve for X yields the following solution: a = 73 . 4168 a 1 = 108 . 0799 a 2 =- 61 . 3009 a 3 = 6 . 5293 So our final Hermite interpolating polynomial is g ( x ) = 73 . 4168 + 108 . 0799 x +- 61 . 3009 x 2 + 6 . 5293 x 3 2 Problem 2 For this problem, we have the functional values and first derivatives (shown below) for three points (h, 2h, and 3h). f ( h ) = f f (1) ( h ) = f (1) f (2 h ) = f 1 f (1) (2 h ) = f (1) 1 f (3 h ) = f 2 f (1) (3 h ) = f (1) 2 With this data, we first note that p = 1 and N + 1 = 3. We therefore require (1+1)(3) = 6 constraint equations to match the function and its derivative at three data points. This simply means that our interpolation function g(x) must equal f(x) and f (1) (x) at the points above. More specifically, we have the following constraints: g ( h ) = f g (1) ( h ) = f (1) g (2 h ) = f 1 g (1) (2 h ) = f (1) 1 g (3 h ) = f 2 g (1) (3 h ) = f (1) 2 6 constraints requires a 5th degree polynomial of the following form:...
View Full Document

This note was uploaded on 03/02/2012 for the course CE 30125 taught by Professor Westerink,j during the Fall '08 term at Notre Dame.

Page1 / 8

hmwk_4_2010_solutions_rev - CE 30125 Computational Methods:...

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

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