{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Notes - 162 Chapter 8 Nonlinear Equations Nonlinear...

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 162 Chapter 8: Nonlinear Equations Nonlinear Equations • Definition A value for parameter x that satisfies the equation f(x) = is called a root or a (“zero”) of f(x) . • Exact Solutions For some functions, we can calculate roots exactly; e.g.,- Polynomials up to degree 4- Simple transcendental functions, such as sin x = 0 which has an infinite number of roots: x = k π ( k = 0, ± 1, ± 2, . . . ) • Numerical Methods Used to estimate roots for nonlinear functions f(x).- Bisection Method- False Position Method- Newton’s Method- Secant Method All are iterative techniques applied to continuous functions. We will consider only methods for finding real roots, but methods discussed can be generalized for complex roots. 163 Bisection Method A binary search procedure applied to an x interval known to contain root of f(x) . Example: Polynomial f(x) = x 5 + x + 1- has exactly five roots, at least one real root. Step 1: Determine an x interval containing a real root. We can do this by simple analysis of f(x) : • compute (or estimate) f(x) for convenient values of x , such as 0, ± 1. • estimate position of local extrema with first derivative of f(x) . • make rough sketch of f(x) . Step 2: Bisect interval repeatedly until root is determined to desired accuracy. x 1-1 f(x) 3.0 1.0-1.0 Have root in this interval. 164 • If f(xlow) and f(xmid) have opposite signs ( f(xlow) . f(xmid ) < 0, root is in left half of interval. • If f(xlow) and f(xmid) have same signs ( f(xlow) . f(xmid ) > 0), root is in right half of interval. Continue subdividing until interval width has been reduced to a size ≤ ε where ε = selected x tolerance. d(x) = x 5 + x + 1 f(xmid) = 0.46875 xup = 0 xlow = -1 xlow + sup 2 xmid = 0.5-0.5-1-0.8 -0.6 -0.4 -0.2 1 165 Using a y tolerance can result in poor estimate of root. Examples: Oscillating function 10 20 30 40 50 60 40 20 false root Asymptotically converging function false root 5 4 3 2 1-1-2 -1 1 2 3 4 5 166 Pseudocode Algorithm: Bisection Method Input xLower, xUpper, xTol yLower = f(xLower) (* invokes fcn definition *) xMid = (xLower + xUpper)/2.0 yMid = f(xMid) iters = 0 (* count number of iterations *) While ( (xUpper - xLower)/2.0 < xTol ) iters = iters + 1 if( yLower * yMid > 0.0) Then xLower = xMid Else xUpper = xMid Endofif xMid = (xLower + xUpper)/2.0 yMid = f(xMid) Endofwhile Return xMid, yMid, iters (* xMid = approx to root *) (Do not need to recalculate yLower in loop, since it can never change sign.) For a given x tolerance (epsilon), we can calculate the number of iterations directly. The number of divisions of the original interval is the smallest value of n that satisfies: Thus In our previous example x lower = -1, x upper = 0 Choosing...
View Full Document

{[ snackBarMessage ]}

### Page1 / 16

Notes - 162 Chapter 8 Nonlinear Equations Nonlinear...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online