Convergence - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

Convergence

Description:

Maple (and Matlab) use more sophisticated version of Trapezoid method ... Integration Summary. Maple. evalf(int,x=a..b); Matlab. quad( fun',a,b) Trapezoid rule ... – PowerPoint PPT presentation

Number of Views:495
Avg rating:3.0/5.0
Slides: 38
Provided by: ete6
Category:

less

Transcript and Presenter's Notes

Title: Convergence


1
Convergence
  • Numerical methods for finding roots of equations

2
Numerical Methods for Finding Roots
  • Simple equations
  • Rearrange to solve
  • Use Maple command solve
  • More complicated equations
  • solve does not work
  • what does?
  • not symbolic, but numerical
  • Matlab fzero
  • Maple fsolve

3
Bisection Method (discussed later)
Other Methods (not discussed) Successive
Substitution Newtons Method Secant Method
4
Two Member Frame Problem
5
The buckling load for the Two Member Frame
6
Cantilevered Beam Problem
7
The deflection of the cantilevered beam
8
The deflection of the cantilevered beam
9
Bisection Method
  • Iterative method
  • f(x) 0

10
We assume that the function f() is a continuous
function, so that somewhere between left and
right, there is some point at which f() will be
zero.
left
right
11
Bisection Method
1.
2. Evaluate f(m) a. If the sign of f(m) is
the same as the sign of f(l) then the next left
endpoint is m. (The new value of l is m.) b.
If the sign of f(m) is the same as the sign of
f(r) then the new right endpoint is m. (The
new value of r is m). c. If f(m) is zero,
then the computation is finished.
12
(No Transcript)
13
Bisection Method
  • Bisection method is not fast
  • Maple Matlab use Bisection Method to start
    calculations, then switch to more sophisticated
    methods of root finding

14
Root finding in Maple
  • fsolve
  • f refers to floating point numbers
  • Dont need equations in standard form
  • Eq1tan(z)-z/(1(z2/4))
  • fsolve(Eq1,z2..4)
  • 3.828861865

15
Root finding in Maple
  • fsolve requires an interval
  • Find this interval by plotting the function
  • Plotting is very important to finding roots

16
Root finding in Matlab
  • fzero
  • Uses standard form f(x)0
  • Put f(x) into an m-file
  • For beam equation, use beam.m

17
beam.m
function f beam(a) 
f a.2.(a.24a6)3/2
  • Now lets look at the main program

18
(No Transcript)
19
(No Transcript)
20
(No Transcript)
21
Numerical Methods Summary
  • Works with numbers, not symbols
  • Always plot the function
  • Maple command fsolve
  • Matlab command fzero

22
Numerical Evaluation of Integrals
  • Maple cant always evaluate an integral
    symbolically
  • Only a numerical value can be found
  • Sometimes a numerical answer is preferred

23
Integral examples
  • Volume of a tank

24
Integral examples
Probability of Motor Failure m number of
months to failure Probability distribution
given by
25
Integral examples
What is the probability that a motor survives a
year of use?
26
Trapezoid method
f(a)
y
f(b)
Areahftrap
hb-a
x
a
b
27
Smaller values of h (larger values of N) give
better approximations of integrals.
28
Evaluating integrals in Maple
  • evalf
  • Evaluates to get a floating point number
  • Can use capital Int
  • Sets up integral, but doesnt try to symbolically
    evaluate it
  • Maple (and Matlab) use more sophisticated version
    of Trapezoid method
  • Varies h based on smoothness of curve

29
Volume of a tank (Maple)
for
30
(No Transcript)
31
Numerical Integration in Matlab
  • quad
  • Qquad(fun,a,b)
  • Quadrature means numerical integration

32
Volume of a tank (Matlab)
33
Volume of a tank (Matlab)
34
Probability of Motor Failure (Matlab)
Motor.m function z Motor(m) z
13.765m./(m.221).(7/4)
Q quad(Motor, 0,12) Q 0.7361 (73.61 of
motors will fail, therefore 26.39 will survive
the whole year)
35
Average Age of Rebuilt Motors
function z ExpectAge(m) z m.Motor(m)
quad(ExpectAge,0,12) .263912
36
Pulling a square plug out of a sphere
Pull a 4x4 plug out of the center of the sphere
Uses the dblquad command in Matlab (see course
notes)
37
Numerical Integration Summary
  • Trapezoid rule
  • Maple
  • evalf(int,xa..b)
  • Matlab
  • quad(fun,a,b)
Write a Comment
User Comments (0)
About PowerShow.com