Assignment/Exercises EQT 203 Sem 2 2014/2015 *make sure write your name, program code USE 4 DECIMAL PLACES IN ALL CALCULATIONS. 1. Find all the numerical solutions of equation f x 0 in interval [a,b] by using bisection method. Stop iteration when f ci 0.001. a. f x x2 e x 5 , [1,2] Answer: 1.2411 b. f x e x x 2 , [2,3] Answer: 2.1199 2. Find the root of equation x3 2 x 2 3x 1 0 in interval [-1,0] by using secant method. Stop iteration when f ci 0.001. Answer: -0.2864. 3. Solve the equation f x x4 2 x3 x 1 in interval [0,1] by using Newton-Raphson method. Stop iteration when f ci 0.001. Answer: 0.5573 4. Determine the root of equation f x x cos 2x in interval [0,1] by using fixed point iteration method. Stop iteration when f ci 0.001. Answer: 0.5149 5. Construct the polynomial interpolation for the given data using Lagrange’s interpolation: (1,1), (0,1), (1,2). Verify your answer using Newton divided difference formula. 6. The following table lists the population of Malaysia from 2000 – 2010. Year, x 2000 2005 2010 Population (millions), y 23.5 26.5 28.3 Use Lagrange's interpolation formula to find the interpolating polynomial y. Estimate the population in 2015. Verify your answer using Newton divided difference formula. 7. The following table gives the data for steam pressure P vs temperature T: T 360 365 373 383 390 P 154 165 190 210 240 Compute the pressure at T=375 using Newton divided difference formula. 8. Use least-square line method (y=a+bx) to form the equation that best fits the data point below. x 358 363 371 380 388 y 156 168 188 215 250 9. Use the following data to construct the polynomial regression. x 9.2 9.9 10.5 10.8 11.2 y=f(x) 11.5 12.3 14.6 16.8 21.7 10. Calculate the first derivative for the function f x x2 3x 1 at point x 8.5 numerically for the given points, x=7.9, x=8.1, x = 8.3, x = 8.5, x=8.7, x=8.9 and x = 9.1 by using a. Two-point central formula b. Three-point forward formula c. Four point central formula Determine the best methods by comparing the percentage of relative error between the numerical results with the exact solution. 11. Determine f x for the function f x xe x at x 2 numerically with h=0.2 by using a. Three-point backward formula b. Four-point backward formula c. Five-point central formula Compare the results with the exact solution. Hence, determine the best methods which produce the most accurate approximate solutions. 2 12. Solve the integral xe x dx using h 0.1 the following numerical integration methods: 1 a. Rectangular rule b. Trapezoidal rule c. Simpson’s rule Find the exact solution. Hence, determine which the best numerical approach in solving the given integral above. 2 13. Calculate the integral 2 x sin 2 x dx using five subintervals using the following 0 numerical integration methods: a. Rectangular rule b. Trapezoidal rule c. Simpson’s rule Take 3.142 to start the calculation. 14. Consider the following initial value problem, y xy y, y 1 1 . Solve the problem above using Euler’s method with h = 0.2 to approximate the solution at x = 2 in tabular form. 15. Consider the following initial value problem: dy x 2 y, y 0 1 dx Solve the problem above using Euler’s method with h = 0.5 to approximate the solution at x = 1. dy x y passing through (1, 1). Approximate the value of y for x = 1(0.5)1.5 dx using the 4th order Runge-Kutta method. 16. Given 17. Use the finite difference method to calculate the temperature distribution of the following initial-boundary value problem for the heat equation only for t 0.001 . Take t 0.001 and x 0.1 . u 2u t x 2 0 x 1, t 0 u 0, t u 1, t 0 , t0 u x,0 2 x1 x Answer u1,1 u9,1 0.088 , u2,1 u8,1 0.158 , u3,1 u7,1 0.208 , u4,1 u6,1 0.238 , u5,1 u7,1 0.248 18. Find the temperature distribution of the following initial-boundary value problem for the heat equation up to t=0.02 using the finite difference method. Take ∆t=0.01 and ∆x=0.2. u 2u 2 2 0 x 1, t 0 t x t0 u 0, t u 1, t 0 , u x,0 2 x1 x Answer u1,0 u4,0 0.32 , u2,0 u3,0 0.48 u1,1 u4,1 0.4 , u2,1 u3,1 0.64 , u2,2 u3,2 0.84 u1,2 u4,2 0.52 ,