Numerical Differentiation - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Numerical Differentiation

Description:

How do we determine its velocity v(t)=dx/dt? Consider a particle whose position ... as it is plagued by subtractive cancellation; h oscillates between 0 and as ... – PowerPoint PPT presentation

Number of Views:178
Avg rating:3.0/5.0
Slides: 30
Provided by: hughat
Category:

less

Transcript and Presenter's Notes

Title: Numerical Differentiation


1
Numerical Differentiation
2
  • Consider a particle whose position as a function
    of time is recorded in a table. How do we
    determine its velocity v(t)dx/dt?

3
  • Consider a particle whose position as a function
    of time is recorded in a table. How do we
    determine its velocity v(t)dx/dt?
  • We differentiate!

4
  • Consider a particle whose position as a function
    of time is recorded in a table. How do we
    determine its velocity v(t)dx/dt?
  • We differentiate!
  • This form is not usefully as it is plagued by
    subtractive cancellation h oscillates between 0
    and as

5
  • Alternative methods are the forward difference,
    central difference and extrapolated difference.

6
  • Alternative methods are the forward difference,
    central difference and extrapolated difference.
  • For completeness we will look very briefly at the
    forward difference (the other methods will be
    left as research).

7
Forward Difference
  • This the most direct method and starts with
    expanding the function as a Taylor series.

8
Forward Difference
  • This the most direct method and starts with
    expanding the function as a Taylor series.
  • The series advances the function one small step
    forward,
  • h is the step size.

9
Forward Difference
  • The forward difference algorithm is obtained by
    solving for f prime.
  • Where c represents the compute value.
  • Ie an approx. using two points to rep the
    function by a straight line in the interval x to
    xh

10
Forward Difference
  • The forward difference algorithm is obtained by
    solving for f prime.
  • Where c represents the compute value.
  • Ie an approx. using two points to rep the
    function by a straight line in the interval x to
    xh

11
Diagram illustrating the forward difference
12
Forward Difference
  • Consider the case where,

13
Forward Difference
  • Consider the case where,
  • The exact derivative is
  • The computed derivative is
  • For small h the approximation becomes good. ie

14
Numerical Solutions to Differential equations
15
  • Most real world problems are written as (modelled
    with) differential equations.

16
  • Most real world problems are written as (modelled
    with) differential equations.
  • in chemistry, physics, and engineering.
  • more recently in models for medicine, biology.

17
  • Most real world problems are written as (modelled
    with) differential equations.
  • in chemistry, physics, and engineering.
  • more recently in models for medicine, biology.
  • Eg. Oscillators (harmonic motion).
  • Assume we have a mass m attached to a spring
    forced by an external force.

18
  • A problem may require you to solve for the motion
    of the mass as a function of time.

19
  • From classical mechanics we use Newtons 2nd law,
    which can be written in differential form.

20
  • From classical mechanics we use Newtons 2nd law,
    which can be written in differential form.
  • may be used to determine v(t) and x(t) given
    initial conditions.

21
  • A differential equation is an equation involving
    an unknown function and one or more of its
    derivatives.

22
  • A differential equation is an equation involving
    an unknown function and one or more of its
    derivatives.
  • The equation is an ordinary differential equation
    (ODE) if the unknown function depends on only one
    independent variable.

23
  • Types of ordinary differential equations include
    initial-value problems (IVP) and boundary-value
    problems (BVP).

24
  • Types of ordinary differential equations include
    initial-value problems (IVP) and boundary-value
    problems (BVP).
  • Examples of ODEs

Growth equation
Harmonic Oscillator
25
Differential equations and Oscillators
26
  • The exciting feature of computational work is
    highlighted in that we can solve for problems of
    this type very easily.
  • We are not restricted to linear differential
    equations or nearly linear. There is no need for
    the usual common assumptions.

27
  • Linear Driven Oscillator
  • Where is the force exerted by the spring and
    is the external force.

28
  • Linear Driven Oscillator
  • Where is the force exerted by the spring and
    is the external force.
  • Nonlinear Oscillator
  • PE is an arbitrary power p of displacement x
    from equilibrium.

29
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com