31.4 Homogeneous Equations
AHL 5.18
- how to recognise a homogeneous differential equation \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = f\left(\dfrac{y}{x}\right)\)
- how the substitution \(y = vx\) changes it into a separable equation
- (Extension) how to use other substitutions that the question gives you
After the substitution you solve a separable equation, as in Section 31.3.
Homogeneous differential equations
Definition Not in the formula booklet
A first order differential equation is homogeneous if it can be written as
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = f\left(\frac{y}{x}\right), \]
that is, the right-hand side depends only on the ratio \(\dfrac{y}{x}\).
How to check. If the right-hand side is a fraction whose top and bottom have every term of the same total degree in \(x\) and \(y\), divide the top and bottom by the highest power of \(x\). For example,
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{x^2 + 3xy}{y^2 - x^2} = \frac{1 + 3\left(\frac{y}{x}\right)}{\left(\frac{y}{x}\right)^2 - 1} \quad\text{is homogeneous, but}\quad \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{x + y^2}{x} \quad\text{is not.} \]
The substitution y = vx
Let \(y = vx\), where \(v\) is a function of \(x\). By the product rule,
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = v + x\frac{\mathrm{d}v}{\mathrm{d}x} . \]
The equation \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = f\left(\dfrac{y}{x}\right)\) becomes
\[ v + x\frac{\mathrm{d}v}{\mathrm{d}x} = f(v) \quad\Rightarrow\quad x\frac{\mathrm{d}v}{\mathrm{d}x} = f(v) - v \quad\Rightarrow\quad \int \frac{1}{f(v) - v}\,\mathrm{d}v = \int \frac{1}{x}\,\mathrm{d}x , \]
which is separable.
Method for homogeneous equations Not in the formula booklet
- Show the right-hand side is a function of \(\dfrac{y}{x}\).
- Substitute \(y = vx\) and \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = v + x\dfrac{\mathrm{d}v}{\mathrm{d}x}\).
- Separate the variables \(v\) and \(x\), and integrate.
- Replace \(v\) by \(\dfrac{y}{x}\). Use the initial condition.
Example 1 (a) Show that \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{x + 2y}{x}\) is homogeneous, and hence find \(y\) in terms of \(x\).
(b) Given that \(y = 3\) when \(x = 1\), find the particular solution.
(a) \(\dfrac{x + 2y}{x} = 1 + 2\left(\dfrac{y}{x}\right)\), a function of \(\dfrac{y}{x}\) only, so the equation is homogeneous.
Let \(y = vx\): \(\;v + x\dfrac{\mathrm{d}v}{\mathrm{d}x} = 1 + 2v \;\Rightarrow\; x\dfrac{\mathrm{d}v}{\mathrm{d}x} = 1 + v\).
\(\displaystyle\int \frac{1}{1 + v}\,\mathrm{d}v = \int \frac{1}{x}\,\mathrm{d}x \;\Rightarrow\; \ln|1 + v| = \ln|x| + c \;\Rightarrow\; 1 + v = Ax\).
\(1 + \dfrac{y}{x} = Ax \;\Rightarrow\; y = Ax^2 - x\).
(b) \(3 = A - 1\), so \(A = 4\). \(\qquad y = 4x^2 - x\).
Check: \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 8x - 1\) and \(\dfrac{x + 2(4x^2 - x)}{x} = \dfrac{8x^2 - x}{x} = 8x - 1\) ✓.
Example 2 Using the substitution \(y = ux\), where \(u\) is a function of \(x\), solve the differential equation
\[ x^2\frac{\mathrm{d}y}{\mathrm{d}x} = x^2 + xy + y^2 , \]
given that \(x > 0\) and \(y = 1\) when \(x = 1\).
Divide by \(x^2\): \(\;\dfrac{\mathrm{d}y}{\mathrm{d}x} = 1 + \dfrac{y}{x} + \left(\dfrac{y}{x}\right)^2\).
With \(y = ux\): \(\;u + x\dfrac{\mathrm{d}u}{\mathrm{d}x} = 1 + u + u^2 \;\Rightarrow\; x\dfrac{\mathrm{d}u}{\mathrm{d}x} = 1 + u^2\).
\(\displaystyle\int \frac{1}{1 + u^2}\,\mathrm{d}u = \int \frac{1}{x}\,\mathrm{d}x \;\Rightarrow\; \arctan u = \ln x + c\) (as \(x > 0\)).
\(x = 1,\ u = \dfrac{1}{1} = 1\): \(\;\dfrac{\pi}{4} = 0 + c\).
\(\arctan\dfrac{y}{x} = \ln x + \dfrac{\pi}{4} \;\Rightarrow\; y = x\tan\left(\ln x + \dfrac{\pi}{4}\right)\).
Extension — other substitutions
Sometimes a question gives a different substitution, for example \(u = xy\) or \(u = y^2\). The idea is the same: write every derivative of \(y\) in terms of \(u\), and the new equation is easier. This example is a second order equation, which is beyond the AA syllabus.
Example A. Using the substitution \(u = xy\), solve \(\;x\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 2\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6x + 2\).
\(u = xy \Rightarrow \dfrac{\mathrm{d}u}{\mathrm{d}x} = y + x\dfrac{\mathrm{d}y}{\mathrm{d}x} \Rightarrow \dfrac{\mathrm{d}^2u}{\mathrm{d}x^2} = 2\dfrac{\mathrm{d}y}{\mathrm{d}x} + x\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}\).
So the equation is simply \(\dfrac{\mathrm{d}^2u}{\mathrm{d}x^2} = 6x + 2\). Integrate twice:
\(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 3x^2 + 2x + A\), \(\quad u = x^3 + x^2 + Ax + B\).
\[ y = \frac{u}{x} = x^2 + x + A + \frac{B}{x} . \]
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(y = vx \Rightarrow \frac{\mathrm{d}y}{\mathrm{d}x} = v\) | \(\frac{\mathrm{d}y}{\mathrm{d}x} = v + x\frac{\mathrm{d}v}{\mathrm{d}x}\) | \(v\) is a function of \(x\): use the product rule. |
| Leaving the answer in terms of \(v\) | Replace \(v\) by \(\frac{y}{x}\) | The question asks for \(y\) and \(x\). |
| Using the initial condition \(y = 3\) as \(v = 3\) | \(v = \frac{y}{x} = \frac{3}{1}\) | Convert the condition to \(v\) first (or use the final \(x\)–\(y\) form). |
| Cancelling \(v\) wrongly | \(v + xv' = f(v) \Rightarrow xv' = f(v) - v\) | Subtract \(v\) from both sides carefully. |
| Calling \(\frac{x + y^2}{x}\) homogeneous | Degrees must be equal in every term | \(x\) has degree 1, \(y^2\) has degree 2. |
Exercises
1 Which of these differential equations are homogeneous?
(a) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{x - y}{x + y} \qquad\)
(b) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{x^2 + y}{x^2} \qquad\)
(c) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{y^2 + 3xy}{x^2} \qquad\)
(d) \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \mathrm{e}^{y/x} + \dfrac{y}{x}\)
(a) Yes: \(\dfrac{1 - \frac{y}{x}}{1 + \frac{y}{x}}\).
(b) No: \(1 + \dfrac{y}{x^2}\) is not a function of \(\frac{y}{x}\). (c) Yes: \(\left(\frac{y}{x}\right)^2 + 3\frac{y}{x}\).
(d) Yes.
2 Use the substitution \(y = vx\) to solve \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{y + 3x}{x}\), \(x > 0\), given that \(y = 2\) when \(x = 1\).
\(v + xv' = v + 3 \Rightarrow \displaystyle\int 1\,\mathrm{d}v = \int \frac{3}{x}\,\mathrm{d}x \Rightarrow v = 3\ln x + c\).
\(x = 1\): \(v = 2\), so \(c = 2\). \(\qquad y = x(3\ln x + 2)\).
3 Use the substitution \(y = vx\) to find the general solution of \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{2x}{y} + \dfrac{y}{x}\), in the form \(y^2 = f(x)\).
\(v + xv' = \dfrac{2}{v} + v \Rightarrow \displaystyle\int v\,\mathrm{d}v = \int \frac{2}{x}\,\mathrm{d}x \Rightarrow \frac{v^2}{2} = 2\ln|x| + c\).
\(\dfrac{y^2}{x^2} = 4\ln|x| + 2c\), so \(\;y^2 = x^2(4\ln|x| + k)\), where \(k = 2c\).
4 Solve \(2xy\dfrac{\mathrm{d}y}{\mathrm{d}x} = y^2 - x^2\), given that \(y = 1\) when \(x = 1\). Describe the solution curve.
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{v^2 - 1}{2v}\). Then \(xv' = \dfrac{v^2 - 1}{2v} - v = -\dfrac{1 + v^2}{2v}\).
\(\displaystyle\int \frac{2v}{1 + v^2}\,\mathrm{d}v = -\int \frac{1}{x}\,\mathrm{d}x \Rightarrow \ln(1 + v^2) = -\ln|x| + c \Rightarrow 1 + v^2 = \frac{A}{x}\).
Multiply by \(x^2\): \(x^2 + y^2 = Ax\). At \((1, 1)\): \(A = 2\). \(\qquad x^2 + y^2 = 2x\).
This is \((x - 1)^2 + y^2 = 1\): part of the circle with centre \((1, 0)\) and radius 1.
5 Solve \(xy\dfrac{\mathrm{d}y}{\mathrm{d}x} = x^2 + 2y^2\), \(x > 0\), given that \(y = \sqrt{3}\) when \(x = 1\). Give \(y^2\) in terms of \(x\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{v} + 2v\), so \(xv' = \dfrac{1}{v} + v = \dfrac{1 + v^2}{v}\).
\(\displaystyle\int \frac{v}{1 + v^2}\,\mathrm{d}v = \int \frac{1}{x}\,\mathrm{d}x \Rightarrow \frac{1}{2}\ln(1 + v^2) = \ln x + c \Rightarrow 1 + v^2 = Ax^2\).
\(x^2 + y^2 = Ax^4\). At \((1, \sqrt{3})\): \(A = 4\). \(\qquad y^2 = 4x^4 - x^2\).
6 Solve \(x\dfrac{\mathrm{d}y}{\mathrm{d}x} = y + x\,\mathrm{e}^{-y/x}\), \(x > 0\), given that \(y = 0\) when \(x = 1\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = v + \mathrm{e}^{-v}\), so \(xv' = \mathrm{e}^{-v}\).
\(\displaystyle\int \mathrm{e}^{v}\,\mathrm{d}v = \int \frac{1}{x}\,\mathrm{d}x \Rightarrow \mathrm{e}^{v} = \ln x + c\). At \(x = 1\): \(v = 0\), so \(c = 1\).
\(v = \ln(1 + \ln x)\), so \(\;y = x\ln(1 + \ln x)\).
7 Solve \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{y}{x} + \cos^2\left(\dfrac{y}{x}\right)\), \(x > 0\), given that \(y = \dfrac{\pi}{4}\) when \(x = 1\).
\(xv' = \cos^2 v \Rightarrow \displaystyle\int \sec^2 v\,\mathrm{d}v = \int \frac{1}{x}\,\mathrm{d}x \Rightarrow \tan v = \ln x + c\).
At \(x = 1\): \(v = \dfrac{\pi}{4}\), \(\tan v = 1\), so \(c = 1\). \(\qquad y = x\arctan(1 + \ln x)\).
8 Use the substitution \(y = vx\) to show that the general solution of \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{y - x}{y + x}\) can be written as
\[ \frac{1}{2}\ln(x^2 + y^2) + \arctan\frac{y}{x} = c . \]
\(xv' = \dfrac{v - 1}{v + 1} - v = \dfrac{v - 1 - v^2 - v}{v + 1} = -\dfrac{1 + v^2}{v + 1}\).
\(\displaystyle\int \frac{v + 1}{1 + v^2}\,\mathrm{d}v = -\int \frac{1}{x}\,\mathrm{d}x \Rightarrow \frac{1}{2}\ln(1 + v^2) + \arctan v = -\ln|x| + c\).
Now \(\dfrac{1}{2}\ln(1 + v^2) + \ln|x| = \dfrac{1}{2}\ln\big(x^2(1 + v^2)\big) = \dfrac{1}{2}\ln(x^2 + y^2)\). So \(\dfrac{1}{2}\ln(x^2 + y^2) + \arctan\dfrac{y}{x} = c\).
9 Extension Using the substitution \(u = xy\), solve \(x\dfrac{\mathrm{d}y}{\mathrm{d}x} + y = \cos x\), given that \(y = \dfrac{1}{\pi}\) when \(x = \dfrac{\pi}{2}\).
\(\dfrac{\mathrm{d}u}{\mathrm{d}x} = y + x\dfrac{\mathrm{d}y}{\mathrm{d}x} = \cos x \Rightarrow u = \sin x + c\).
At \(x = \dfrac{\pi}{2}\): \(u = \dfrac{\pi}{2} \times \dfrac{1}{\pi} = \dfrac{1}{2}\), so \(\dfrac{1}{2} = 1 + c\), \(c = -\dfrac{1}{2}\).
\(y = \dfrac{\sin x - \frac{1}{2}}{x} = \dfrac{2\sin x - 1}{2x}\).
10 Extension Using the substitution \(u = xy\), find the general solution of \(x\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 2\dfrac{\mathrm{d}y}{\mathrm{d}x} = 12x^2\).
As in Example A, \(\dfrac{\mathrm{d}^2u}{\mathrm{d}x^2} = 12x^2\). So \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 4x^3 + A\) and \(u = x^4 + Ax + B\).
\(y = x^3 + A + \dfrac{B}{x}\).