Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solution of Nonlinear Equations: Lecture (I)

Similar presentations


Presentation on theme: "Solution of Nonlinear Equations: Lecture (I)"— Presentation transcript:

1 Solution of Nonlinear Equations: Lecture (I)
Chapter 2 Solution of Nonlinear Equations: Lecture (I) Dr. Jie Zou PHY 3320

2 Outline Introduction Engineering applications Numerical methods Roots?
Nonlinear equations? Engineering applications Roots in engineering and science Numerical methods (1) Bisection method Dr. Jie Zou PHY 3320

3 Introduction What are the roots of an equation?
A familiar example: f(x) = ax2 + bx + c = 0 Quadratic equation Roots Roots are the values of x that make f(x) = 0; Roots are also known as the zeros of f(x). What are nonlinear equations? Examples: Polynomial equations: x4 – 80x = 0 Transcendental equations: tan x – tanh x = 0 Dr. Jie Zou PHY 3320

4 Graphical Interpretation (method)
Limitations of the graphical method: It requires extensive computations to plot the graph of f(x). Roots found are not very precise. Advantage of the graphical method: Obtain rough estimates of roots. Dr. Jie Zou PHY 3320

5 Engineering applications
Mathematical modeling: Solution of v: Design: Determine the mass at which a bungee jumper exceeds 36 m/s after 4 s of mid-flight fall given cd = 0.25 kg/m. Find the roots of The solutions of many problems in engineering and science require finding the roots of nonlinear equations. Many of these equations can not be solved directly (analytically, exactly, or in closed-form). Require approximate solution techniques – numerical methods Dr. Jie Zou PHY 3320

6 Bisection method Observation: Change in sign of f(x) at a root, i.e. f(xl)f(xu) < 0. Bisection method algorithm: 1. Set a(1) = xl, b(1) = xu, and i = 0. 2. Set iteration number i = i + 1. 3. Find xmid = [a(i) + b(i)]/2. 4. If |f(xmid)|  , then xroot = xmid. Otherwise, go to step 5. 5. If f(xmid)f(a(i)) > 0, set a(i+1) = xmid and b(i+1) = b(i), and go to step 2. 6. If f(xmid)f(a(i))<0, set b(i+1) = xmid and a(i+1) = a(i), and go to step 2. xu Root xl (xl, xu): The initial interval of uncertainty (definition, p.61). Dr. Jie Zou PHY 3320

7 Notes: bisection method
(a) (b) (c) (a) The bisection method works when the initial interval of uncertainty (a, b) contains an odd number of roots. (b) The method will not work if the interval (a, b) contains a double root, since f(a) and f(b) will have the same sign. (c) The method will not be able to distinguish between a singularity and a root. Dr. Jie Zou PHY 3320

8 Example: bisection method (similar to Example 2.7, p. 63)
Find the root of the equation where t = 4 s, v = 36 m/s, cd = 0.25 kg/m, and g = 9.81 m/s2. Use the bisection method with xl = 50 kg, xu = 200 kg, and  = (kg) This plot provides a guess of the initial interval of uncertainty (xl, xh). Dr. Jie Zou PHY 3320

9 Flowchart Iteration Convergence criterion
xl=50, xu=200, =0.005, i=0; a(1)=xl, b(1)=xu i=i+1 |f(xmid)|   xmid=[a(i) + b(i)]/2 T xroot=xmid end f(xmid)·f(a(i))>0 F a(i+1)=xmid, b(i+1)=b(i) a(i+1)=a(i), b(i+1)=xmid Iteration Dr. Jie Zou PHY 3320

10 Implement bisection method: by hand
Show work step by step. Also, summarize the results in the Table below. Iteration a(i) b(i) xmid = [a(i) + b(i)]/2 f(xmid) Is |f(xmid)|  ? 1 2 3 4 Dr. Jie Zou PHY 3320

11 Implement bisection method: write an M-file
For the Example given on slide #8, write an M-file to compute the root of the equation using the bisection method. Follow the flowchart provided previously. Save the M-file as mybisection.m. A copy of the M-file will be handed out later. Dr. Jie Zou PHY 3320


Download ppt "Solution of Nonlinear Equations: Lecture (I)"

Similar presentations


Ads by Google