1: Differential equations: definitions
Definitions and terminology
A differential equation (DE) is a relation between variables (e.g. x,y{x,y}) and their derivatives (e.g. dydx{\frac{\mathrm{d}y}{\mathrm{d}x}}). For example, dydx=2x{\frac{\mathrm{d}y}{\mathrm{d}x}=2x} is a DE.
A solution of a DE is a relation between our variables (e.g. x,y{x,y}) that satisfy the DE. For example, y=x2{y=x^2} is a solution of dydx=2x.{\frac{\mathrm{d}y}{\mathrm{d}x}=2x.}
The general solution refers to all the possible solutions of a DE. For example, y=x2+c{y=x^2+c}, where c{c} is an arbitrary constant, is the general solution of dydx=2x.{\frac{\mathrm{d}y}{\mathrm{d}x}=2x.}
A particular solution solution refers to one specific solution of a DE. For example, y=x2+3{y=x^2+3} is a particular solution of dydx=2x.{\frac{\mathrm{d}y}{\mathrm{d}x}=2x.}
We can verify that a given equation is a solution of a DE by differentiation.
Example 1: verification of solution
Verify that y=x3ex2{y=x^3 e^{x^2}} is a solution of the differential equation xdydx=y(3+2x2).{\displaystyle x\frac{\mathrm{d}y}{\mathrm{d}x}=y(3+2x^2).}
Differentiating y=x3ex2{y=x^3 e^{x^2}} wrt x{x},
dydx=3x2ex2+x3(2xex2)xdydx=3x3ex2+2x2(x3ex2)=3y+2x2y=y(3+2x2)\begin{aligned} \frac{\mathrm{d}y}{\mathrm{d}x} &= 3x^2 e^{x^2} + x^3 \left( 2x e^{x^2} \right) \\ x\frac{\mathrm{d}y}{\mathrm{d}x} &= 3x^3 e^{x^2} + 2x^2 \left( x^3 e^{x^2} \right) \\ &= 3y + 2x^2 y \\ &= y(3+2x^2) \end{aligned}
DEs of the form dydx=f(x){\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=f(x)}
We can solve differential equations of special forms by integration.
dydx=f(x)    y=f(x)  dx{\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=f(x) \; \Rightarrow \; y = \int f(x) \; \mathrm{d}x}
Example 2: solving a DE (f(x){f(x)} type)
(a) Find the general solution of the differential equation dydx=1x2+1.{\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{1}{x^2+1}.}
(b) Find the particular solution given that y=2{y=2} when x=0.{x=0.}
(a)   dydx=1x2+1y=1x2+1  dx=tan1x+C\begin{aligned} \textrm{(a) } \; \frac{\mathrm{d}y}{\mathrm{d}x} &= \frac{1}{x^2+1} \\ y &= \int \frac{1}{x^2+1} \; \mathrm{d}x \\ &= \tan^{-1} x + C \end{aligned}
General solution: y=tan1x+C{y=\tan^{-1}x+C}
(b) {\textrm{(b) }} When x=0{x=0}, y=2{y=2}
2=tan10+C{2 = \tan^{-1} 0 + C}
C=2{C = 2}
Particular solution: y=tan1x+2{y=\tan^{-1}x+2}
DEs of the form dydx=f(y){\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=f(y)}
We can solve differential equations of special forms by integration.
dydx=f(y)    1f(y)  dy=1  dx\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=f(y) \; \allowbreak {\Rightarrow \; \int \frac{1}{f(y)} \; \mathrm{d}y = \int 1 \; \mathrm{d}x}
Removal of modulus
lng(y)=x+cg(y)=ex+c=execg(y)=±ecex=Aex\begin{aligned} \ln \left| g(y) \right| &= x + c \\ \left| g(y) \right| &= e^{x+c} = e^x e^c \\ g(y) &= \pm e^c e^x = Ae^x \end{aligned}
Example 3: solving a DE (f(y){f(y)} type)
Find the general solution of the differential equation dydx=12y,{\displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=1-2y,} leaving your answer as y{y} in terms of x.{x.}
112y  dy=1  dxln12y2=x+c12y=e2x2c\begin{aligned} \int \frac{1}{1-2y} \; \mathrm{d}y &= \int 1 \; \mathrm{d}x \\ \frac{\ln \left| 1-2y \right|}{-2} &= x+c \\ \left| 1-2y \right| &= e^{-2x-2c} \end{aligned}
12y=±e2ce2x=Ae2xy=1Ae2x2\begin{aligned} 1-2y &= \pm e^{-2c} e^{-2x} \\ &= Ae^{-2x} \\ y &= \frac{1-Ae^{-2x}}{2} \end{aligned}
Second order DEs
We can solve second order differential equations of the form d2ydx2=f(x){\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d}x^2}=f(x)} by integrating twice.
Example 4: solving a second order DE
Find the general solution of the differential equation d2ydx2=cos3x{\displaystyle \frac{\mathrm{d}^2y}{\mathrm{d}x^2}=\cos 3x}
d2ydx2=cos3xdydx=sin3x3+Cy=cos3x9+Cx+D\begin{aligned} \frac{\mathrm{d}^2y}{\mathrm{d}x^2} &= \cos 3x \\ \frac{\mathrm{d}y}{\mathrm{d}x} &= \frac{\sin 3x}{3} + C \\ y &= -\frac{\cos 3x}{9} + Cx + D \end{aligned}
Problem situations
Many problem situations can be translated to differential equations because of the concept of rates of change.
For example, consider a quantity x.{x.} The rate of change of x{x} is given by dxdt{\frac{\mathrm{d}x}{\mathrm{d}t}} and can be obtained by
dxdt=rate of increase of xrate of decrease of x\displaystyle \frac{\mathrm{d}x}{\mathrm{d}t} = \textrm{rate of increase of } x - \textrm{rate of decrease of } x
Example 5: problem situation
A water tank with V m3{V \textrm{ m}^3} of water inside at time t s{t \textrm{ s}} is being filled up at a rate of 9 m3/s{9 \textrm{ m}^3\textrm{/s}}. At the same time, there is a leak in the tank such that the volume decreases at a rate proportional to the current volume of water inside.
It is given that the volume of water inside the tank remains constant if V=4.5 m3.{V=4.5 \textrm{ m}^3.}
(a) Show that the volume of water inside the tank can be described by dVdt=92V.{\displaystyle \frac{\mathrm{d}V}{\mathrm{d}t}=9-2V.}
(b) Find V{V} in terms of t,{t,} given that the initial volume of water in the tank is 6.75 m3.{6.75 \textrm{ m}^3.}
(c) State what happens to the volume of water in the tank eventually.
(d) Sketch the graph of V{V} against t{t} for the parts relevant to the context of the question.
Rate of increase: 9, rate of decrease: kV{kV}
dVdt=9kV{\frac{\mathrm{d}V}{\mathrm{d}t}=9-kV}
When V=4.5,  dVdt=0{V=4.5, \; \frac{\mathrm{d}V}{\mathrm{d}t}=0}
94.5k=0{9-4.5k = 0}
k=2{k=2}
Hence dVdt=92V.{\displaystyle \frac{\mathrm{d}V}{\mathrm{d}t}=9-2V.}
dVdt=92V{\frac{\mathrm{d}V}{\mathrm{d}t}=9-2V}
192V  dV=1dtln92V2=t+c92V=e2t2c92V=±e2ce2t=Ae2tV=9Ae2t2\begin{aligned} \int \frac{1}{9-2V} \; \mathrm{d}V &= \int 1 \mathrm{d}t \\ \frac{\ln \left| 9-2V \right|}{-2} &= t+c \\ \left| 9-2V \right| &= e^{-2t-2c} \\ 9-2V &= \pm e^{-2c}e^{-2t} = Ae^{-2t} \\ V &= \frac{9-Ae^{-2t}}{2} \end{aligned}
When t=0,  V=6.75.{t=0, \; V=6.75.}
6.75=9Ae02    A=4.5{6.75=\frac{9-Ae^0}{2} \; \Rightarrow \; A=-4.5}
Hence V=9(4.5)e2t2=92+94e2t{V=\frac{9-(-4.5)e^{-2t}}{2}=\frac{9}{2}+\frac{9}{4}e^{-2t}}
As t,  e2t0{t \to \infty, \; e^{-2t} \to 0}
Hence V=92+94e2t92{V = \frac{9}{2} + \frac{9}{4} e^{-2t} \to \frac{9}{2}}
The volume of water in the tank approaches 4.5 m3{4.5 \textrm{ m}^3} eventually.
The parts where V,t>0{V,t > 0} are relevant in this context.
V t 0 0 -0.5 -0.5 0.50.5 11 1.5 1.5 2 2 2.5 2.5 2 2 4 4 66 88ttVV Expression 1 Expression 2 ( 0 , 6 .75 )"V" equals StartFraction, 9 Over 2 , EndFraction plus StartFraction, 9 Over 4 , EndFraction "e" Superscript, minus 2 "t" , Baseline"V" equals 4 .5( 0, 6. 7 5)( 0,6.75)V=92+94e2tV=92+94e2tV=4.5V=4.5
Credits: graph created with Desmos
Substitution
For example, consider an original DE with variables x{x} and y{y}. A substitution is given relating a new variable z{z} to x{x} and y{y}.
Step 1: Differentiate the given substitution implicitly.
(e.g. Find dzdx{\frac{\mathrm{d}z}{\mathrm{d}x}} in terms of dydx{\frac{\mathrm{d}y}{\mathrm{d}x}}, x,y{x, y} and z{z})
Step 2: Replace our old variables and differentials in the original DE with the new.
(e.g. Replace dydx{\frac{\mathrm{d}y}{\mathrm{d}x}} and y{y} to form a DE involving just dzdx{\frac{\mathrm{d}z}{\mathrm{d}x}}, z,x{z,x})
Step 3: Solve the new DE.
(e.g. Find a relation between z{z} and x{x})
Step 4: Replace the new variable back to the original one.
(e.g. Replace z{z} to find a solution involving just y{y} and x{x})
Example 6: solving a DE by substitution
Use the substitution y=zx2{y=zx^2} to find the general solution of xdydx=2y1{x\frac{\mathrm{d}y}{\mathrm{d}x}=2y-1}
Differentiating y=zx2{y=zx^2} implicitly w.r.t. x,{x,}
dydx=dzdxx2+2xz\begin{aligned} \frac{\mathrm{d}y}{\mathrm{d}x} &= \frac{\mathrm{d}z}{\mathrm{d}x}x^2 + 2xz \end{aligned}
2y1x=dzdxx2+2xz2zx21=dzdxx3+2x2zdzdx=1x3\begin{aligned} \frac{2y-1}{x} &= \frac{\mathrm{d}z}{\mathrm{d}x}x^2 + 2xz \\ 2zx^2-1 &= \frac{\mathrm{d}z}{\mathrm{d}x}x^3 + 2x^2z \\ \frac{\mathrm{d}z}{\mathrm{d}x} &= -\frac{1}{x^3} \end{aligned}
z=1x3  dxz=12x2+c\begin{aligned} z &= \int -\frac{1}{x^3} \; \mathrm{d}x \\ z &= \frac{1}{2x^2} + c \end{aligned}
yx2=12x2+cy=12+cx2\begin{aligned} \frac{y}{x^2} &= \frac{1}{2x^2}+c \\ y &= \frac{1}{2}+cx^2 \end{aligned}