b. tech. semester: iv (ce/it) subject: ma403 … · b. tech. semester: iv (ce/it) subject: ma403...

44
B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi Handouts

Upload: nguyennhi

Post on 06-Sep-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

B. Tech. Semester: IV (CE/IT)Subject: MA403

PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS

Dr. M. Panigrahi

Dr. Motilal Panigrahi Handouts

Page 2: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Basic Concepts of Probability:

• Reorientation, Permutations & Combinations, Definition of probability, Application of permutations and combination to Probability problems, Conditional probability, Bayes’ Theorem, Markov chain, Binomial, Poisson and normal probability distributions.

Dr. Motilal Panigrahi Handouts

Page 3: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Statistical Computation:

• Measure of central tendency, Measures of Dispersion, Correlation and Regression, Linear regression, Regression coefficients, Algorithms for linear regression, Polynomial regression, Multiple regression, Curve fitting & Principle of Least squares, Sampling and Large Sample tests.

Dr. Motilal Panigrahi Handouts

Page 4: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Iterative Method:

• Motivation, errors, truncation error, round-off error, absolute error, relative error and percentage error, Solution of algebraic and transcendental equation by bisection, False position, Secant, Newton-Raphson iteration and extended iteration methods, Rate of convergence of the iteration methods, Comparisons of iterative methods.

Dr. Motilal Panigrahi Handouts

Page 5: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

System Of Linear Algebraic Equations:

• Solution of simultaneous linear equations, Gauss elimination and pivoting, ill– Conditional equations and refinement of solutions, Gauss-Seidal iteration method.

Dr. Motilal Panigrahi Handouts

Page 6: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Finite Differences and Interpolation:

• Finite Difference operators, Newton, Lagrange and Sterling’s interpolation formulae, Chebyshev’s polynomials.

Dr. Motilal Panigrahi Handouts

Page 7: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Numerical Differentiation and Integration:

• Numerical differentiation, Numerical integration by Newton-Cote’s Formulae.

Dr. Motilal Panigrahi Handouts

Page 8: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Numerical Solution of ordinary differential equations:• Taylor series method, Euler’s Method, Runge-Kutta method of 4th

order, Milne’s Predictor – Corrector method.

Dr. Motilal Panigrahi Handouts

Page 9: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Laboratory Work:

• The Practical and Term work will be based on the topics covered in the syllabus. Minimum 16 experiments should be carried out.

• Applications in the field of Computer engineering and Information Technology is to be covered in each topic

Dr. Motilal Panigrahi Handouts

Page 10: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Books:

1. S.P. Gupta: Statistical Methods, Publisher: S. Chand & Sons, Delhi

2. S.S. Gupta: Fundamentals of Statistics, Publisher: Himalaya Publications House

3. Yogesh Jaluria: Computer Methods for Engineering Allyn and Bacon. Inc.

4. Numerical Methods for Engineers with Programming and Software Applications-By S.C. Chapra and R.P. Canale, Publisher: McGraw-Hill – New York – 1998.

Dr. Motilal Panigrahi Handouts

Page 11: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Books:

5. Probability,RandomVariables Stoch-astic Processes – Papoulis.

6. Elementary Numerical Analysis – An Algorithmic Approach – By S.D. Conte & Carl de Boor, Publisher: Mc. Grwaw-Hill – 3rd edition –1980.

7. Introduction to Numerical Analysis by C.E. Froberg, Publisher:Addison Wesley – 2nd edition – 1981.

Dr. Motilal Panigrahi Handouts

Page 12: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Error

• Error = | True Value – Observed Value |

Dr. Motilal Panigrahi Handouts

Page 13: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

truncation error

• Truncation error is the difference between a truncated value and the actual value. A truncated quantity is represented by a numeral with a fixed number of allowed digits, with any excess digits "chopped off" (hence the expression "truncated").

Dr. Motilal Panigrahi Handouts

Page 14: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 1.

• As an example of truncation error, consider the speed of light in a vacuum. The official value is 299,792,458 meters per second. In scientific (power-of-10) notation, that quantity is expressed as 2.99792458 x 108. Truncating it to two decimal places yields 2.99 x 108.

• The truncation error is the difference between the actual value and the truncated value, or 0.00792458 x 108. Expressed properly in scientific notation, it is 7.92458 x 105.

Dr. Motilal Panigrahi Handouts

Page 15: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 2.

• In computing applications, truncation error is the discrepancy that arises from executing a finite number of steps to approximate an infinite process. For example, the infinite series 1/2 + 1/4 + 1/8 + 1/16 + 1/32 ... adds up to exactly 1. However, if we truncate the series to only the first four terms, we get 1/2 + 1/4 + 1/8 + 1/16 = 15/16, producing a truncation error of 1 - 15/16, or 1/16.

Dr. Motilal Panigrahi Handouts

Page 16: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Round-off error.

• A round-off error, also called rounding error, is the difference between the calculated approximation of a number and its exact mathematical value due to rounding. This is a form of quantization error.

Dr. Motilal Panigrahi Handouts

Page 17: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Absolute error, relative error and percentage error • Absolute error = 𝐸𝑎 = 𝑥 − 𝑥 , where 𝑥 is an approximation to 𝑥.

• It is not a complete measurement of the error.

Error Actual Value

0.1 100000

0.1 1000

0.1 10

0.1 1

Dr. Motilal Panigrahi Handouts

Page 18: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Relative Error

• Relative error = | Absolute error/True value |

• Percentage Relative error = | Absolute error/True value | x 100

Dr. Motilal Panigrahi Handouts

Page 19: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example

• 1. Investment

• 2. Fat content in milk

• 3. Alloy in gold

Dr. Motilal Panigrahi Handouts

Page 20: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

What is the relative error?

• True value = 150Observed value = 147.5

Dr. Motilal Panigrahi Handouts

Page 21: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Ans.

• Relative error = Absolute error ÷ True value

• Relative error = |(true value - observed value) ÷ True value|

• = (150 - 147.5) ÷ 150

• = 2.5 ÷ 150 = 0.0167

• Percentage error =1.67%

Dr. Motilal Panigrahi Handouts

Page 22: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Ans.

• An approximation to the value of 𝜋 is given by 22/7 , while its true value in 8 decimal digits is 3.1415926. Calculate absolute, relative and percentage errors in the approximation.

• Exact value = x = 3.1415926• Approximate value =x = 22/7 = 3.1428571• Absolute error 𝐸𝑎= 3.1415926−3.1428571=0.0012645

•𝐸𝑟 =𝐸𝑎

𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒=0.0012645/3.1428571 =0.000402502

Dr. Motilal Panigrahi Handouts

Page 23: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Dr. Motilal Panigrahi Handouts

Page 24: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Finding roots of equations

• Solution of algebraic and transcendental equation by bisection, False position

Dr. Motilal Panigrahi Handouts

Page 25: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Algebraic equation

• Algebraic equation or polynomial equation is an equation containing algebraic function of the variable(s) being solved for.

• 𝑎0𝑥𝑛 + 𝑎1𝑥

𝑛−1 + ⋯+ 𝑎𝑛 = 0

• 𝑛 is a finite integer.

• 𝑎0, 𝑎1, … , 𝑎𝑛 are rational numbers.

Dr. Motilal Panigrahi Handouts

Page 26: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

• A transcendental equation is an equation containing a transcendental function of the variable(s) being solved for. Such equations often do not have closed-form solutions.

• Example: sin 𝑥 − 0.56𝑥 + 2 = 0

• 𝑒−𝑥 + 𝑥 = 0

• 𝑥2 + 3𝑥 − 2 = 0

Dr. Motilal Panigrahi Handouts

Page 27: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Intermediate value theorem

• A continuous function 𝑓(𝑥) on a closed interval [a, b] satisfying the condition 𝑓 𝑎 × 𝑓 𝑏 < 0 must have a root in the closed interval [a, b].

Dr. Motilal Panigrahi Handouts

Page 28: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

BISECTION METHOD

• The word bisection means dividing into two parts.

• Step 1. Choose lower 𝑥𝑙 and upper 𝑥𝑢 guesses for the root such that the function changes sign in the interval 𝑥𝑙 , 𝑥𝑢 . That is

𝑓 𝑥𝑙 𝑓 𝑥𝑢 < 0

This ensures that a root is located in between 𝑥𝑙 , 𝑥𝑢 .

Here we are assuming that the function is continuous in this interval.

Dr. Motilal Panigrahi Handouts

Page 29: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

• Step 2. An estimate of the root is found by

𝑥𝑟 =𝑥𝑙+𝑥𝑢

2

Step 3. Now we try to improve the solution. So we find the next subinterval by the following calculations.

First find 𝑓 𝑥𝑟 . Then

i. Check if 𝑓 𝑥𝑙 𝑓 𝑥𝑟 < 0, the root lies between 𝑥𝑙 , 𝑥𝑟 . So we write 𝑥𝑢 = 𝑥𝑟 .

ii. Check if 𝑓 𝑥𝑙 𝑓 𝑥𝑟 > 0, the root lies between 𝑥𝑟 , 𝑥𝑢 . So we write 𝑥𝑙 = 𝑥𝑟 .

Check if 𝑓 𝑥𝑙 𝑓 𝑥𝑟 = 0, the root is found as 𝑥𝑟. So stop here.

Dr. Motilal Panigrahi Handouts

Page 30: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Termination criteria and error estimate

• 𝜀𝑎 =𝑥𝑟𝑛𝑒𝑤−𝑥𝑟

𝑜𝑙𝑑

𝑥𝑟𝑛𝑒𝑤 100%

• If we denote the stopping criterion as 𝜀𝑠 then we stop our process of searching when 𝜀𝑎< 𝜀𝑠.

Dr. Motilal Panigrahi Handouts

Page 31: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 1.

• Determine the real root of

• 𝑓 𝑥 = 5𝑥3 − 5𝑥2 + 6𝑥 − 2 = 0

• By the method of bisection. Take initial guess as 𝑥𝑙 = 0, 𝑥𝑢 = 1 𝑎𝑛𝑑

• Iterate until the estimated error falls below a level of 𝜀𝑠 = 10%

Dr. Motilal Panigrahi Handouts

Page 32: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Observe the graph

x f(x)0 -2

0.1 -1.4450.2 -0.960.3 -0.5150.4 -0.080.5 0.3750.6 0.880.7 1.4650.8 2.160.9 2.9951 4 -3

-2

-1

0

1

2

3

4

5

0 0.2 0.4 0.6 0.8 1 1.2

f(x)

Dr. Motilal Panigrahi Handouts

Page 33: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

x_l f(x_l) x_u f(x_u) x_r=𝑥𝑙+𝑥𝑢

2 f(x_r) f(x_l)f(x_r) e_a e_s

0 -2 1 4 0.5 0.375 -0.75<0 10

0 -2 0.5 0.375 0.25 -0.734375 1.46875>0 100 10

0.25 -0.734375 0.5 0.375 0.375 -0.1894531 0.139>0 33.333333 10

0.375 -0.18945313 0.5 0.375 0.4375 0.08666992 -0.016<0 14.285714 10

0.375 -0.18945313 0.4375 0.086669922 0.40625 -0.0524597 0.009>0 7.6923077 10

𝑓 𝑥 = 5𝑥3 − 5𝑥2 + 6𝑥 − 2 = 0

Root of the equation is 0.40625Dr. Motilal Panigrahi Handouts

Page 34: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 2.

• Determine the real root of

• 𝑓 𝑥 = −25 + 82𝑥 − 90𝑥2 + 44𝑥3 − 8𝑥4 + 0.7𝑥5 = 0

• By the method of bisection. Take initial guess as

• 𝑥𝑙 = 0.5, 𝑥𝑢 = 1.0 𝑎𝑛𝑑

• Iterate until the estimated error falls below a level of 𝜀𝑠 = 10%

Dr. Motilal Panigrahi Handouts

Page 35: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

observe

x f(x)

0.5 -1.478125

0.6 0.321632

0.7 1.588849

0.8 2.480576

0.9 3.140543

1 3.7

-2

-1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 1 1.2

f(x)

Dr. Motilal Panigrahi Handouts

Page 36: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

x_l f(x_l) x_u f(x_u) x_r f(x_r) f(x_l)f(x_r) e_a e_s0.5 -1.478125 1 3.7 0.75 2.072363281 -3.06<0 100.5 -1.478125 0.75 2.072363281 0.625 0.681991577 -1.008<0 20 100.5 -1.478125 0.625 0.681991577 0.5625 -0.281991673 0.416>0 11.1111111 10

0.5625 -0.2819917 0.625 0.681991577 0.59375 0.226452509 -0.063<0 5.26315789 10

𝑓 𝑥 = −25 + 82𝑥 − 90𝑥2 + 44𝑥3 − 8𝑥4 + 0.7𝑥5 = 0

Root of the equation is 0.59375

Dr. Motilal Panigrahi Handouts

Page 37: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 3

• The velocity 𝑣 of a falling parachutist is given by following expression:

𝑣 =𝑔𝑚

𝑐1 − 𝑒

−𝑐𝑚

𝑡

Where 𝑔 = 9.8𝑚/𝑠2 and mass of the parachutist is 𝑚 = 68.1𝑘𝑔. Find the drag coefficient 𝑐 such that parachutist attains velocity 40m/s in 10sec. Use bisection method so that approximate relative error falls below 0.5%.

Dr. Motilal Panigrahi Handouts

Page 38: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Solution

• Here we are given

• 𝑣 =𝑔𝑚

𝑐1 − 𝑒

−𝑐

𝑚𝑡

• 𝑣 =40𝑚

𝑠, 𝑔 =

9.8𝑚

𝑠2 , 𝑚 = 68.1𝑘𝑔, 𝑡 = 10𝑠

• Thus we have

• 𝑓 𝑐 = 𝑣 −𝑔𝑚

𝑐1 − 𝑒

−𝑐

𝑚𝑡

= 40 −9.8×68.1

𝑐1 − exp −

10𝑐

68.1= 0

• Type equation here.

Dr. Motilal Panigrahi Handouts

Page 39: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

graph

-60

-50

-40

-30

-20

-10

0

10

20

0 5 10 15 20 25

𝑓 𝑐 = 𝑣 −𝑔𝑚

𝑐1 − 𝑒

−𝑐𝑚 𝑡

= 40 −9.8 × 68.1

𝑐1 − exp −

10𝑐

68.1= 0

Dr. Motilal Panigrahi Handouts

Page 40: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

x_l f(x_l) x_u f(x_u) x_r f(x_r) f(x_l)f(x_r) e_a e_s

14 -1.56869931 15 0.424840876 14.5 -0.5523185 0.866>0 0.5

14.5 -0.55231853 15 0.424840876 14.75 -0.0589535 0.0325>0 1.6949153 0.5

14.75 -0.05895351 15 0.424840876 14.875 0.18412569 -0.0108<0 0.8403361 0.5

14.75 -0.05895351 14.875 0.184125687 14.8125 0.06288337 -0.0037<0 0.4219409 0.5

𝑓 𝑐 = 𝑣 −𝑔𝑚

𝑐1 − 𝑒

−𝑐𝑚 𝑡

= 40 −9.8 × 68.1

𝑐1 − exp −

10𝑐

68.1= 0

Root of the equation is 14.8125Dr. Motilal Panigrahi Handouts

Page 41: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

Example 4

• You are designing a spherical tank to hold water for a small village in a developing country. The volume of liquid it can hold can be computed as

𝑉 =2𝜋ℎ2

3(3𝑅 − ℎ)

Where 𝑉 = 𝑣𝑜𝑙𝑢𝑚𝑒 𝑚3 , ℎ =depth of water in tank (m) and

𝑅 = the tank radius (m)

If 𝑅 = 3𝑚, to what depth must the tank be filled so that it holds 30𝑚3? Apply 3 iterations of bisection method and compute the approximate relative error after each iteration.

Dr. Motilal Panigrahi Handouts

Page 42: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

solution

• Here 𝑉 = 30𝑚3, 𝑅 = 3𝑚, so we can write

• 𝑓 ℎ = 𝑉 −2𝜋ℎ2

33𝑅 − ℎ

• 𝑓(ℎ) = 30 −2𝜋ℎ2

39 − ℎ

Dr. Motilal Panigrahi Handouts

Page 43: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

h f(h)1 13.24484

1.5 -90.16592 -179.44

2.5 -290.7043 -422.389

-700

-600

-500

-400

-300

-200

-100

0

100

0 0.5 1 1.5 2 2.5 3 3.5 4

f(h)

Dr. Motilal Panigrahi Handouts

Page 44: B. Tech. Semester: IV (CE/IT) Subject: MA403 … · B. Tech. Semester: IV (CE/IT) Subject: MA403 PROBABILITY, STATISTICS AND NUMERICAL ANALYSIS Dr. M. Panigrahi Dr. Motilal Panigrahi

x_l f(x_l) x_u f(x_u) x_r f(x_r) f(x_l)f(x_r) e_a

1 13.24483918 1.5 -5.342917353 1.250000 4.638184307 61.43>0

1.25 4.638184307 1.5 -5.342917353 1.375000 -0.192832521 -0.89<0 9.090909

1.25 4.638184307 1.375 -0.192832521 1.312500 2.264093374 10.50>0 4.761905

1.3125 2.264093374 1.375 -0.192832521 1.343750 1.045793049 2.36>0 2.325581

𝑓(ℎ) = 30 −2𝜋ℎ2

39 − ℎ

Root of the equation is 1.343750.

Thus ℎ = 1.343750 with percentage relative error 2.326%.

Dr. Motilal Panigrahi Handouts