This action might not be possible to undo. Are you sure you want to continue?

Numerical Errors & root finding

**Due: Monday, Sept. 26, 2011----2:59 pm
**

Problems from Chapra book chapter 4 For all of these problems, feel free to use a simple Matlab program to calculate function values (like using a calculator) when the indicated approach is by hand. Problem Approach Comments 4.2 Hand Hint: First number is an integer, second number is a floating point. Write out solution equation by hand. Do calculations in Matlab if desired. 4.4 Matlab Name your Matlab program macheps.m 4.5 Matlab Skip the challenge question. 4.8 Hand Only do 3-digit arithmetic part. Write out all equations by hand and use Matlab or calculator for intermediate results. Chopping means truncate to only 3 digits after each intermediate calculation step. 4.13 Hand 4.16 Matlab Evaluate the remainder term in the Taylor series at x = 2 to estimate Et 4.22 S1 4.2 Matlab hand Study the code on pp.116-117 of 3rd ed or pp.105-106 of 2nd ed.. See problem statement below.

Convert the following base-2 numbers to base 10: a) 1011001; b) 0.01011; c) 110.01001

4.4 For computers the machine epsilon ε can also be thought as the smallest number that when added to one gives a number greater than l. An algorithm based on this idea can be developed as Step 1: Set ε =1. Step 2: If ε is less than or equal to 1, then go to Step 5. Step 3: ε = ε /2. Step 4: Return to Step 2. Step 5: ε = 2 x ε . Write your own M-file based on this algorithm to determine the machine epsilon ε .Validate the result by comparing it with the value computed with the built-in function eps. 4.5 In a fashion similar to Prob.4.4, develop your own M-file to determine the smallest positive real number used in Matlab. Base your algorithm on the notion that your computer will

called the nested form. 4.2204e-016 >> eps ans = 2.5*15. you should get 116. Evaluate the derivative at x=2 using a step size of h= 0.2 a) 4.7.5. The latter.88 using a base point at x=l.5x2 + 11.25. Rounding should be applied after each operation.5)x + l l. 4. Note that the result you obtain will differ from the value computed with realmin. Compare your results with the true value of the derivative.2204e-016 4. (Nested form) Evaluate f(x) = x3 .2x + 2.5236 first.94 using 3 significant (3S) arithmetic and rounding.28125 >> macheps ans = 2.13. c) 6.5 but for f(x)= cos(x) at x = π /6.) Answers 4. (Note: for computing 7.5 in the 2nd Edition is the same as in the 3rd Edition) S1. Rounding it to 3S.9407e-324 . Discuss the meaning of the results.5x2.5 4. in both of the given forms.7.2 be unable to reliably distinguish between zero and a quantity that is smaller than this number.and 4digit arithmetic with chopping. Challenge question: Investigate the results by your code and those obtained with realmin. you get exact x2=15. Interpret your results on the basis of the remainder term of the Taylor series expansion.8 at x = 3.5x2 is 7.16 Use forward and backward difference approximations of O(h) and a centered difference approximation of O(h2) to estimate the first derivative of the function examined in Prob.8 = ((x .5 whose exact value is 116.22 Repeat Example 4.8 The derivative of f(x)=1/(1-3x2) is given by 6x/(1-3x2)2 Do you expect to have difficulties evaluating this function at x= 0. is usually preferable since it minimizes the number of operations and thus the effect of rounding. 4. 4.4 89. b) 0.577? Try it using 3.34375. (note: Example 4.13 Use zero. Compute the true percent relative error ε t for each approximation.2)x + 2. you get 15.4. Thus 7.through third-order Taylor series expansions to predict f(3) for f(x) =25x3 – 6x2 + 7x . Rounding it to 3S.25.

ε t = 0% 4.56 4. ε t = 36.13 True value: f(3) = 554 Zero order: f(3) ≈ -62.577) = 216.5625. ε t = 85. Et = 34.4375 Centrered: f’(2) = 284.22 .000 ε t = 90. ε t = 111.5625 Et based on remainder term in Taylor series: Forward: Et = 36 Backward: Et = 36 Centrered: Et = 1.10% Third order: f(3) ≈ 554.16 True value: f’(2) = 283 Forward: f’(2) = 320. Et = 37.911 3-digit result with chopping: f’(0.3 (or any extremely small value on the order of e-320 – solution may vary slightly from one computer to the next) 4.250 => chopping to 216.5625.19% First order: f(3) ≈ 78.352.8% 4.92% Second order: f(3) ≈ 354.577) = 2.5625 Backward: f’(2) = 248.8 True value: f’(0.5625. Et = 1.

10 Nested: f =-8.4 S1: Unnested f =-8.2 .

- Tutorial 1 1011
- Chapra Applied Numerical Metho
- HW #1 Numerical methods
- Exercise 2
- Matlab Assignment Latest~~1
- CH1
- Ejercicios Esfuerzo y Carga Axial
- Chapter 7
- Tutorial Last Answer
- 4th Chapter Numerical Methods for Engineers- Chapra Solution
- system dynamics ogata
- Chp11-p36-52
- AP Circuits HW Solutions
- Dynamics - Chapter 13 [Beer7]
- Aerodyn Aeronaut and Fligh Mech
- Introduction to Finite Element Analysis and Design
- Chapter05-Probs1-13
- Face Detection System - File Exchange - MATLAB Central
- Tools for Mathematical Calculations
- Introduction_to_Matlab_Tutorial_10.ppt
- DSP notes 1
- Pair Trade for Matlab
- Generate MPC controller using generalized predictive controller (GPC) settin
- What is the Virtual Reality Toolbox
- 1.pdf
- Ocr
- 10.1.1.103
- Software Used
- MATLAB 2012-13 Project Titles
- 1. Matlab Programming

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd