Ordinary Differential Equations/First Order Linear 2

From Wikibooks, open books for an open world
< Ordinary Differential Equations
Jump to: navigation, search

Return to Exponential Growth[edit]

Remember the population growth problem, where \frac{dP}{dt}=(B-D)P? Now that we can solve linear equations, we can also solve variations where a factor f(t) is added in. The new equation is \frac{dP}{dt}=(B-D)P+f(t), and can be solved by the linear methods taught in the last section.

Immigration[edit]

Lets say that 1000 people move into a city, in addition to the normal population growth. This can be interpreted by making f(x)=1000. This gives us a linear differential equation to solve

\frac{dP}{dt}=kP+1000

\frac{dP}{dt}-kP=1000


Step 1: Find e^{\int P(t)dt}

\int kdt=kt+C

e^{\int P(t)dt}=Ce^{kt}

Letting C=1, we get e^{kt}


Step 2: Multiply through

e^{kt}P'+e^{kt}P=1000e^{kt}

Step 3: Recognize that the left hand is \frac{d}{dt} e^{\int P(t)dt}y

\frac{d}{dt} e^{kt}P=1000e^{kt}

Step 4: Integrate

\int (\frac{d}{dt} e^{kt}P)dt=\int 1000e^{kt}dt

e^{kt}P=\frac{1000}{k}e^{mt}+C

Step 5: Solve for y

P=\frac{1000}{k}+\frac{C}{e^{kt}}

See how the answer is a constant addition to the normal solution, as expected.


Hunting[edit]

Lets say the government allows 10 animals to be killed a year. This makes f(t)=-10t. How does this effect the solution?

\frac{dP}{dt}=kP-10t

\frac{dP}{dt}-kP=-10t


Step 1: Find e^{\int P(t)dt}

\int kdt=kt+C

e^{\int P(t)dt}=Ce^{kt}

Letting C=1, we get e^{kt}


Step 2: Multiply through

e^{kt}P'+e^{kt}P=-10te^{kt}

Step 3: Recognize that the left hand is \frac{d}{dt} e^{\int P(t)dt}y

\frac{d}{dt} e^{kt}P=-10te^{kt}

Step 4: Integrate

\int (\frac{d}{dt} e^{kt}P)dt=\int -10te^{kt}dt

e^{kt}P=\frac{-10(kx-1)e^{kx}}{k^2}+C

Step 5: Solve for y

P=\frac{-10(kx-1)}{k^2}+\frac{C}{e^{kx}}


Mixture problems[edit]

Imagine we have a tank containing a solution of water and some other substance (say salt). We have water coming into the tank with a concentration C_i, at a rate of R_i. We also have water leaving the tank at a concentration C_o and rate R_o. We therefore have a change in concentration in the tank of

\frac{dx}{dt}=R_iC_i-R_oC_o

Thinking this through, R_i, C_i, and R_o are constants, but C_o depends on the current concentration of the tank, which is not constant. The current concentration is \frac{x}{V} where V is the volume of water in the tank. Unfortunately, the volume is changing based on how much water is in the tank. If the tank initially has V_0 volume, the volume at time t is V(t)=V_0+t(r_i-r_o). This makes the final equation

x'=R_iC_i-\frac{R_ox}{V_0+t(R_i-R_o)}

which is an obvious linear equation. Lets solve it.

x'+\frac{R_ox}{V_0+t(R_i-R_o)}=R_iC_i

Step 1: Find e^{\int P(t)dt}

\int \frac{R_o}{V_0+t(R_i-R_o)}=\frac{R_oln((R_i-R_o)t+V_0)}{R_i-R_o}+C

e^{\int P(t)dt}=Ce^{\frac{R_oln((R_i-R_o)t+V_0)}{R_i-R_o}}=C((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}

Letting C=1, we get ((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}


Step 2: Multiply through

((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}x'+((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}\frac{R_ox}{V_0+t(R_i-R_o)}=((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}R_iC_i

Step 3: Recognize that the left hand is \frac{d}{dt} e^{\int P(t)dt}x

\frac{d}{dt} ((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}x=((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}R_iC_i

Step 4: Integrate

\int (((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}x)dt=\int (R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}R_iC_idt

((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}x=\frac{C_iV_0((R_i-R_o)t+V_0)^{\frac{R_i}{V_0}}}{(R_i-R_o)}

Step 5: Solve for y

x=\frac{C_iV_0((R_i-R_o)t+V_0)^{\frac{R_i}{V_0}}}{(R_i-R_o)((R_i-R_o)t+V_0)^{\frac{R_o}{R_i-R_o}}}

Ugly, isn't it. Most of the time when dealing with real world mixture problems, you'll plug in much earlier and use numbers, which makes it easier to deal with.