Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 1 Introduction • The solutions of engineering problems can be obtained using analytical methods or numerical methods. • Analytical differentiation and integration provide a closedform derivative and integral, respectively, only for simple functions. • Very often analytical solutions cannot be obtained. • Numerical methods can be used where analytical methods are not capable of or practical for providing solutions. 1- 1 The procedure for solving a problem 1. 2. 3. 4. 5. Identify the problem State the objectives Develop alternative solutions Evaluate the alternatives Implement the best alternative 1- 2 Analytical VS Numerical Analysis • To find minimum of y x 2 3x 2 • Analytical: after differentiate 2x-3 the minimum solution occurs at x = 1.5 • Numerical: define the interval from 1 to 2 increment of 0.2, min falls in 1.4 < x < 1.6 x y 1.0 0 1.2 1.4 1.6 1.8 2.0 -0.16 -0.24 -0.24 -0.16 0 To improve the accuracy, we can search in 1.4 < x < 1.6 with a small increment, such as 0.04. 1- 3 Analytical VS Numerical Analysis • Analytical techniques provide a direct solution and will result in exact solution if one exists. • Analytical methods are practical only for functions that have a simple, closed-form mathematical structure. • Numerical methods can be used with any function. They often require many iterations to get the true solution. • The numerical solution usually is not exact, and it is also necessary to provide initial estimates of the unknowns. 1- 4 Taylor Series Taylor series h2 ( 2) h 3 ( 3) f ( x0 h ) f ( x0 ) hf ( x0 ) f ( x0 ) f ( x0 ) 2! 3! (h n ) ( n ) ... f ( x0 ) Rn 1 n! (1) where Rn 1 is the remainder. or hk (k ) f ( x0 h) f ( x0 ) k 0 k! First-order approximation Second-order approximation Third-order approximation f ( x0 h) f ( x0 ) hf (1) ( x0 ) f ( x0 h) f ( x0 ) hf f ( x0 h) f ( x0 ) hf (1) (1) h 2 ( 2) ( x0 ) f ( x0 ) 2! h 2 ( 2) h 3 ( 3) ( x0 ) f ( x0 ) f ( x0 ) 2! 3! 1- 5 Taylor Series Expansion • The importance of the individual terms of the Taylor series depends on the nature of the function and the distance h. The higher-order terms become more important as the nonlinearity of the function increases and the difference h = x x0 increases. • If the function is linear, only the term with the first derivative is necessary. • The error increases as fewer terms of the Taylor series are included. 1- 6 Example: Nonlinear Polynomials 4th-order polynomial f ( x) 1 4 1 3 1 2 1 x x x x2 8 6 2 2 f (1) ( x) 0.5x3 0.5x 2 x 0.5 f ( 2) ( x) 1.5x 2 x 1 f ( 3) ( x ) 3 x 1 f ( 4 ) ( x) 3 f ( 5 ) ( x) 0 f ( x) 1.95833 f (1) ( x) 0.5 For a base point x0= 1.0 distance h = 0.5 f ( 2 ) ( x) 1.5 f ( 3) ( x ) 2 f ( 4 ) ( x) 3 f ( 5) ( x) 0 1- 7 Part x h a. Individual 1.5 0.5 terms 2.0 1.0 2.5 1.5 3.0 2.0 3.5 2.5 4.0 3.0 b. Cumulative 1.5 function 2.0 2.5 3.0 3.5 4.0 c. Errors 1.5 2.0 2.5 3.0 3.5 4.0 hf (1) ( x0 ) h 2 ( 2) f ( x0 ) 2! h 3 ( 3) f ( x0 ) 3! h 4 ( 4) f ( x0 ) 4! 0.25 0.50 0.75 1.00 1.25 1.50 0.1875 0.7500 1.6875 3.0000 4.6875 6.7500 0.04167 0.33333 1.12500 2.66667 5.20833 9.00000 0.0078125 0.1250000 0.6328125 2.0000000 4.8828125 10.1250000 2.20833 2.45833 2.70833 2.95833 3.20833 3.45833 2.39583 3.20833 4.39538 5.95833 7.89583 10.20833 2.43750 3.54167 5.52083 8.62500 13.10417 19.20833 2.44531 3.66667 6.15365 10.62500 17.98698 29.33333 -0.23698 -1.20833 -3.44531 -7.66667 -14.77865 -25.87500 -0.04948 -0.45833 -1.75781 -4.66667 -10.09115 -19.12500 -0.00781 -0.12500 -0.63281 -2.00000 -4.88281 -10.12500 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 1- 8 1- 9 Taylor Series Expansion of the Square Root The square-root function can be expressed as f ( x) x f (1) ( x) 1 0.5 x 2 f ( 2) 1 1.5 ( x) x 4 f ( 3) 3 2.5 ( x) x 8 For a base point x0 = 1 and h = 0.001 1 (0.001) 2 (1) 1.5 4(2!) 3 (0.001) 3 (1) 2.5 8(3!) f (1.001) 1.001 1 0.5(0.001)(1) 0.5 1 0.5 103 0.125 106 0.625 1010 1.0004999 1- 10 Example Taylor Series 2 3 k k x x x x e x 1 x ... ... 2! 3! k! k 0 k! k ( x 1)2 ( x 1)3 k 1 ( x 1) ln( x ) ( x 1) ... ( 1) 2 3 k k 1 for 0 x 2 1 2 3 1 x x x ... x k 1 x k 0 1- 11 Example Taylor Series 3 5 2 k 1 x x x k sin( x) x ... (1) 3! 5! (2k 1)! k 0 2k x2 x4 x k cos( x) 1 ... (1) 2! 4! (2k )! k 0 1- 12