Solution of Nonlinear Equations: Graphical and Incremental Search - - PowerPoint PPT Presentation

solution of nonlinear equations graphical and incremental
SMART_READER_LITE
LIVE PREVIEW

Solution of Nonlinear Equations: Graphical and Incremental Search - - PowerPoint PPT Presentation

Outlines Solution of Nonlinear Equations: Graphical and Incremental Search Methods Mike Renfro September 2, 2004 Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea Outlines Part I: Solution of Nonlinear Equations


slide-1
SLIDE 1

Outlines

Solution of Nonlinear Equations: Graphical and Incremental Search Methods

Mike Renfro September 2, 2004

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-2
SLIDE 2

Outlines Part I: Solution of Nonlinear Equations

Solution of Nonlinear Equations

Introduction General Form of the Problem Types of Nonlinear Equations Graphical Interpretation Example: Fluid Mechanics Incremental Search Method Homework

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-3
SLIDE 3

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Part I Solution of Nonlinear Equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-4
SLIDE 4

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

General Form of the Problem

Many engineering problems involve finding one or more values of x that satisfy one of the following forms of equations:

1 Form 1:

f (x) = 0

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-5
SLIDE 5

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

General Form of the Problem

Many engineering problems involve finding one or more values of x that satisfy one of the following forms of equations:

1 Form 1:

f (x) = 0

2 Form 2:

g(x) = C f (x) = g(x) − C = 0

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-6
SLIDE 6

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

General Form of the Problem

Many engineering problems involve finding one or more values of x that satisfy one of the following forms of equations:

1 Form 1:

f (x) = 0

2 Form 2:

g(x) = C f (x) = g(x) − C = 0

3 Form 3:

g(x) = h(x) f (x) = g(x) − h(x) = 0

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-7
SLIDE 7

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-8
SLIDE 8

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations Transcendental equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-9
SLIDE 9

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations Transcendental equations

Exponential equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-10
SLIDE 10

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations Transcendental equations

Exponential equations Logarithmic equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-11
SLIDE 11

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations Transcendental equations

Exponential equations Logarithmic equations Trigonometric equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-12
SLIDE 12

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Types of Nonlinear Equations

Polynomial equations Transcendental equations

Exponential equations Logarithmic equations Trigonometric equations Hyperbolic equations

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-13
SLIDE 13

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Graphical Interpretation

Solutions to equations of the form f (x) = 0 can be seen as places where the graph of f (x) crosses or touches the x axis.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-14
SLIDE 14

Introduction Example: Fluid Mechanics Incremental Search Method Homework General Form of the Problem Types of Nonlinear Equations Graphical Interpretation

Graphical Interpretation

Solutions to equations of the form f (x) = g(x) can be seen as places where the graphs of f (x) and g(x) intersect.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-15
SLIDE 15

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Mathematical Model

Water is discharged from a reservoir through a long pipe as shown. By neglecting the change in the level of the reservoir, the transient velocity of the water flowing from the pipe, v(t), can be expressed as v(t) √2gh = tanh t 2L

  • 2gh
  • ,

where h is the height of the fluid in the reservoir, L is the length of the pipe, g is the acceleration due to gravity, and t is the time elapsed from the beginning of the flow.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-16
SLIDE 16

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Governing Equations

v(t) √2gh = tanh t 2L

  • 2gh
  • Find the value of h necessary for achieving a velocity of v = 5 m/s

at time t = 3 s when L = 5 m and g = 9.81 m/s2.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-17
SLIDE 17

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Solution of Equation

Substitute the values for v, t, L, and g into the previous equation

  • n the left side

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-18
SLIDE 18

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Solution of Equation

Substitute the values for v, t, L, and g into the previous equation

  • n the left side

v(t) √2gh = 5

  • 2(9.81)h

= 1.1288 √ h

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-19
SLIDE 19

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Solution of Equation

Substitute the values for v, t, L, and g into the previous equation

  • n the left side

v(t) √2gh = 5

  • 2(9.81)h

= 1.1288 √ h and the right side tanh t 2L

  • 2gh
  • = tanh

3 2(5)

  • 2(9.81)h
  • = tanh
  • 1.3288

√ h

  • Mike Renfro

Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-20
SLIDE 20

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Solution of Equation

Plot the two sides of the equation as separate functions of h, then find their intersections.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-21
SLIDE 21

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Solution of Equation

Plot the two sides of the equation as separate functions of h, then find their intersections. In this case, the two graphs intersect around h = 1.45 m, so the original equation is satisfied with h = 1.45 m.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-22
SLIDE 22

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Method

Incremental search is the most basic automated numerical method for solving nonlinear equations. The method:

1 Pick a starting point x0 and a step size ∆x. Use a positive

∆x if you want to search to the right, and a negative ∆x if you want to search to the left.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-23
SLIDE 23

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Method

Incremental search is the most basic automated numerical method for solving nonlinear equations. The method:

1 Pick a starting point x0 and a step size ∆x. Use a positive

∆x if you want to search to the right, and a negative ∆x if you want to search to the left.

2 Let x1 = x0 + ∆x and calculate f (x0) and f (x1). Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-24
SLIDE 24

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Method

Incremental search is the most basic automated numerical method for solving nonlinear equations. The method:

1 Pick a starting point x0 and a step size ∆x. Use a positive

∆x if you want to search to the right, and a negative ∆x if you want to search to the left.

2 Let x1 = x0 + ∆x and calculate f (x0) and f (x1). 3 If the sign of f (x) changes between x0 and x1, it is assumed

that a root of f (x) exists on the interval (x0, x1).

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-25
SLIDE 25

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Method

Incremental search is the most basic automated numerical method for solving nonlinear equations. The method:

1 Pick a starting point x0 and a step size ∆x. Use a positive

∆x if you want to search to the right, and a negative ∆x if you want to search to the left.

2 Let x1 = x0 + ∆x and calculate f (x0) and f (x1). 3 If the sign of f (x) changes between x0 and x1, it is assumed

that a root of f (x) exists on the interval (x0, x1).

4 If the sign of f (x) does not change between x0 and x1, let

x2 = x1 + ∆x and repeat the process.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-26
SLIDE 26

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-27
SLIDE 27

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · :

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-28
SLIDE 28

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-29
SLIDE 29

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598 x1 = 1.1 f (x1) = 0.1923

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-30
SLIDE 30

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598 x1 = 1.1 f (x1) = 0.1923 x2 = 1.2 f (x2) = 0.1336

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-31
SLIDE 31

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598 x1 = 1.1 f (x1) = 0.1923 x2 = 1.2 f (x2) = 0.1336 x3 = 1.3 f (x3) = 0.0822

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-32
SLIDE 32

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598 x1 = 1.1 f (x1) = 0.1923 x2 = 1.2 f (x2) = 0.1336 x3 = 1.3 f (x3) = 0.0822 x4 = 1.4 f (x4) = 0.0366

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-33
SLIDE 33

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Find the root of the equation f (x) = 1.1288 √ h − tanh

  • 1.3288

√ h

  • = 0

using the incremental search method with x0 = 1.0 and ∆x = 0.1. Evaluate the function f (x) at x = 1.0, 1.1, 1.2, · · · : x0 = 1.0 f (x0) = 0.2598 x1 = 1.1 f (x1) = 0.1923 x2 = 1.2 f (x2) = 0.1336 x3 = 1.3 f (x3) = 0.0822 x4 = 1.4 f (x4) = 0.0366 x5 = 1.5 f (x5) = −0.0040

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-34
SLIDE 34

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Example

Since the sign of f (x) changed between x = 1.4 and x = 1.5, we assume there is a root of f (x) between 1.4 and 1.5. Repeating this method with x0 = 1.4 and ∆x = 0.01 would allow us to make a more accurate estimate of the root.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-35
SLIDE 35

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Limitations

Only finds real-valued roots of f (x). It cannot find complex roots of polynomials.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-36
SLIDE 36

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Limitations

Only finds real-valued roots of f (x). It cannot find complex roots of polynomials. Only finds roots where f (x) crosses the x axis. It cannot find roots where f (x) is tangent to the x axis.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-37
SLIDE 37

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Limitations

Only finds real-valued roots of f (x). It cannot find complex roots of polynomials. Only finds roots where f (x) crosses the x axis. It cannot find roots where f (x) is tangent to the x axis. May be fooled by singularities in f (x), such as in the tangent and cotangent functions.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-38
SLIDE 38

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Incremental Search Limitations

Only finds real-valued roots of f (x). It cannot find complex roots of polynomials. Only finds roots where f (x) crosses the x axis. It cannot find roots where f (x) is tangent to the x axis. May be fooled by singularities in f (x), such as in the tangent and cotangent functions. If the step size ∆x is too large, you may miss closely-spaced roots by skipping over them.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-39
SLIDE 39

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Example of Singularities

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-40
SLIDE 40

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Homework

Read articles on course homepage labeled “Lec. 01 Reading”.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-41
SLIDE 41

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Homework

Read articles on course homepage labeled “Lec. 01 Reading”. Read and work along with examples given in Chapters 1–2 of Getting Started with MATLAB 7 (link on course homepage).

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea

slide-42
SLIDE 42

Introduction Example: Fluid Mechanics Incremental Search Method Homework

Homework

Read articles on course homepage labeled “Lec. 01 Reading”. Read and work along with examples given in Chapters 1–2 of Getting Started with MATLAB 7 (link on course homepage). Be prepared to receive homework assignments on bisection and Newton-Raphson methods Monday.

Mike Renfro Solution of Nonlinear Equations: Graphical and Incremental Sea