7.2 Some special types of DE

7.2.1 Separable type

Equations of the form

dy∕dx = f(x)g(y)

are called separable. They are dealt with in the following way: Divide both sides by g(y), and integrate both sides with respect to x,

\begin{eqnarray*} \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over g(y)} {dy\over dx}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits f(x)\kern 1.66702pt dx,%& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over g(y)}\kern 1.66702pt dy& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits f(x)dx\quad .%& \\ \end{eqnarray*}

Now do both integrals.

Example 7.3: 

Solve the DE

{dy\over dx} = 2x{y}^{2}

, given that y = 1∕2 when x = 0.

Solution: 

Divide by {y}^{2}, and obtain

{1\over { y}^{2}} {dy\over dx} = 2x.

Now integrate both sides with respect to x

\begin{eqnarray*} \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over { y}^{2}} {dy\over dx}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits 2x\kern 1.66702pt dx\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over { y}^{2}}dy& =& {x}^{2} + k\quad , %& \\ −{1\over y}& =& {x}^{2} + k\quad , %& \\ y& =& − {1\over { x}^{2} + k}\quad .%& \\ \end{eqnarray*}

This is the general solution, but we know that at x = 0, y = 1∕2. Substituting this we find that 1∕2 = −1∕k, therefore k = −2 and

\class{boxed}{y = − {1\over { x}^{2} − 2} = {1\over 2 − {x}^{2}}. }

Example 7.4: 

Find the general solution of

2y(x + 1){dy\over dx} = 4 + {y}^{2}.

Solution: 

Rearrange as

{dy\over dx} = {4 + {y}^{2}\over 2y(x + 1)}.

So here f(x) = 1∕(x + 1), g(y) = {4+{y}^{2}\over 2y} . Divide by g(y),

{2y\over 4 + {y}^{2}} {dy\over dx} = {1\over x + 1}\quad .

Integrate both sides with respect to x

\begin{eqnarray*} \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2y\over 4 + {y}^{2}} {dy\over dx}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over x + 1}\kern 1.66702pt dx\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2y\over 4 + {y}^{2}}dy& =& \mathop{ln}\nolimits (x + 1) + k\quad ,%& \\ \mathop{ln}\nolimits (4 + {y}^{2})& =& \mathop{ln}\nolimits (x + 1) + k\quad .%& \\ \end{eqnarray*}

We write k =\mathop{ ln}\nolimits A, with A also arbitrary, but positive. We find

\mathop{ln}\nolimits (4 + {y}^{2}) =\mathop{ ln}\nolimits (x + 1) +\mathop{ ln}\nolimits A =\mathop{ ln}\nolimits (A(x + 1)),

Thus 4 + {y}^{2} = A(x + 1), or isolating y,

\class{boxed}{y = ±\sqrt{A(x + 1) − 4}. }

Example 7.5: 

N(t) satisfies the DE

{dN\over dt} = αN.

Given that N = 10 at t = 0 find N at t = 3.

Solution: 

Here f(t) = α, i.e., a constant, and g(N) = N, so

\begin{eqnarray*} 1∕NdN∕dt& =& α\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over N} {dN\over dt} \kern 1.66702pt dt& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits α\kern 1.66702pt dt\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over N}\kern 1.66702pt dN& =& αt + k\quad ,%& \\ \mathop{ln}\nolimits N& =& αt + k\quad ,%& \\ N& =& {e}^{k}{e}^{αt}\quad , %& \\ N& =& A{e}^{αt}\quad . %& \\ \end{eqnarray*}

Since at t = 0, N = 10, we have A = 10, and

\class{boxed}{N = 10{e}^{αt}\quad . }

At t = 3, N = 10{e}^{3α}.

7.2.2 linear type

These have form,

{dy\over dx} + p(x)y = q(x)
(7.1)

Method as follows

N.B. Remember the method not the final formula!

Example 7.6: 

Find the general solution of

{dy\over dx} + (\mathop{tan}\nolimits x)y = 3\mathop{cos}\nolimits x\quad .
(7.4)

Solution: 

Here p =\mathop{ tan}\nolimits x so s =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits \mathop{tan}\nolimits x\kern 1.66702pt dx =\mathop{ ln}\nolimits (\mathop{sec}\nolimits x) (no constant of integration needed here), {e}^{s} = {e}^{\mathop{ln}\nolimits (\mathop{sec}\nolimits x)} =\mathop{ sec}\nolimits x. Multiply both sides of (7.4) by {e}^{s} =\mathop{ sec}\nolimits x:

\mathop{sec}\nolimits x\kern 1.66702pt {dy\over dx} +\mathop{ sec}\nolimits (x)\mathop{tan}\nolimits (x)y = 3\mathop{cos}\nolimits (x)\mathop{sec}\nolimits (x)\quad .

The l.h.s. is the differential of {e}^{s}y so we find

{d\mathop{sec}\nolimits (x)y\over dx} = 3\quad .

Integrate this and find

(\mathop{sec}\nolimits x)y = 3x + k\quad .

Thus, finally,

\class{boxed}{y = (3x + k)\mathop{cos}\nolimits x\quad . }

Example 7.7: 

Solve the DE

x{dy\over dx} + 2y = 4x,
(7.5)

given that y = 0 when x = 1.

Solution: 

Rearrange (7.5) ,

{dy\over dx} + {2\over x}y = 4\quad ,
(7.6)

which is of linear form with p = {2\over x}. We find

\begin{eqnarray*} s& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits p\kern 1.66702pt dx =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits {2\over x}\kern 1.66702pt dx = 2\mathop{ln}\nolimits x =\mathop{ ln}\nolimits ({x}^{2})\quad ,%& \\ \end{eqnarray*}

and {e}^{s} = {e}^{\mathop{ln}\nolimits ({x}^{2}) } = {x}^{2}. Multiply (7.6) by {e}^{s} = {x}^{2}, and find

{x}^{2} {dy\over dx} + 2xy = 4{x}^{2}\quad .

the l.h.s. is differential of {e}^{s}y = {x}^{2}y. Integrate this and find

\begin{eqnarray*}{ x}^{2}y& =& 4{x}^{3}∕3 + k\quad \text{, or}%& \\ y& =& 4x∕3 + k∕{x}^{2}\quad .%& \\ \end{eqnarray*}

This is the general solution. We know that when x = 1 then y = 0 so

0 = 4∕3 + k∕1

. Therefore k = −4∕3 and

\class{boxed}{y = {4\over 3}(x − {1\over { x}^{2}})\quad . }

7.2.3 Homogeneous Type

We first need to define a function of two variables:

If f(x,y) is a function of 2 variables, it delivers a number on specification of x and y.
Examples:
x + y, y\mathop{cos}\nolimits (πx), {\mathop{ln}\nolimits y\over { x}^{2}+{y}^{2}} .
If x = 1 and y = 2 in the above we get 3, − 2, {1\over 5}\mathop{ ln}\nolimits 2.
Now we can define a homogeneous function:
A homogeneous function of 2 variables is one where we have a sum of terms all of which have the same total power (called degree).
Examples

function degree


{x}^{2} + xy + {y}^{2}2
x + 2y1
{{x}^{2}\over y} + {{y}^{2}\over x} 1
1 + {x\over y} + {{x}^{2}\over {y}^{2}} 0
xy2
{x}^{2} + ynot homogeneous
x + y + 1not homogeneous


There is a simple test to see if f(x,y) is homogeneous. Replace x by λx and y by λy to get f(λx,λy). If f(λx,λy) = {λ}^{n}f(x,y) then f is homogeneous with degree n.

Example 7.8: 

A homogeneous DE is one of type {dy\over dx} = {f(x,y)\over g(x,y)} , with g and f both homogeneous and of the same degree.

Homogeneous DEs can be made separable by the substitution y = xv. We shall demonstrate this by means of examples:

Example 7.9: 

Find general solution of

{dy\over dx} = {x + 2y\over 2x − y}\quad .

Solution: 

Put y = xv(x), then {dy\over dx} = v + x{dv\over dx}, so

\begin{eqnarray*} v + x{dv\over dx}& =& {x + 2xv\over 2x − xv} = {1 + 2v\over 2 − v} \quad .%& \\ \end{eqnarray*}

therefore

\begin{eqnarray*} x{dv\over dx}& =& {1 + 2v\over 2 − v} − v = {1 + {v}^{2}\over 2 − v} \quad ,%& \\ {dv\over dx}& =& {1\over x}\bigg ({1 + {v}^{2}\over 2 − v} \bigg ) %& \\ \end{eqnarray*}

which is separable. This can be solved in the standard way,

\begin{eqnarray*} \Big ( {2 − v\over 1 + {v}^{2}}\Big ){dv\over dx}& =& {1\over x}\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits \Big ( {2 − v\over 1 + {v}^{2}}\Big ){dv\over dx}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {1\over x}\kern 1.66702pt dx\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2 − v\over (1 + {v}^{2})}\kern 1.66702pt dv& =& \mathop{ln}\nolimits x + k\quad ,%& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2\over (1 + {v}^{2})}\kern 1.66702pt dv −{1\over 2}\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {2v\over (1 + {v}^{2})}\kern 1.66702pt dv& =& \mathop{ln}\nolimits x + k\quad ,%& \\ 2{\mathop{tan}\nolimits }^{−1}v −{1\over 2}\mathop{ln}\nolimits (1 + {v}^{2})& =& \mathop{ln}\nolimits x + k\quad .%& \\ \end{eqnarray*}

And we conclude that

\class{boxed}{2{\mathop{tan}\nolimits }^{−1}\big ({y\over x}\big ) −{1\over 2}\mathop{ln}\nolimits \big (1 + {y\over x}\big ) =\mathop{ ln}\nolimits x + k\quad . }

(We can also replace k with \mathop{ln}\nolimits A.)

Often we need to rearrange the equation first to get a homogeneous form, as in the following example.

Example 7.10: 

Solve

xy{dy\over dx} − {y}^{2} = 3{x}^{2}\quad ,

given y = 1 when x = 1.

Solution: 

Rearrange as

{dy\over dx} = {3{x}^{2} + {y}^{2}\over xy} \quad .

This is therefore a homogeneous DE. We substitute y = xv,

v + x{dv\over dx} = {3{x}^{2} + {x}^{2}{v}^{2}\over {x}^{2}v} = {3 + {v}^{2}\over v} = {3\over v} + v\quad .

We can now turn the crank,

\begin{eqnarray*} x{dv\over dx}& =& {3\over v}\quad , %& \\ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v{dv\over dx}\kern 1.66702pt dx& =& \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {3\over x}\kern 1.66702pt dx\quad , %& \\ {{v}^{2}\over 2} & =& 3\mathop{ln}\nolimits x + k\quad , %& \\ 1∕2{y}^{2}∕{x}^{2}& =& 3\mathop{ln}\nolimits x + k\quad , %& \\ {y}^{2}& =& 2{x}^{2}(3\mathop{ln}\nolimits x + k)\quad ,%& \\ \end{eqnarray*}

which is the general solution. Imposing the condition that for x = 1, y = 1, we obtain 1 = 2(0 + k), and therefore k = 1∕2. The solution is thus

\class{boxed}{{y}^{2} = 2{x}^{2}(2\mathop{ln}\nolimits x + 1∕2). }