Calculus II 06.03 Separating Variables and the Logistic Equation

From University
Jump to: navigation, search
Previous Calculus II 06.02 Differential Equations Growth and Decay
Next Calculus II 06.04 First-Order Linear Differential Equations

6.3 Separating Variables and the Logistic Equation

  • Recognize and solve differential equations that can be solved by separating variables
  • Use differential equations to model and solve applied problems
  • Solve and analyze logistic differential equations

Separating Variables

Consider a differential equation that can be written in the form

$$M(x)+N(y)\frac{dy}{dx}=0 $$

where \(M\) is a continuous function for \(x\) alone and \(N\) is a continuous function for \(y\) alone. All the \(x\) terms can be grouped with \(dx\) and all the \(y\) terms with \(dy\), then a solution can be obtained by integration. Such equations are said to be separable, and the solution procedure is called separation of variables. Below are some differential equations that are separable.

Original Differential Equation Rewritten with Variables Separated
\(x^{2}+3y{dy}{dx}=0 \) \(3y\:dy=-x^{2}\:dx \)
\((\sin x)y^{\prime}=\cos x \) \(dy=\cot x \:dx \)
$$\frac{xy^{\prime}}{e^{y}+1}=2 $$ $$\frac{1}{e^{y}+1}dy=\frac{2}{x}dx $$

Definition 6.3.1 Separating Variables

Separating Variables is an analytical method for solving separable, first-order, differential equations. Where,

  1. All the \(y\) terms, including \(dy\), can be moved to one side.
  2. All the \(x\) terms, including \(dx\), to the other side.

The Method has three steps:

  1. Move all the \(y\) terms (including \(dy\) to one side and all the \(x\) terms (including \(dx\) to the other side.
  2. Integrate one side with respect to \(y\) and the other side with respect to \(x\). Don't forget \(+ C\) (the integration constant).
  3. Simplify
Separable
Multiply both sides by \(dx\).
Non Separable
Both variables are in the same function.
\(\frac{dy}{dx}=ky\) \(2xy\:dx+(x^{2}-y^{2})\:dy=0\)

The general form is \(M(x)+N(y)\frac{dy}{dx}=0\). Which solves as follows:

\(M(x)+N(y)\frac{dy}{dx}=0\) Original equation
\(M(x)\:dx+N(y)\:dy=0 \:\:\:\: \) Multiply both sides by \(dx\)
\(M(x)\:dx=-N(y)\:dy\) Subtract \(N(y)\:dy\) from both sides, the equation is separated

Example 6.3.1 Separating Variables

Find the general solution for

$$\frac{dy}{dx}=ky$$

Solution
1. Separate the variables across the equal sign.

\(dy = ky \: dx\) Multiply both sides by \(dx\)
$$\frac{dy}{y}=k \: dx $$ Divide both sides by \(y\)

2. Integrate both sides

$$\int\frac{1}{y}\:dy=\int k\:dx $$
\(\ln(y) + C_{1} = kx + C_{2}\)

3. Simplify

\(\ln(y) = kx+C\)
\(y=e^{kx+a}\)
\(y=e^{kx}e^{C}\)

This form is turns up in Section 6.2 and in many, many real world examples.

Example 6.3.2 A More Complex Example

Find the general solution for

$$y^{\prime }=\frac{2x}{y} $$

Solution

\(y^{\prime }=\frac{2x}{y}\) Original differential equation
\(y^{\prime }y=2x\) Multiply both sides by \(y\) to ‘separate’ the \(x\)’s and the \(y\)’s. Which side each goes on is immaterial.
\(\int y^{\prime }ydx=\int 2x\:dx\) Integrate BOTH sides with respect to x.
\(\int y\:dy = \int 2x\:dx\) Since \(dy/dx = y^{\prime }\) substitute dy/dx for \(y^{\prime }\).
\(\frac{1}{2}y^{2}+C_{1}=\frac{1}{2}2x^{2}+C_{2} \:\:\:\: \) Apply the Power Rule
\(\frac{1}{2}y^{2}=x^{2}+C_{2}-C_{1}\) Simplify - Move C's to the \(x\) side.
\(\frac{1}{2}y^{2}=x^{2}+C\) Simplify - \(C_{2}-C_{1} = C\)
\(y^{2}-2x^{2} = C\) Simplify - Multiply both sides by 2. The new \(C\) is still \(C\).

Example 6.3.3 Separating Variables with Multiple Solutions

Find the general solution for

$$(x^{2}+4)\frac{dy}{dx}=xy$$

Solution Note that \(y=0\) is a solution. To find other solutions, assume that \(y \ne 0\) and separate the variables.

\( (x^{2}+4)\:dy \) \(=xy \: dx \) Differential form
$$ \frac{dy}{y} $$ $$= \frac{x}{x^{2}+4}dx \:\:\:\:$$ Separate variables

Integrate to produce the solution

$$ \int \frac{dy}{y} $$ $$=\int \frac{x}{x^{2}+4}dx \:\:\:\: $$ Integrate
$$ \ln | y | $$ $$ = \frac{1}{2} \ln(x^{2}+4) + C_{1} $$
\( \ln | y | \) $$ \ln \sqrt{x^{2}+4} + C_{1} $$
\( | y | \) $$ e^{C_{1}} \sqrt{x^{2}+4} $$
\( y \) \( \pm e^{C_{1}} \sqrt{x^{2}+4} \)
\( y \) \( = C \sqrt{x^{2}+4} \) The general solution

Example 6.3.4 Finding a Particular Solution

Given the initial condition \(y(0) = 1\), find the particular solution for the equation

\(xy\:dx+e^{-x^{2}}(y^{2}-1)\:dy=0\)

Solution Note that \(y = 0\) is a solution for the differential equation — but this solution does not satisfy the initial condition. Assume that \(y\neq 0\). Separate variables by removing \(y\) from the first term and \(e^{-x^{2}}\) from the second. Multiply both sides by \(e^{x^{2}}/y\) to produce the following.

\(xy\:dx+e^{-x^{2}}(y^{2}-1)\:dy\) \(=0 \)
\(e^{-x^{2}}(y^{2}-1)\:dy\) \(= -xy\:dx\)
$$\int \left( y-\frac{1}{y} \right )\:dy $$ $$=\int -xe^{x^{2}}\:dx $$
$$\frac{y^{2}}{2}-\ln|y| $$ $$= -\frac{1}{2}e^{x^{2}}+C$$

From the initial condition \(y(0) = 1\), substituting 0 for \(x\) and 1 for \(y\), produces

$$\frac{1}{2}-0=-\frac{1}{2}+C $$

which yields \(C = 1\). The particular solution has the form

$$\frac{y^{2}}{2}-\ln |y| $$ $$=-\frac{1}{2}e^{x^{2}}+1 $$
\(y^{2}-\ln\:y^{2}+e^{x^{2}} \) \(=2\)

Example 6.3.5 Finding a Particular Solution Curve

Figure 6.3.1

Find the equation for the curve that passes through the point \((1,3)\) and has the slope \(y/x^{2}\) at any point \((x,y)\).
Solution The curve's slope is \(y/x^{2}\), this yields

$$\frac {dy}{dx}=\frac{y}{x^{2}} $$

with the initial condition \(y(1)=3\). Separating variables and integrating produces

$$\int \frac {dy}{y} $$ $$= \int \frac{dx}{x^{2}},\:\: y \neq 0 $$
$$\ln|y| $$ $$ =-\frac{1}{x}+C_{1} $$
\(y\) $$=e^{-(1/x)+C_{1}} $$
\(y\) \(=Ce^{-1/x}\)

Because \(y=3\) when \(x=1\), it follows that \(x=Ce^{-1}\) and \(C=3e\). The equation for the curve is

\(y=(3e)e^{-1/x}\:\rightarrow\:y=(3e)e^{(x-1)/x}, \:x>0\).

Because the solution is not defined at \(x=0\) and the initial condition is given at \(x=1\), \(x\) is restricted to positive values. See Figure 6.3.1.

Applications

Example 6.3.6 Wildlife Population

The change rate for a coyote population \(N(t)\) is directly proportional to \(650 - N(t)\), where \(t\) is time in years. When \(t=0\), the population is 300, and when \(t=2\), the population is 500. Find the population when \(t=3\).
Solution Because the change rate is proportional to \(650 - N(t)\), or \(650 - N\), the differential equation is

$$ \frac{dN}{dt}=k(650-N) $$

Separating the variables produces.

\(dN\) \( =k(650-N)\:dt\) Differential form
$$\frac{dn}{650-N} $$ $$=k\:dt \:\:\:\: $$ Separate Variables
\(-\ln | 650 | - N \) \(= kt + C_{1} \:\:\:\: \) Integrate
\(\ln | 650 | - N \) \(= -kt - C_{1} \:\:\:\: \)
\( 650-N \) \(=e^{-kt-C_{1}} \) Assume \(N < 650\)
\( N \) \(=650-Ce^{-kt} \) General Solution

Plug in \(N=300\) when \(t=0\) produces

\(300\) \(=650-Ce^{-k0} \) \(N =300\) and \(t=0\)
\(300\) \(=650-C \)
\(C\) \(=350 \)

Plug \(C=350\) into the general solution

\(N=650-350e^{-kt}\)

Using \(N=500\) when \(t=2\), yields

\(500=650-350e^{-2k}\:\rightarrow\:e^{-2k}=\frac{3}{7}\:\rightarrow \:k\approx 0.4236\)

The model for the coyote population is

\(N=650-350e^{-0.4236(3)} \:\:\:\: \) Model for Population

When \(t=3\), the approximate population is

\(N=650-350e^{-0.4236t}\approx 552\)coyotes

The model is described graphically in Figure 6.3.2. Note that \(N=650\) is the horizontal asymptote for the graph and is the carrying capacity for the model.

Figure 6.3.2

Orthogonal Trajectories

Each line \(y=Kx\) is an orthogonal trajectory through the circle set. Figure 6.3.3

A common problem in electrostatics, thermodynamics, and hydrodynamics involves finding a curve set where each curve is orthogonal[1] to all curves in a second curve set. For example, Figure 6.3.3 shows a circle set and a line set

\(x^{2}+y^{2}=C \:\:\:\: \) Circle Set

each circle intersects the lines in this line set

\(y=Kx \:\:\:\: \) Line Set

at right angles. Both curve sets are mutually orthogonal, each curve in one set is called an orthogonal trajectory to each line in the line set. In electrostatics, force lines are orthogonal to the equipotential curves. In thermodynamics, the heat flow across a plane surface is orthogonal to the isothermal curves. In hydrodynamics, the flow (stream) lines are orthogonal trajectories of the velocity potential curves.

Example 6.3.7 Finding Orthogonal Trajectories

Orthogonal Trajectories Figure 6.3.4

Describe the orthogonal trajectories for the inverse curve set given by

$$y=\frac{C}{x}$$

for \(C\neq 0\). Sketch the inverse curve set for several integers.
Solution Solve the given equation for \(C\). Then, by differentiating implicitly with respect to \(x\), you obtain the differential equation

$$x\frac{dy}{dx}+y $$ \(=0\) Differential Equation
$$x\frac{dy}{dx} $$ \(=-y\) Subtract \(y\) from both sides
$$\frac{dy}{dx} $$ $$=-\frac{y}{x} \:\:\:\:$$ Slope for the given set

Because \(dy/dx\) represents the slop for the inverse curve set at \((x,y)\), if follow that the orthogonal curve set has the negative reciprocal slope \(x/y\). This produces

$$\frac{dy}{dx}=\frac{x}{y} $$

The orthogonal inverse circle set is found by separating variables and integrating.

$$\int y\:dy $$ $$=\int x\:dx $$
$$ \frac{y^{2}}{2} $$ $$= \frac{x^{2}}{2}+C_{1}$$
\(y^{2}-x^{2} \) \(=K \)

The centers are at the origin, and the transverse axes are vertical for \(K > 0\) and horizontal for \(K \neq 0\). When \(K = 0\), the orthogonal trajectories are the lines \(y = \pm x\). When \(K \neq 0\), the orthogonal trajectories are hyperbolas. Several trajectories are shown in Figure 6.3.4.

Logistic Differential Equation

Note that as \(t \rightarrow \infty\), \(y \rightarrow L\)
Figure 6.3.5

In Section 6.2, the exponential growth model was derived from the fact that the change rate for a variable \(y\) is proportional to the value for \(y\). The differential equation \(dy/dt=ky\) has the general solution \(y=Ce^{kt}\). Exponential growth is unlimited, but when describing a population, there often exists some upper limit \(L\) past which growth cannot occur. This upper limit is called the carrying capacity, which is the maximum population \(y(t)\) that can be sustained or supported as time \(t\) increases. A model that is often used to describe this growth is the logistic differential equation

$$ \frac{dy}{dt}=ky(1-\frac{y}{L}) \:\:\:\: $$ Logistic Differential Equation


where \(k\) and \(L\) are positive constants. A population that satisfies this equation does not grow without bound, but approaches the carrying capacity \(L\) as \(t\) increases.

From the equation, you can see that if \(y\) is between 0 and the carrying capacity \(L\), then \(dy/dt > 0\), and the population increases. If \(y\) is greater than \(L\), then \(dy/dt < 0\), and the population decreases. The graph for function \(y\) is called the logistic curve, as shown in Figure 6.3.5.

Example 6.3.8 Deriving the General Solution

Solve the logistic differential equation

$$\frac{dy}{dt}=ky \left (1-\frac{y}{L} \right ) \:\:\:\: \color{red}{ \text{ Logistic Differential Equation }}$$

Solution Begin by separating the variables.

$$ \frac{dy}{dt} $$ $$=ky \left (1-\frac{y}{L} \right ) $$ Original Equation
$$ \frac{1}{y(1-y/L)}dy $$ \(=k\:dt \) Separate Variables
$$ \int \frac{1}{y(1-y/L)}dy $$ \(=\int k\:dt \) Integrate Both Sides
$$ \int \left ( \frac{1}{y} +\frac{1}{L-y} \right )dy $$ \( =\int k\:dt\) Rewrite Left Side using Partial Fractions
$$ \ln\left | y \right |-\ln\left | L-y \right | $$ \( =kt+C\) Find antiderivative for both sides
$$ \ln \left | \frac{L-y}{y} \right | $$ \(=-kt-C\) Multiply each side by -1 and simplify.
$$\left | \frac{L-y}{y} \right | $$ \(=e^{-kt-C}\) Exponentiate each side.
$$\left | \frac{L-y}{y} \right | $$ \(=e^{-C}e^{-kt}\) Property of Exponents
$$ \frac{L-y}{y} $$ \(= be^{-kt}\) Let \(\pm e^{-C}=b\)

Solving this equation for \(y\) produces

$$ y=\frac{L}{1+be^{-kt}} $$

which is the form for all logistic differential equations.

Example 6.3.9 Solving a Logistic Differential Equation

Slope field for
\(\frac{dp}{dt}=0.194p(1-\frac{p}{4000})\)
and the solution passing through \(0,40)\)
Figure 6.3.6

A state game commission releases 40 elk into a game refuge. After 5 years, the elk population is 104. The commission believes that the environment can support no more than 4000 elk. The elk population's growth rate \(p\) is

$$ \frac{dp}{dt}=kp(1-\frac{p}{4000}),\:\:\:\: 40 \leqslant p \leqslant 4000 $$

in \(t\) years.

a. Write a model for the elk population in \(t\) terms.
b. Graph the slope field for the differential equation and the solution that passes through the point (0,40).
c. Use the model to estimate the elk population after 15 years.
d. Find the limit of the model as \(t\to\infty\).

Solution
a. You know that \(L\) = 4000. The solution has the form

$$ p=\frac{4000}{1+be^{-kt}} $$

Because \(p\)(0) = 40, you can solve for \(b\) as follows.

$$40=\frac{4000}{1+be^{-k(0)}}\rightarrow 40=\frac{4000}{1+b}\rightarrow b=99 $$

Then, because \(p\)=104 when \(t\)=5, you can solve for \(k\).

$$ 104=\frac{4000}{1+99e^{-k(5)}}\rightarrow k \approx 0.194 $$

A model for the elk population is

$$p=\frac{4000}{1+99e^{-0.194t}} $$

b. Using a graphing utility, you can graph the slope field for

$$ \frac{dp}{dt}=0.194p(1-\frac{p}{4000}) $$

and the solution that passes through (0,40) as shown in Figure 6.3.6.
c. To estimate the elk population after 15 years, substitute 15 for \(t\) in the model.

$$ p=\frac{4000}{1+99e^{-0.194({\color{Red}{15}})}} $$ Substitute 15 for \(t\)
$$ p=\frac{4000}{1+99e^{-2.91}} \approx 626$$ Simplify

d. As \(t\) increases without bound, the denominator

$$\frac{4000}{1+99e^{-0.194(t)}} $$

gets closer to 1. Producing

$$\lim_{t\rightarrow \infty} \frac{4000}{1+99e^{-0.194(t)}}=4000 $$
Square X.jpg

Internal Links

Parent Article: Calculus II 06 Differential Equations