PGE 310 - HW9 - Solution

# PGE 310 - HW9 - Solution - The University of Texas at...

This preview shows pages 1–3. Sign up to view the full content.

1 The University of Texas at Austin PGE 310: Formulation and Solution in Geosystems Engineering Homework #9: Spline Interpolation and Numerical Integration By Hossein Roodi 1. Cubic Splines Interpolation: (By HAND and PLOTTING IN MATLAB) Thermal stratification of a reactor is shown in the below table.    10 13 22 55 70 ) ( 5 . 2 2 5 . 1 1 5 . 0 ) ( C in e Temperatur T m in depth z a) Use cubic spline to find Temperature as a function of Depth. Note that you need to find 4 functions for the four intervals between the data points. You can use backslash operator of MATLAB to solve system of equations. Step 1: System of Equations for deriving Second Derivative of the midpoints There are 5 points, so a system 3 eqns 3 unknowns will be derived in Cubic Spline Solution )] ( ) ( [ 6 )] ( ) ( [ 6 ) ( ) ( ) ( ) ( 2 ) ( ) ( 1 1 1 2 1 2 2 1 2 1 2 1 i i i i i i i i i i i i i i i i i x f x f x x x f x f x x x f x x x f x x x f x x For points 1, 2, and 3: 216 ] 70 55 [ 12 ] 55 22 [ 12 ) 5 . 1 ( 5 . 0 ) 1 ( 2 ) 5 . 0 ( 5 . 0 )] 5 . 0 ( ) 1 ( [ 5 . 0 1 6 )] 1 ( ) 5 . 1 ( [ 1 5 . 1 6 ) 5 . 1 ( ) 1 5 . 1 ( ) 1 ( ) 5 . 0 5 . 1 ( 2 ) 5 . 0 ( ) 5 . 0 1 ( f f f f f f f f f f For points 2, 3 and 4: 288 ] 55 22 [ 12 ] 22 13 [ 12 ) 2 ( 5 . 0 ) 5 . 1 ( 2 ) 1 ( 5 . 0 )] 1 ( ) 5 . 1 ( [ 1 5 . 1 6 )] 5 . 1 ( ) 2 ( [ 5 . 1 2 6 ) 2 ( ) 5 . 1 2 ( ) 5 . 1 ( ) 1 2 ( 2 ) 1 ( ) 1 5 . 1 ( f f f f f f f f f f For points 3,4 and 5: 72 ] 22 13 [ 12 ] 13 10 [ 12 ) 5 . 2 ( 5 . 0 ) 2 ( 2 ) 5 . 1 ( 5 . 0 )] 5 . 1 ( ) 2 ( [ 5 . 1 2 6 )] 2 ( ) 5 . 2 ( [ 2 5 . 2 6 ) 5 . 2 ( ) 2 5 . 2 ( ) 2 ( ) 5 . 1 5 . 2 ( 2 ) 5 . 1 ( ) 5 . 1 2 ( f f f f f f f f f f And also: 0 ) 5 . 2 ( 0 ) 5 . 0 ( f f So, the system of equations is:  72 288 216 ) 2 ( ) 5 . 1 ( ) 1 ( 2 5 . 0 0 5 . 0 2 5 . 0 0 5 . 0 2 f f f Using the backslash operator of MATLAB, the solution will be: 2857 . 10 1429 . 185 2857 . 154 ) 2 ( ) 5 . 1 ( ) 1 ( f f f

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

View Full Document
2 Step 2: Using the result of Step 1 to determine cubic spline functions at each interval The formulation of cubic functions at each interval will be: ) ]( 6 ) )( ( ) ( [ ) ]( 6 ) )( ( ) ( [ ) ( ) ( 6 ) ( ) ( ) ( 6 ) ( ) ( 1 1 1 1 1 1 1 3 1 1 3 1 1 i i i i i i i i i i i i i i i i i i i i i i i x x x x x f x x x f x x x x x f x x x f x x x x x f x x x x x f x f There will be 4 functions for the four intervals between the points: f1(x)for interval between points 1, 2: ) 5 . 0 ( 9021 . 122 ) 1 ( 140 ) 5 . 0 ( 4286 . 51 ) ( ) 5 . 0 ]( 6 ) 5 . 0 ( 2857 . 154 5 . 0
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/13/2012 for the course PGE 310 taught by Professor Klaus during the Spring '06 term at University of Texas at Austin.

### Page1 / 9

PGE 310 - HW9 - Solution - The University of Texas at...

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

View Full Document
Ask a homework question - tutors are online