Assignments Answer Keys - DEPARTMENT OF CHEMICAL MATERIALS...

  • University of Alberta
  • CHE 374
  • Homework Help
  • AmanS18
  • 19
  • 100% (8) 8 out of 8 people found this document helpful

This preview shows page 1 - 6 out of 19 pages.

DEPARTMENT OF CHEMICAL & MATERIALS ENGINEERING CH E 374 – Computational Methods in Engineering Fall 2015 Assignment # 1 A SAMPLE SOLUTION Solve the following problems by hand. When needed, use a calculator! 1. Use zero, first, second and third order Taylor series expansion to estimate the value of a function at x =2 if the function is given by: 3 2 ( ) 20 8 5 44 f x x x x = + (1.1) Calculate the true percent relative error for each iteration using a base point at xi = 1. =
1
DEPARTMENT OF CHEMICAL & MATERIALS ENGINEERING CH E 374 – Computational Methods in Engineering Fall 2015 Assignment # 1 A SAMPLE SOLUTION 3 rd Order ( ) 120 f x ′′′ = 3 (1) 120 1 94 94 (2) 74 120 94 100 0% 6 94 f f ′′′ = + = × = {third order gives exact answer because the polynomial is also of the same order (third order) !!} 2. The Maclaurin series expansion of 𝑆𝑆𝑆𝑆𝑆𝑆 ( 𝑥𝑥 ) is: ( ) 3 5 7 Sin x 3! 5! 7! x x x x = + +… (1.2) Starting with the simplest version, 𝑆𝑆𝑆𝑆𝑆𝑆 ( 𝑥𝑥 ) = 𝑥𝑥 , add terms one at a time to estimate ( ) / 4 Sin π . After each new term is added, compute the true error and percent relative error. Add terms until the absolute value of the error estimate falls below an error criterion conforming to two significant figures. Solution Using Scaborough’s definition, the stopping criterion to n significant figures is given as: 2 0.5 10 0.5 10 0.005 0.5% n s ε = × = × = = The true value of ( / 4) 0.77107... Sin π = 2
DEPARTMENT OF CHEMICAL & MATERIALS ENGINEERING CH E 374 – Computational Methods in Engineering Fall 2015 Assignment # 1 A SAMPLE SOLUTION 3
DEPARTMENT OF CHEMICAL & MATERIALS ENGINEERING CH E 374 – Computational Methods in Engineering Fall 2015 Assignment # 1 A SAMPLE SOLUTION 3. The following infinite series can be used to approximate 𝑒𝑒 𝑥𝑥 : 2 3 1 .... 2 3! ! n x x x x e x n = + + + + + (1.3) (a) Show that this Maclaurin series expansion is a special case of Taylor expansion with 0 i x = and h x = . (b) Use Taylor series to estimate 1 ( ) 1 x i f x e at x + = for 0.25 i x = . Employ zero-, first-, second- and third- order approximations and compute the absolute error, x E for each case. solution a) For this case 0 i x and h x = Thus, the Taylor series is 2 3 (0) (0) ( ) (0) (0) ... 2! 3! f f f x f f x x ′′ ′′′ = + + + + For the exponential function, (0) (0) (0) (0) 1 f f f f ′′ ′′′ = = Substituting these values yields, 2 3 1 1 ( ) 1 ... 2! 3! f x x x x = + + + + Which is the Maclaurin series expansion. b) The true value is 1 0.367879 e = and the step size is 1 1 0.25 0.75 i i h x x + = = − = . The complete Taylor series expansion to the third-order term is 2 3 1 ( ) 2 3! i i i i x x x x i h h f x e e h e e + = + Zero-order approximation 0.25 (1) 0.778801 0.367879 0.778801 100% 111.7% 0.367879 t f e e = = = = First –order approximation (1) 0.778801 0.778801(0.75) 0.1947 0.367879 0.1947 100% 47.1% 0.367879 t f e = = = = Second order approximation 2 0.75 (1) 0.778801 0.778801(0.75) 0.778801 0.413738 2 0.367879 0.413738 100% 12.5% 0.367879 t f e = + = = = 4
DEPARTMENT OF CHEMICAL & MATERIALS ENGINEERING CH E 374 – Computational Methods in Engineering Fall 2015

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture