Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Taylor Series and Numerical Differentiation - Homework 1 | ME 428, Study notes of Mechanical Engineering

Homework 1 Material Type: Notes; Professor: Aggarwal; Class: Numerical Methods in Mechanical Engineering; Subject: Mechanical Engineering; University: University of Illinois - Chicago; Term: Fall 2012;

Typology: Study notes

2011/2012

Uploaded on 10/07/2012

chess383
chess383 ๐Ÿ‡บ๐Ÿ‡ธ

5

(1)

2 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical* Methods* in* Mechanical* Eng.* (ME* 428)* Fall* 2012!!!!!!!!!Professor* Suresh* Aggarwal!
1/-11- Page Solved by Gi-Hwan John Lee (Ji-Hwan John Lee) (UIN: 658003622) TA!
CHAPTER 4 Taylor Series and Numerical Differentiation
Problem 1: Consider the function f(x) = esinx. Using the Taylor series expansion about x = 0,
evaluate the function to O(h2) and O(h4). Plot the TE as a function of h for both the cases.
Take h from 0.1 to 0.4.
The given function f(x) is
(1)
To plot the TE as a function of h, the Taylor series expansion can be written as
(2)
The derivatives are evaluated as
(3-1)
(3-2)
(3-3)
(3-4)
Since โ€˜ โ€™ and โ€˜ โ€™
, , , , and
(4)
Therefore, the Taylor series for f(x) is
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Taylor Series and Numerical Differentiation - Homework 1 | ME 428 and more Study notes Mechanical Engineering in PDF only on Docsity!

CHAPTER 4 Taylor Series and Numerical Differentiation

Problem 1 : Consider the function f ( x ) = e sin x. Using the Taylor series expansion about x = 0, evaluate the function to O ( h 2 ) and O ( h 4 ). Plot the TE as a function of h for both the cases. Take h from 0.1 to 0.4. The given function f ( x ) is (1) To plot the TE as a function of h , the Taylor series expansion can be written as (2) The derivatives are evaluated as (3-1) (3-2) (3-3) (3-4) Since โ€˜ โ€™ and โ€˜ โ€™ , , , , and (^) (4) Therefore, the Taylor series for f ( x ) is

Thus, from Equations (2), (3), (4) and (5), the Taylor series expansion about x = 0 can be written as: i) For O ( h 2 ) ๏ƒŸ Answer ii) For O ( h 4 ) ๏ƒŸ Answer And the TE from Equation (2) can be written as i) For O ( h 2 ) ๏ƒŸ Answer ii) For O ( h 4 ) ๏ƒŸ Answer With xi = 0 and h = 0.1 ~ 0.4, we can calculate the TE as shown in Table 1 and 2. Table 1 The Taylor series expansion values and (TE)ex as function of h h Exact for O ( h 2 ) (TE)ex for O ( h 4 ) (TE)ex h = 0.1 (^1) 1.1 โ€“ 0.1 1.105 โ€“ 0. h = 0.2 (^1) 1.2 โ€“ 0.2 1.22 โ€“ 0. h = 0.3 (^1) 1.3 โ€“ 0.3 1.345 โ€“ 0.

Problem 2 : 4 .5. The pressure p of a gas is given by the expression log p = 21.6 โ€“ 2420/ T , where T is the temperature in kelvins. Using the exact value of p from this expression, at T = 400 K, and the Taylor series expansion for p ( T ), compute the pressures at 410, 420, and 450 K. Compare these values with the exact ones obtained from the given expression. The given relation between p and T is (1) The Equation (1) can be written as follows: (2) The Equation (2) can be written as (3) where and (^) (4) From the Equation (1), the exact value of p from this expression at T = 400 K is (5) Then, the Taylor series expansion for p ( T ) is given by (6) Now , and so on, can be obtained by as

From the above equations, p can be calculated at 410, 420, and 450 K. (See the Table 1 )

Central differencing formulas O [(ฮ” x ) 2 ]: For the first derivative (2-1) For the second derivative (2-2) I. The first and second derivatives of sin x at x = 0 are and (3) Using above equations, the first and second derivatives at x =0 can be calculated (See Table 1 ) Table 1- 1 Forward difference approximations: O [(ฮ” x )^2 ] Numerical Exact TE ฮ” x (^) (at xf i = 0) fi +1 fi +2 fi +3 f' f" f' f" f' f"

  1. 2 0 0.1987 0.38942 0.5646 1.0132 โ€“ 0.0079 1 0 โ€“ 0.01315 0. 0 .1 0 0.0998 0.19867 0.2955 1.0033 โ€“ 0.001 1 0 โ€“ 0.00332 0. 0.01 0 0. 010000 0.02 0.02999 1.00003 โ€“ 0.000001 1 0 โ€“ 0.000033 0. Table 1- 2 Central difference approximations O [(ฮ” x ) 2 ] Numerical Exact TE ฮ” x (^) (at xf i = 0) fi +1 fi โ€“ 1 f' f" f' f" f' f"
  2. 2 0 0.19867 โ€“ 0.19867 0.9933 5 0 1 0 0.00665 0 0 .1 0 0.09983 โ€“ 0.09983 0.99833 0 1 0 0.00167 0 0.01 0 0.010000 โ€“ 0.010000 0.99998 0 1 0 0.00002 0 II.

The first and second derivatives of sin x at x = 0 can be written as and (^) (4) From Equations (1), (2) and (4), the first and second derivatives at x = 0 can be calculated (See Table 2 ) Table 2- 1 Forward difference approximations: O [(ฮ” x )^2 ] Numerical Exact TE ฮ” x (^) (at xf i = 0) fi +1 fi +2 fi +3 f' f" f' f" f' f"

  1. 2 1 1.22140 1.4918 3 1.82213 0.98447 0.9541 6 1 1 0.01553 0.0458 5 0 .1 1 1.10517 1.22140 1.3498 6 0.9964 1 0.98976 1 1 0.0035 59 0.0102 4 0.01 1 1. 01005 1.02020 1.0304 6 0.99997 0.9999 1 1 1 0.000034 0. Table 2- 2 Central difference approximations: O [(ฮ” x )^2 ] Numerical Exact TE ฮ” x (^) (at xf i = 0) fi +1 fi โ€“ 1 f' f" f' f" f' f"
  2. 2 1 1.221403 0.818731 1.006680 1.003338 1 1 โ€“ 0.006680 โ€“ 0. 0 .1 1 1.105171 0.904837 1.001668 1.000834 1 1 โ€“ 0.001668 โ€“ 0. 0.01 1 1. 010050 0.990050 1.000017 1.000008 1 1 โ€“ 0.000017 โ€“ 0. As expected, the accuracy improves as the step size (ฮ” x ) decreases. Moreover, the central differencing yields more accurate results, as compared to forward differencing. Problem 4 : 4 .12. The measured temperature distribution in a solar energy heating system may be represented by the equation where x is the distance away from the surface being heated and T is the temperature. Compute the temperature gradient dT / dx and the second derivative d^2 T / dx^2 at x = 0. The heat transfer rate is proportional to the temperature gradient at x = 0. The second derivative

Problem 5 : 4 .17. The hot-wire anemometer is an instrument used for measuring velocities or temperatures. If, during its calibration, the output signal E is measured as 0, 1.7, 3.3, and 5.6 volts at velocities V of 0, 1, 1.5, and 2 m/s, obtain the gradient dE / dV at V = 0 m/s, using the polynomial representation of the function E ( V ). Use the polynomial as (1) From the calibration data ( Table 1 ) Table 1: The hot-wire anemometer calibration data E ( V ) [Volts] V [m/s] 0.0 0. 1.7 1. 3.3 1. 5.6 2. Using equation (1) and Table 1, the polynomial value at V=0 is Thus, (2) Using equations (1) and (2), Thus

Solving equations (3-1) to (3-3) (4) With equations (1), (2), and (4), the polynomial representation is (5) From equation (5), the gradient dE / dV is (6) Note that the truncation error for this approximation is of the order of ( dV ) 3