0% found this document useful (0 votes)
36 views10 pages

Exercise Sheets

Uploaded by

Zobia Kainat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
36 views10 pages

Exercise Sheets

Uploaded by

Zobia Kainat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
EXERCISES I FOR MATH 373 Exercise 1: Itis given that the function f(x)=xe*-2 hasarooton [0.85,0.90]. Find this root using secant method with an accuracy of ¢<0.008 check the convergence with absolute rasidual error Exercise 2; a) Seperate the root of the function cosx+1—x=0 b) _ Estimate the root using Bisection method by performing 4 iterations ©) _ Estimate the root using False position method by performing 4 iterations d) Compare the results Exercise 3; Solve the equation Cos x —(x—1)? = 0 for the larger root by Newton method with an accuracy of & < 0.005 check the convergence with absolute successive error Exercise 4: Find the smallest root of function (x-2)'-Inx=0 ‘Using newton method with an accuracy of ¢ < 0.005 check the convergence with absolute residual error. Exercise §: Solve the equation xe* +x? +1=0 by Fixed point iteration method with an accuracy of & < 0.008 check the convergence with absolute successive error. Exercise a) Evaluate 9/25 using Newton method with an accuracy of ¢ < 0.005 check the convergence with absolute residual error. b) Evaluate 4/100 using Newton method with an accuracy of ¢ < 0,005 check the convergence with absolute residual error. Exercise 7: For the functions below estimate the root lying on the intervals given using a) Bisection method b) Secant method c) Newton method d) False position method ¢) Fixed point iteration ‘method with an accuracy of e < 0.005 check the convergence with absolute successive error i) fe) ii) f()=cosx Vx on [0,1] ii) f(9) Exercise 8: Find the root of the equation Iny-S+x=0 using Newton Method. Perform iterations using absolute residual error ¢ < 0.05. inx—In.x on [2,3] 2743x-2 on [1,2] Exercise 9 Find the root of sinx—x—1=0 on [1,2] a) using fixed point iteration method with an accuracy of absolute successive error £50.05 b) using false position method with an accuracy of absolute successive error ¢ < 0.05 ©) using bisection method with an accuracy of absolute successive error ¢ <0.05 4) Compare the results in part b) and ¢) Exercise 10 Use the secant method to find a numerical approximation to. V3. with an absolute successive error 5x10 EXERCISES I FOR MATH 373 Exercise I: Find Lagrange interpolation polynomial P,(x) which agrees with the following data and obtain a Exercise 2: Consider y=cosx over [0,0.8] taking the nodes x, =0 X= 0.2, x, =04 x5 =0.6 and x,=05 Determine the error bounds for the Lagrange polynomials P(x), P,(x) and P,(x). Exercise 3: a) Find a second degree polynomial approximating the function f(x) =Inx, and passing from the points (1, /(1)),(2,f(2)) and (4, f(4)). b) Approximate f(2.5) using the polynomial in part (a) wn ©) use the error formula Ey (x)= we oe (2-0) (2-4 )(¢-2).-(e-2y) to estimate the error at x=2.5 4) Obtain a bound for the uniform error Ex(x) Exercise 4: Use:the Newton divided-difference formula to compute the cubic interpolating Polynomial P,(x) for the funetion f(x) = sin) using interpolation points 9 =0,%, =I, x, =2 and x; =3. What is an upper bound for the error at x=0.5 ? Exercise 5: Given the table of the function f(x)=2" x 0 1 2 3 [7 fey 1 2 4 8 a) Write down the Newton polynomials P;(x), P2(x), P3(x)- b) Estimate £(2.5) by using Px(x). ¢) Obtain a bound for the errors E(x), Ex(x), Ex(x). Exercise 6: Solve the following system of equations by using Jacobi method perform only two iterations and evaluate the residual error at the second iteration (||, ) 2x+8y-z=11 5x-y+z=10 -xty+42=3 x At Be 1 2 | 25 | , | 0.653 0.554 | 0.753 . for the data and calculate £,(P) Exercise 7: Find a curve fit y= P(x) = Exercise 8: Find the eurve fit y= P(x) =(4x+B)? by using the transformation X = x,Y = the data and calculate £,(P) x = 0 1 [2 y 13.45 3.01 0.67 0.15 Exercise 9: a) Use the Newton polynomial to derive a formula for /"(x) based on the points *5x+a,x+5 where a#b are arbitrary real numbers b) Obtain the forword formula /"(x) = Shin as a particular case of the formula obtained im part a) Exercise 10) Derive the numerical differentiation formula using Taylor Series F'%)* 2A) =A FW * F- 2) and define the order of approximation Exereise 11) Solve the following system of equations by using Gauss-Seidel method perform only two iterations and evaluate the residual error at the second iteration ({R"|| ) 54+3xy=4 2x, +5x,=6 4x, +3x,=7 6x, +34, =8 Exercise 12) Solve the following system of equations by using Jacobi iteration method, perform ‘only two iterations and evaluate the residual error at the second iteration (||| ) at3x,=4 dr, +5%, =6 4x, +3x,=7 &, +3x, =8 Exercise 13) Consider f(x)=e™* use the following formula to answer the given questions FGe)= AHA -fa == FO) a) Approximate /*(1.2) with h=0.05 1by Find the best value of h to approximate /"(x) over [1,2] with rounding error bounded by £=10° and evaluate /"(1.2) using the best value of b. Instructors: Suzan Cival Buranay and Mehmet Bozer ‘ EXERCISE 3 FOR MATH373 Exercise 1 Solve the following system of equations by using Gauss-Seidel method perform only two iterations 43x, 2x, +5x,=6 4x, 3x, =7 6x, 43x, 8 Exercise 2 Solve the following system of equations by using Jacobi iteration method, perform only two iterations) a t3x=4 2x, +5x,=6 4x, +3x,=7 6x, +3x,=8 FOLLOWING EXERCISES MAY BE USEFUL FOR THE MIDTERM 2 EXAM Exercise 3: a) For the function (x) =x° +Inx the following table is given Xe Ye 1 1 2 8.69315 3 28.0986 [4 [65.3863 Construct the maximum degree Lagrange Polynomial b) Estimate /(2.5) ¢) Estimate the error at x= 2.5 using the error formula rae aad Tay CNMEE Aes) C089) Exercise Consider y=cosx over [0,12]. Determine the error bounds for the Lagrange polynomials P(x), Py(x) and P(x) Exercise 5: a) Find a second degree Newton polynomial approximating the function f(x) =Inx from the points (1, f()),(2, £2) and (4, f(4) b) Approximate (2.5) using the polynomial in part (a) F*(6) c) use the error formula Ey (x)= 1 (xx) (x=) (x %2)..(x-2y) (N41)! to estimate the error at x=2.5 ) Obtain a bound for the uniform error E(x) Exercise 6: Use the Newton divided-difference formula to compute the cubic interpolating polynomial P,(x) for the function Soo=sin) Xp =0.xq=1, x2 =2 and x, =3. What is an upper bound for the error at x-0.5 ? Exercise 7; Given the table of the funetion f(x) = 2" [ox 0 1 2 3 fx) 1 2 4 8 a) Write down the Newton polynomials P:(x), P2(x), PaCx) b) Evaluate £(2.5) by using Ps(x), ) Obtain a bound for the errors E(x), Eo(x), Es(%). Exercise 8 Consider f(x) =In(x) ~30f, +16f,—f. 12H a) Derive the numerical differentiation formula using Taylor Series and find the truncation error b) Approximate *(1.2) with h=0.05 ©) Find the optimal(best value) value of h for xe [1,2] 4) If le|<5%10 ,&=-2,-1,0,1,2 find /*(1.2) using the best value of h obtained in part ¢) S'&)* Exercise 9 Consider _f(x)=e* a) Derive the numerical differentiation formula using Taylor Series f")® aA fee See =2h) b) Approximate "(0.5) with h=0.05 ©) Find the optimal(best value) value of h for x<[0,1] 4) if |e|<5x10% =-2,~1,0 then estimate /"(0.5) using the best value of h obtained in part c) Exercise 10 ‘Use the following backward formula and the given table to approximate (1.5) and define the order of approximation S) = LO) ALC =H) + f= 2H) 2h % | /@) o[ 3 os | 4 1 | 23 1s | +65 5000 Exercise 1: Find a curve ft y= P(@)= "7 forthe data and caleulate FP) +Ce T 0 1 2 3) Y 500 1000 1800 2800 Exercise 12: Find a curve fit y= P(x)=Bxe* for the data xX 1 2 3 4 Y 500 1000 1800 2800 Exercise 12 For the given set of data, find the least-squares curve f(x)=Cx* by linearizing the data, and evaluate £,(/) Ne 06 ORF LE 43 78 | 26 | MATH 373 EXERCISES 4 Exereise 1) Approximate each integral using the composite trapesoidal rule with M=10 a) fe +e] lae ») frre Exercise 2) Approximate the integrals in Exercise 1 using the Composite Simpson1/3 rule with 9 sample points Exersice 3) Determine the number M and the interval withh h so that the Composite Trapesoidal rule for M subintervals can be used to compute the given integral } xed with an accuracy of 5x10”, Exercise 4) Solve the differential equation by Heun’s method taking 3 subintervals Exercise 5) Solve the differential equation by Fourth order Runge-Kutta method taking 3 subintervals, % ay with y(0) -t over [0,1] Exercise 6) Solve the differential equation by Euler method taking 3 subintervals, 1 y =e —2y with (0) = cover [0,1] 0 Exercise 7) The exact solution to the initial value problem given in Exercises 4-6 is y(t) ae 2 te Compare the results in Exercises 4-6 using the exact solution. y Exercise 8) Solve the initial value problem it 1 +31, »(0)=1 by the fourth order classical Runge-Kutta method given by the formula h(k, + 2k, + 2h thy — Yay at ME Mh Hk) 6 (om). sfocrbna2e) A A k=slysty +e, 5 s(s pty :] key f(t hy thky) with =0.2 over the interval [0,0.4]

You might also like