1.7 Differential Equations

As was previously mentioned, the integral is also used to solve a differential equation. In the simplest form, if an equation is written as dxdt=f(t) then the solution (general solution) is x(t)=f(t)dt If we know the value of x at t=0, the initial condition, then the differential equation has a unique solution given by x(t)=t0f(τ)dτ+x(0)

1.7.1 Separation of Variables

When the differential equation also involves x on the right-hand side, the solution is not so easily represented. Other techniques must then be employed to represent the problem by a set of integrals whose integrands are functions of only the variable of integration. One such technique is separation of variables.

Example 9

Let us return to example 4. The equation is

dNdt=rN(1N/K)

The simple representation given above fails here: N(t)=rN(1N/K)dt To integrate, we need to know N as an explicit function of t, which of course we do not know. However, by multiplying both sides of eqn. (1.19) by the differential dt, we obtain dN=rN(1N/K)dt

and by dividing by N(1N/K) we successfully separate the variables N, t on either side of the equality: dNN(1N/K)=rdt

Integration is now possible since each integrand is a function of just the variable of integration. 1N(1N/K)dN=rdt

How are initial conditions incorporated now? Since the indefinite integral produces an integration constant, the constant is determined by the initial condition, making the general solution unique.

Example 10

A recent study on water purification (Dickson, et al, 1977) included the mortality of fish due to intermittent chlorination. The following data were obtained (Table A) where frequency is the number of doses per 24 hours.

Table A. Fish Mortality Due to Intermittent Chlorination

Mortality Frequency Duration (hr)
0.01 1 1.5
2 0.7
4 0.3
0.10 1 3.2
2 1.4
4 0.7
0.20 1 4.3
2 2.0
4 0.9
0.50 1 7.5
2 3.4
4 1.6

A mathematical model has been devised which shows the effect of duration (T) and frequency (F) on mortality (M) using two differential equations:

M/T=a1T1.5

M/F=a2F1.8

where a1 is a function of F and a2 is a function of T. Another model was derived by curve fitting, using Table A and is quite different. For a given M,

ln(T)=b1b2lnF

where it is now assumed that b1 is a function of M: b1=2.16+0.40lnM

Can both of these models hold? Are they consistent? We can answer this by integrating the first model to derive a single expression for M as a function of F,T. Each equation (1.20), (1.21) involves a single partial derivative, so that one of the variables can be assumed constant. By holding F constant, we integrate eqn. (1.20) to obtain M=(a1/1.5)T2.5+C1 which is more precisely written, with a1 as a function of F, as

M=a1(F)1.5T2.5+C1

Similarly, we integrate eqn. (1.21) with respect to F, holding T constant.

M=a2F1.8dF=(a2/1.8)F2.8+C2=a2(T)1.8F2.8+C2

Thus a1(F)1.5T2.5+C1=a2(T)1.8F2.8+C2

We assume no observable mortality if no chlorination occurs, so that, if F=0 or T=0, then M=0. Thus C1=C2=0. a1(F)1.5T2.5=a2(T)1.8F2.8 Therefore, we must conclude that a1(F)=1.5CF2.8 a2(T)=1.8CT2.5 where C is some proportionality constant. From eqn. (1.23) we have

M=CF2.8T2.5

It is now straightforward to manipulate eqn. (1.22) to look like eqn: (1.24). lnT=(2.16+0.40lnM)b2lnF lnT+b2lnF2.160.40=lnM lnT+ln(Fb2)ln(e2.16)0.40=lnM 2.5ln(TFb2/8.7)=lnM ln[(TFb2/8.7)2.5]=lnM T2.5F2.5b2/(8.72.5)=M Thus, b2=2.8/2.5=1.1,C=1/(8.7)2.5=0.0045 and the models agree.

1.7.2 Residual Norm

Often a differential equation cannot be solved by any standard methods and an approximate solution is developed. In some cases, bounds on the error in the approximation can be derived. Too often, however, calculating the error bounds is as complicated as determining the solution itself. A recent idea is to use the least-squares norm (or occasionally some other norm) as a gauge of the accuracy of the approximation. With only the differential equation at hand, a new type of norm, the residual norm, is used.

Consider a differential equation written as dxdt=f(x,t)

with initial condition x(0)=x0. If the equation is rewritten as dx/dtf(x,t)=0

then we obtain an expression which vanishes when the exact solution is used. In operator notation the equation is L(x,t)=0 where L is the differential operator defined by L(x,t)=dx/dtf(x,t) If L operates on an approximate solution, x(t), then L(x)0, and its value is the residual. Yet we would expect L(x) to be small if x is a good approximation. The final step is to decide on some interval over which the approximation’s accuracy is to be judged, say [a,b]. Then the least-squares residual norm for the approximate solution x(t) is

Note that \| R(\overset\sim x) \|_2 = 0 if the exact solution is used, since L is then 0. This limiting behavior suggests the residual norm as a qualitative indicator of the accuracy of an approximate solution. No theory exists, however, for estimating the actual error from the value of the residual norm.

Example 11

A deer population is threatened by severe storms as well as reduced grazing area due to a small fire. Consequently, a moratorium on deer hunting is imposed until the deer population returns to 60% of the carrying capacity for the area. How long should the moratorium be imposed?

Assumptions are now presented which allow us to model the population dynamics of the deer and estimate the duration of the moratorium. Let the logistic growth model be used: \frac{dn}{dt} = Rn(1-n/K)

Assume that the current population size is 400, the carrying capacity (K) is 2000, the intrinsic growth rate (R) is 1.0 and that the approximate solutions should be fairly accurate for the first three years. Assume also that the moratorium is not obeyed immediately, so that hunting pressure gradually tapers off. Let the growth model with the “harvesting” (i.e. hunting) term be

\begin{equation} \frac{dn}{dt} = Rn(1-n/K) - e^{-t}n \tag{1.25} \end{equation}

with initial condition n(0)-n_0.

Assume also that you do not have access to either a programmable calculator or a computer. This equation cannot be solved by separation of variables (try it), so some approximation must be made. From previous studies, you learn that the following two models have been used fairly successfully to model short term population growth.

\begin{equation} n_1(t) = (K-n_0)(1-e^{-Rt/5} ) + n_0 \tag{1.26} \end{equation}

\begin{equation} n_2(t) = n_0 e^{Rt/3} \tag{1.27} \end{equation}

Note that n_1(t) tapers off at the carrying capacity, but n_2(t) is exponential growth for n_2 \approx 0; both are properties the exact solution must possess. Which approximation is better? We compare n_1 and n_2 by evaluating their least-squares residual norms. Rewrite eqn.(1.25) as L(n) = 0, where L(n) represents the differential operator acting on n: L(n) = dn/dt - Rn(1-n/K) + e^{-t}n = 0

We expect a good approximate solution, n_a, to give L(n_a) \approx 0 and thus its residual norm should also be small: \| R(n_a) \|_2 \equiv [\int^T_0 (L(n_a))^2 dt]^{1/2} \approx 0 Intuitively, the smaller \| R \|_2 is, the better the approximation should be. For this example, assume the following values: K = 2000, \; R=1, \; n_0=400, \; T=3

The integrands in \| R(n_1) \|_2 and \| R(n_2) \|_2 are now calculated. From eqn. (1.26) we obtain, after a few steps,

\begin{equation} [L(n_1)]^2 = (2000 e^{-t}- 1600 e^{-1.2t} + 1280 e^{-0.4t} -2800 e^{-0.2t} +1600)^2 \tag{1.28} \end{equation}

From eqn. (1.27) we obtain

\begin{equation} [L(n_2)]^2=[ (400/3) e^{t/3} - (1-400 e^{t/3}/2000 -e^{-t}) 400 e^{t/3}]2 \tag{1.29} \end{equation}

After multiplying out the square in each equation and collecting terms, we can write both (1.28) and (1.29) as sums of exponential functions, and thus both can be integrated by hand easily (but tediously). The results are, upon integrating over the interval [0,3]: \| R(n_1) \|_2 = 661.8 \| R(n_2) \|_2 = 172.3 Figure 1.19 shows the accuracy of the two approximate solutions as compared to a numerical solution to the original differential equation (1.25). It appears that, for the chosen values of R, K and n_0, the approximation n_2(t) is better, and the residual norm for n_2 supports this evaluation. The 60% of carrying capacity, i.e. 1200, is reached in 3.30 years using n_2(t), and in 3.08 years according to the numerical solution n(t). It is interesting that, without the term for hunting (curve n_0(t) in fig. 1.19), the population reaches the 60% level in only 1.79 years.

Approximate growth functions

Figure 1.19: Approximate growth functions