Example 1: Form a differential equation from a statement
The rate of change of \(y\) with respect to \(x\) is proportional to \(xy\). Form the differential equation.
Solution
βRate of change of \(y\) with respect to \(x\)β means
\[
\frac{dy}{dx}.
\]
βIs proportional to \(xy\)β means
\[
\frac{dy}{dx}\propto xy.
\]
Introduce a constant of proportionality:
\[
\frac{dy}{dx}=kxy.
\]
The differential equation is
\[
\frac{dy}{dx}=kxy.
\]
Example 2: Separate the variables and solve
Solve
\[
\frac{dy}{dx}=xy.
\]
Solution
Separate the variables:
\[
\frac{1}{y}\,dy=x\,dx.
\]
Integrate both sides:
\[
\int \frac{1}{y}\,dy=\int x\,dx
\]
\[
\ln|y|=\frac{1}{2}x^2+c.
\]
The general solution is
\[
\ln|y|=\frac{1}{2}x^2+c.
\]
Example 3: Solve and use an initial condition
Solve
\[
\frac{dy}{dx}=2xy
\]
given that \(y=3\) when \(x=0\).
Solution
Separate the variables:
\[
\frac{1}{y}\,dy=2x\,dx.
\]
Integrate:
\[
\int \frac{1}{y}\,dy=\int 2x\,dx
\]
\[
\ln|y|=x^2+c.
\]
Use \(y=3\) when \(x=0\):
\[
\ln 3=c.
\]
So
\[
\ln|y|=x^2+\ln 3.
\]
Exponentiate:
\[
y=3e^{x^2}.
\]
The particular solution is
\[
y=3e^{x^2}.
\]
Example 4: A decreasing quantity
A quantity \(P\) decreases at a rate proportional to \(P\). When \(P=80\), the rate of decrease is \(20\). Form the differential equation.
Solution
Since \(P\) is decreasing,
\[
\frac{dP}{dt}=-kP.
\]
When \(P=80\), the rate of decrease is \(20\), so
\[
\frac{dP}{dt}=-20.
\]
Substitute:
\[
-20=-k(80)
\]
\[
k=\frac{1}{4}.
\]
The differential equation is
\[
\frac{dP}{dt}=-\frac{1}{4}P.
\]
Example 5: Rate proportional to the amount remaining
A quantity \(y\) increases at a rate proportional to \(10-y\). Given that \(y=4\) when \(x=0\), solve
\[
\frac{dy}{dx}=10-y.
\]
Solution
Separate the variables:
\[
\frac{1}{10-y}\,dy=dx.
\]
It is usually easier to write
\[
\int \frac{1}{10-y}\,dy=\int dx.
\]
Integrate carefully:
\[
-\ln|10-y|=x+c.
\]
Use \(y=4\) when \(x=0\):
\[
-\ln 6=c.
\]
So
\[
-\ln|10-y|=x-\ln 6.
\]
Rearrange:
\[
\ln|10-y|=\ln 6-x
\]
\[
10-y=6e^{-x}.
\]
\[
y=10-6e^{-x}.
\]
The particular solution is
\[
y=10-6e^{-x}.
\]