Processing math: 100%

ODE and PDE, Numerical Approximations I

February 3, 2021

Content

1. Direction Field

Direction fields are valuable tools in studying the solutions of differential equations of the form:

dydt=f(t,y)

where f is a given function of the two variables t and y, sometimes referred to as the rate function. A direction field for equations (1) can be constructed by evaluating f at each point of a rectangular grid. At each point of the grid, a short line segment is drawn whose slope is the value of f at that point. Each line segment is tangent to the graph of the solution passing through that point. The plots give you a general intuition about what does the solution look like.

Like example on B&D book, page 5, the direction field of equation: dpdt=p2450

2. Euler’s Method

For a first-order IVP given f and f/y are continuous:

dydt=f(t,y),y(t0)=y0

there are two facts driving the numerical approximations approaches:from existence and uniqueness theorem

  1. There is a unique solution y=ϕ(t) in some interval around t=t0

  2. It is usually not possible to find the ϕ by symbolic manipulations.

From the diretive fied plotted above, we could imagine that if we have a fine enough grid, it presents a reasonable approximation of the solution, which motivates the Euler’s method as numerical approximation to equation (2)’s solutionThe formalized approximation here is f(t)=f(t+Δt)f(t)Δt. There are many forms of this truncation approximation, with different levels of error. :

  1. Start from the initial point (t0,y0)

  2. Move a small step further t1=t0+Δt:
    y1=y0+f(t0,y0)Δt

  3. Iteratively move the point further like above:
    yn=yn1+f(tn1,yn1)Δt

Now you have the a bunch of points (ti,yi),i=0,,n, starting from initial value (t0,y0). Connect them with segemental lines, then you have one numerical approximation. The local truncation error level is O(h2).

Example from B&D book section 2.7, example 1, page 78. Use Euler's method to solve: dydt=32t0.5y,y(0)=1 Evaluate at five points (0,0.2,0.4,0.6,0.8,1.0): You can see the error gap grows larger as t increases, because the truncation error is accumulating.

Comments

ODE and PDE, Numerical Approximations I - February 3, 2021 - Minhuan Li