Leaving Certificate Applied Mathematics8.8 Comparing a discrete and a continuous model

All books

8.8 Comparing a discrete and a continuous model — Learn

Prerequisites: Section 8.2, exponential growth; Section 8.4, difference equations.

Objectives: compare a recurrence with a differential equation; use Euler's method for one or two steps; explain how the step size affects the estimate.

By the end of this section you can choose between a discrete and a continuous model, and say why their answers differ.

Two ways to model the same change

Take a quantity that grows by a fixed percentage. There are two ways to write the model.

Continuous. The quantity changes at every instant:

dPdt=kP,P=P0ekt.\frac{dP}{dt} = kP, \qquad P = P_0e^{kt}.

Discrete. The quantity changes once per step:

un+1=(1+r)un,un=u0(1+r)n.u_{n+1} = (1 + r)u_n, \qquad u_n = u_0(1 + r)^n.

The two models use different constants. In the continuous model the rate is kk per unit of time. In the discrete model the multiplier is 1+r1 + r, where rr is the fraction added each step.

They agree only if

1+r=ek,r=ek−1.1 + r = e^k, \qquad r = e^k - 1.

For k=0.05k = 0.05, e0.05≈1.05127e^{0.05} \approx 1.05127, so the exact discrete multiplier is about 1.051271.05127, a little more than 1.051.05. Using 1.051.05 is a model in its own right, and it is slightly different from the continuous one.

Euler's method

When a differential equation cannot be solved by separation, a numerical method gives an estimate. Euler's method steps forward in the same way as a recurrence. From a known value yny_n at xnx_n, take a step of size hh:

yn+1=yn+h f(xn,yn),y_{n+1} = y_n + h\,f(x_n, y_n),

where ff is the right-hand side of dydx=f(x,y)\dfrac{dy}{dx} = f(x, y). The method uses the rate at the start of the step for the whole step.

Example 1. Use Euler's method with step h=1h = 1 on dydx=0.5y\dfrac{dy}{dx} = 0.5y, with y=100y = 100 when x=0x = 0. Find the estimate after two steps.

At the first step the rate is 0.5×100=500.5 \times 100 = 50:

y1=100+1(50)=150.y_1 = 100 + 1(50) = 150.

At the second step the rate is 0.5×150=750.5 \times 150 = 75:

y2=150+1(75)=225.y_2 = 150 + 1(75) = 225.

Example 2. Repeat with the smaller step h=0.5h = 0.5. Find the estimate at x=1x = 1, after two half-steps.

First half-step: rate 5050,

y1=100+0.5(50)=125.y_1 = 100 + 0.5(50) = 125.

Second half-step: rate 0.5×125=62.50.5 \times 125 = 62.5,

y2=125+0.5(62.5)=156.25.y_2 = 125 + 0.5(62.5) = 156.25.

The exact value at x=1x = 1 is 100e0.5≈164.9100e^{0.5} \approx 164.9. The estimate 156.25156.25 is much closer than the one-step value 150150 at the same xx, so halving the step improves the estimate.

Why the two models differ

A discrete model changes the quantity in jumps. A continuous model changes it at every instant. When the step is large, the difference is large, because the model uses one rate for a long interval. As the step shrinks, the discrete model comes closer to the continuous one.

This is why the two lake models of the chapter are close but not equal. The daily model removes 5%5\% at the end of each day, so the removal acts on the amount at the start of the day. The continuous model removes pollutant throughout the day, acting on a falling amount. After ten days the two values are near each other, and the difference is the price of using whole days.

Progress check

Back to the chapter problem. After the factory closes, the lake pollutant is modelled in two ways, both starting at 400400 kg.

Keep both numbers. The Review uses them to judge how much the choice of model matters for the safe level.

You should now be able to

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Layout

How pages are arranged. Your colours stay the same.

Reading offline

Keep this book on this device and read it offline.