Examples with Separable Variables Differential Equations
This article presents some working examples with separable differential equations.
Definition
Separable Differential Equations are differential equations which respect one of the following forms :
- $\displaystyle \frac{dy}{dx} = F(x,y)$ where F is a two variable function, also continuous.
- $f(y)\;dy=g(x)\;dx$, where f and g are two real continuous functions.
Rational Functions
A rational function $f :\mathbb{R}\to\mathbb{R}$ is a real function respecting $f(x)=\frac{P(x)}{Q(x)}$ where $P,Q$ are polynomials.
Example 1
ProblemSolve: $\frac{d^2y}{dx^2} = 2 + \frac{1}{x}$
WorkingsAs the equation is of first order, integrate the function twice, i.e. $\frac{dy}{dx} = 2x + ln\,x + C$ and $y = x^2 + x\,ln\,x + Cx + K$
Solution$y = x^2 + x\,ln\,x + Cx + K$
Example 2
Problem$\mathbf{\frac{dx}{dy} = 1 - y}$
Workings$dx = (1 - y)\,dy$
Solution$\therefore\;\;\;\;\;\;x = y - \frac{y^2}{2} + C$
Example 3
Problem$\mathbf{\frac{dy}{dx}\;=\;a^2\;+\;y^2}$
Workings$dx\;=\;\frac{dy}{a^2\;+\;y^2}$
Solution$x\;=\;\frac{1}{a}\;arctan\,(\frac{y}{a})\;+\;c$
Example 4
Problem$\mathbf{\frac{dy}{dx}\;=\;\frac{x^2\;-\;1}{y}}$
Workings$y\,dy\;=\;(x^2\;-\;1)\,dx$
Solution$\therefore\;\;\;\;\;\frac{y^2}{2}\;=\;\frac{x^3}{3}\;-\;x\;+\;C$
Example 5
Problem$\mathbf{\frac{dy}{dx}\;=\;\frac{y}{x^2\;-\;1}}$
Workings$\frac{dy}{y}\;=\;\frac{dx}{x^2\;-\;1}$
$\therefore\;\;\;\;\;ln\,y\;=\;\frac{1}{2}\;ln\;\;\left(\frac{x\;+\;1}{x\;-\;1} \right)}$
Solution$\therefore\;\;\;\;\;y\;=\;C\;\sqrt{\;\left(\frac{x\;+\;1}{x\;-\;1} \right)}$
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
Example 11
WorkingsSeparate the Variables
Example 12
Trigonometric Functions
A trigonometric function is a real function $f:\mathbb{R} \to\mathbb{R}$ where $f(x)$ contains one or more of
the trigonometric functions :
- $Sin(x),Cos(x),Tan(x),Cotan(x)$
- $Arcsine(x),Arccos(x),Arctan(x),Arccotan(x)$
Example 1
Problem$\frac{dy}{dx}=\frac{1}{cos^2 \tfrac{1}{2}x}$
WorkingsThis is the same as $y=\int \frac{1}{\cos^2 \tfrac{1}{2}x}dx$
which we integrate in the normal way to yield $y=2\tan \tfrac{1}{2} x + C$
Solution$y=2\tan \tfrac{1}{2} x + C$
Example 2
ProblemSolve the following equation given that y=0 at x=0 $\frac{dy}{dx}=\sec y$
Workings$\sec y \equiv \frac{1}{\cos y}$ so $\frac{dy}{dx}=\sec y$ becomes $\int \cos y\;dy=\int dx$ $\therefore\;\;\;\;\;\;\;\sin y=x+A$
But when x=0, y=0 and so A=0
Example 3
ProblemSolve the following equation: $\frac{r \tan \theta }{a^2-r^2} = d \theta$ when r=0 at $theta=\frac{\pi }{4}$
WorkingsRearrange and integrate $\int {\frac{r}{a^2 - r^2}\dr = \int \frac{1}{\tan \theta} d \theta$
$-\tfrac{1}{2}\ln(a^2-r^2)=\ln \sin \theta +\ln C$ or $\ln \left (\frac{1}{\sqrt{a^2-r^2}} \right )=\ln \left | \sin \theta \cdot C \right |$
$\therefore\;\;\;\;\;\;\frac{1}{\sqrt{a^2 - r^2}} = C \sin \theta$ but r=0 when $theta=\frac{\pi }{4}$ $\therefore\;\;\;\;\;\frac{1}{a}=\frac{C}{\sqrt{2}}$ thus $C=\frac{\sqrt{2}}{a}$
Therefore $\frac{1}{(a^2 - r^2)} = \frac{2}{a^2} \sin^2\theta$
Solution$(a^2-r^2)=\frac{a^2}{2} \textup{cosec}^2 \theta$
This worked example is only visible to registered users.
Sign in to see it.
Physics Examples
Example 1
ProblemIf a and b are the radii of concentric spherical conductors at potentials of $V_1$ respectively, then V is the potential at a distance r from the centre. Find the value of V if: $\frac{d}{dr}\left(r^2 \frac{dV}{dr} \right)=0}$ and $V=V_1$ at r=a and $V=0$ at r=b
Workings$\frac{d}{dr}\left(r^2\frac{dV}{dr} \right)=0$
$\therefore\;\;\;\;\;\;r^2\frac{dV}{dr} \right)=A$
$\frac{dV}{A}=\frac{dr}{r^2}$
$\therefore\;\;\;\;\;\;\frac{V}{A}=-\frac{1}{r}\;+\;B$
Substituting in the given values for V and r $\frac{V_1}{A}=-\frac{1}{a}+B$ and $\frac{0}{A}=-\frac{1}{b}+B$ $\therefore\;\;\;\;\;\;B=\frac{1}{b}$ $\therefore\;\;\;\;\;\;\frac{V_1}{A}=-\frac{1}{a}+\frac{1}{b}=-\frac{b-a}{ab}$ Thus $A=-\frac{abV_1}{b-a}$
Solution$V=\left(\frac{1}{r}-\frac{1}{b} \right)\left(\frac{abV_1}{b-a} \right)$
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
This worked example is only visible to registered users.
Sign in to see it.
Example 7
Linear Type of Differential Equation
Equations of the type
$\frac{dy}{dx} + Py = Q$
Where P and Q are function of x ( but not of y) are said to be linear of the first order
Example 1
Problem$\frac{dy}{dx} + \frac{1}{x}\times y = x^2$
WorkingsIf each side of te equation is multiplied by x the equation becomes:-
$x\frac{dy}{dx} + y = x^3$ i.e $\frac{d}{dx}(xy) = x^3$ Hence integrating $\;x\,y = \frac{1}{4}x^4 + c$
This equation has been solved by using the obvious integrating factor x. It is possible to find a more general solution by using R as and integrating factor.
Consider the following equation : $R\frac{dy}{dx} + R\,P\,y = R\,Q$
By Inspection the left hand side of this equation must reduce to (Ry) $\therefore\;\;\;\;\;\;R\frac{dy}{dx} + RP\,y = \frac{d}{dx}(Ry) = R\frac{dy}{dx} +
y\frac{dR}{dx}$ This gives $RPy = y\,\frac{dR}{dx}$
$\therefore\;\;\;\;\;\;P\,dx = \frac{dR}{R}$ Thus $\int P\,dx = \ln\,R$
$\therefore\;\;\;\;\;\;R = e^{\int P\,dx}$
This gives the rule that to solve $\frac{dy}{dx} + Py = Q$ multiply both sides by an integrating factor of:-
$e^{\int P\,dx}$
SolutionHence the Method of solving this type of equation is :
- Reduce the equation into the form $\mathbf{\frac{dy}{dx} + Py = Q}$
- Multiply through by the Integrating Factor:- $\mathbf{e^{\int P\,dx}}$
- The equation becomes :-$\mathbf{\frac{d}{dx}(Ry) = Q}$
Example 2
Problem$\frac{dy}{dx} + 2xy = 10\,x\,e^{-x^2}$
WorkingsThe Integrating Factor is $\displaystyle e^{\int 2x\,dx$
Thus the equation becomes :-
$\frac{d\left(y\,e^{x^2 }\right)}{dx} = 10\,x$
Solution$\therefore\;\;\;\;\;\;y\,e^{x^2} = 5\,x^2 + Constant$
Example 3
Problem$2x^2\;\frac{dy}{dx} - yx = 3$
Workings$\frac{dy}{dx} - \frac{y}{2x} = \frac{3}{2x^2}$
Therefore the integrating factor is $\displaystyle e^{\int- \frac{1}{2x}dx$
$= e^{- \frac{1}{2}lnx}} = e^{ln\,x^{-\frac{1}{2}}} = x^{-\frac{1}{2}$
Thus the equation reduces down to :-
$\frac{d}{dx}\left(y\;x^{-\,\frac{1}{2} }\right) = \frac{3}{2x^2}\times x^{-\frac{1}{2}} =
\frac{3}{2}\;x^{-\frac{5}{3}}$
SolutionIntegrating:-
$\therefore\;\;\;\;\;\;y\;x^{-\,\frac{1}{2}} = \frac{3}{2}\;x^{-\,\frac{3}{2}}\times \left(-
\frac{2}{3} \right) + K$
$thus\;\;\;\;\;\;y\;= - \frac{1}{x} + K\sqrt{x}$
Example 4
Problem$\frac{dy}{dx} + 3y = e^{2x}$
WorkingsHere the Integrating Factor is $\displaystyle e^{3\,x}$
Multiplying through by this
$e^{3\,x}\;\frac{dy}{dx} + 3\;e^{3\,x}y = e^{5\,x}$
$i.e.\;\;\;\;\;\;\frac{d}{dx}\left(y\;e^{3\,x} \right) = e^{5\,x}$
SolutionIntegrating $y\;e^{3\,x} = \frac{1}{5}\,e^{5\,x} + C$
$\therefore\;\;\;\;\;\;y = \frac{1}{5}\;e^{2x} + C\;e^{- 3x}$
Example 1
ProblemConsider the equation:
$x\;y\;-\frac{dy}{dx} = y^3\;e^{-\,x^2}$
WorkingsDivide through by $y^3$
$x\;\frac{1}{y^2}\;-\,\frac{1}{y^3}\frac{dy}{dx} = e^{-\,x^2}$
$x\;\frac{1}{y^2}\;-\,\frac{1}{2}\frac{d}{dx}\left(\frac{1}{y^2} \right) = e^{-\,x^2}$
Putting $\frac{1}{y} = z$
$2\,xz + \frac{dz}{dx} = 2\,e^{-\,x^2}$
SolutionHence $z = (2x + c)\,e^{-x^2}$ Therefore $\frac{1}{y^2} = (2x + C)\,e^{-x^2}$ Or $y = \pm \frac{e^{\frac{1}{2}x^2}}{\sqrt{(2x + C)}}$
This example is a particular case of The Bernoulli Equation
General Solution of the Bernoulli Equation
This section is presenting the Bernoulli Equation.
$\mathbf{\frac{dy}{dx} + Py = Q\;y^n}$ $P$ and $Q$ are functions of x
This can be reduced to a linear form by putting $\displaystyle z = \frac{1}{y^{(n - 1)}}$
Therefore
$\frac{dz}{dx}\;= - \frac{(n - 1)}{y^n}\;\frac{dy}{dx}$
The original equation can be re-written as:
$\frac{1}{y^n}\;\frac{dy}{dx} + P\;\frac{1}{y^{(n - 1)}} = Q$
$-\frac{1}{(n - 1)}\;\frac{dz}{dx} + Pz = Q$
Homogeneous Equations
Any equation which can be put into the form:
$\mathbf{\frac{dy}{dx} = f\left(\frac{y}{x} \right)}$
is said to be Homogeneous. To test whether a function of x and y can be written in the form of the right hand side, substitute for $y=vx$ . If the result is in the form $f(v)$, i.e. all the x's cancel, then the test is satisfied and the equation is homogeneous.
Example 1
ProblemIs the follow function homogeneous: $\frac{dy}{dx} = \frac{x^2 + y^2}{2x^2}$
WorkingsSubstitute for y=vx, $\frac{dy}{dx} = \frac{x^2 + (vx)^2}{2x^2}$ or $\frac{dy}{dx} = \frac{x^2 + v^2 x^2}{2x^2}$ or $\frac{dy}{dx} = \frac{1 + v^2}{2}$
As all the x have cancelled out, the test is satisfied.
SolutionFunction is homogeous
Example 2
ProblemIs the follow function homogeneous: $\frac{dy}{dx} = \frac{y^3}{x^2}$
WorkingsSubstitute y=vx,
$\frac{dy}{dx} = \frac{vx^3}{x^2}$ or $\frac{dy}{dx} = xv^3$
so not all the x have been removed from this solution, so the test has failed.
SolutionFunction is not homogeneous
The Method of Solution for Homogeneous Equations
Substitute $y = vx$ in both sides of the equation
$\frac{dy}{dx}\;\;becomes\;\;\;\left(v + x\;\frac{dv}{dx} \right)$
Note. If y is a function of x then so is v
Thus the equation can be re-written as:
$v + x\;\frac{dv}{dx} = \frac{1 + v^2}{2}$
Re-writing and Separating the variables:
$\frac{2\;dv}{(v - 1)^2} = \frac{dx}{x}$
Integrating
$\frac{- 2}{(v - 1)} = ln\,x + C$
But
$\frac{- 2}{(v - 1)} = \frac{2x}{x - y}\;\;\;\;\;\left(since \;\;v = \frac{y}{x} \right)$
$\therefore\;\;\;\;\;\;2x = (x - y)\;(ln\,x + C)$
Example 1
Problem$(x + y)dy + (x - y)dx = 0$
WorkingsRearranging $\frac{dy}{dx} = \frac{y - x}{y + x}$
Putting y = vx
$v + x\;\frac{dv}{dx} = \frac{v - 1}{v + 1}$ i.e. $\frac{dv}{dx} = \frac{v - 1}{v + 1} - v\;= - \frac{v^2 + 1}{v + 1}$
$\frac{- v}{v^2 + 1}dv - \frac{dv}{v^2 + 1} = \frac{dx}{x}$
Integrating
$- \frac{1}{2}\;ln(v^2 + 1) - tan^{-1}v = ln\,x + C$ Therefore $2\,ln\,x + ln\,(v^2 + 1) + 2\;tan^{-1}v + 2C = 0$ Therefore $ln\,x^2(v^2 + 1) + 2\;tan^{-1}v + 2C = 0$
SolutionSubstituting for v Therefore $ln\,(y^2 + x^2) + 2\;tan^{-1}\frac{y}{x} + 2C = 0$
The Exceptional Case of Homogeneous Equations
If the straight lines are parallel there is no finite point of intersection and the method of solving such equations is illustrated by the following example.
$\frac{dy}{dx} = \frac{3y - 4x - 2}{3y - 4x - 3}$
Put Z = 3y - 4x and thus $\displaystyle \frac{dZ}{dx} = 3\frac{dy}{dx} - 4$
The equation can now be written as:
$\frac{1}{3}\left(\frac{dZ}{dx} + 4 \right) = \frac{Z - 2}{Z - 3}$
$\therefore\;\;\;\;\;\frac{dZ}{dx} = \frac{3Z - 6}{Z - 3} - 4 = \frac{- Z + 6}{Z - 3}$
$\therefore\;\;\;\;\;\;dx = -\left(\frac{Z - 3}{Z - 6} \right)dZ = \frac{-Z + 6 - 3}{Z - 6}\;dZ = \left(-1\;-\frac{3}{Z - 6} \right)dZ$
Integrating
$x = -Z\;-3\,ln\,(Z - 6) + K$
Replacing Z the solution to the differential equation is :
$3\,ln(3y - 4x - 6) = (3x - 3y) + K$
Exact Equations
The expression
$y\,dx + x\,dy$
is an exact differential.
Thus the equation $y\,dx + x\,dy = 0$ giving that $d(yx) = 0$ i.e. $(yx)=C$ is called an exact Equation.
Example 1
ProblemSolve $\tan y\;dx + \tan x\;dy = 0$
WorkingsThis equation is not exact as it stands but if it is multiplied through by $\cos x \cos y$ it becomes: $\sin y \cos x\;dx + \sin x \cos y\;dy = 0$
SolutionThe solution $\displaystyle sin\,y\;sin\,x = Constant$