We considered examples of linear first order differential equations of the form
$$\frac{dy}{dx} = ay + b$$in the Introduction. These can be solved by the method of separation of variables. We now consider more general first order equations
$$\frac{dy}{dx} = f(x, y)$$for some $f$ such that they can be rearranged into a "separated form."
Suppose
$$M(x) + N(y)\frac{dy}{dx} = 0$$such that
$$H_1'(x) = M(x), \qquad H_2'(y) = N(y).$$Then
$$H_1(x) + H_2(y) = c,$$for some constant $c$.
where we have applied the Chain rule in the last computation:
$$\frac{d}{dx}H_2(y) = H_2'(y)\frac{dy}{dx}.$$Hence
$$H_1(x) + H_2(y) = c.$$The above is a solution to the separable DE in the implicit form. It is generally rare that one can solve $y$ as a function of $x$ only.
We also write the separated DE in the form
$$\boxed{M(x)\,dx + N(y)\,dy = 0,}$$and hence here is where the origin of the method of separation of variables. The next step corresponds to
$$\int M(x)\,dx = -\int N(y)\,dy,$$or
$$H_1(x) + H_2(y) = c.$$Solve $\;\displaystyle\frac{dy}{dx} = \frac{x^2}{1 - y^2}.$
We rearrange the DE into the form
$$-x^2 + (1 - y^2)\frac{dy}{dx} = 0.$$So according to our earlier derivation there are $H_1(x)$ and $H_2(y)$ such that $H_1'(x) = -x^2$ and $H_2'(y) = (1 - y^2)$. Thus
\begin{align} 0 &= -x^2 + (1 - y^2)\frac{dy}{dx} \\[6pt] &= \frac{d}{dx}\Big(-\frac{x^3}{3} + y - \frac{y^3}{3}\Big) = 0. \end{align}Hence
for some constant $c$.
We note that it would be too complicated to express $y$ in terms of $x$ only in the above solution. The solution remains in implicit form.
Solve the IVP $\;\displaystyle\frac{dy}{dx} = \frac{3x^2 + 4x + 2}{2(y-1)}, \quad y(0) = -1.$
We could write
$$-(3x^2 + 4x + 2) + 2(y - 1)\frac{dy}{dx} = 0 \tag{1}$$and proceed as in the above example:
$$\frac{d}{dx}\Big(-(x^3 + 2x^2 + 2x) + \frac{(y-1)^2}{2}\Big) = 0.$$Or we simply "separate" the variables of (1) into the form
$$\int 3x^2 + 4x + 2\,dx = \int 2(y - 1)\,dy.$$This yields
$$x^3 + 2x^2 + 2x = (y - 1)^2 + c$$for some constant $c$. Substitute the initial condition $y(0) = -1$ yields
$$0 = (-1 - 1)^2 + c,$$so that $c = -4$. That is,
$$(y - 1)^2 = x^3 + 2x^2 + 2x + 4,$$or, in this exceptional case,
$$y(x) = 1 \pm \sqrt{x^3 + 2x^2 + 2x + 4}.$$But only the
would fulfill the initial condition $y(0) = -1$ and in which case the curve passes through the point $(-2, 1)$ (but $y'(-2, 1)$ is undefined).
The direction field for this IVP shows the solution curve passing through $(0, -1)$ with a cusp at $(-2, 1)$ where the derivative becomes undefined. The solution exists for $x > -2$.
Solve $\;\displaystyle\frac{dy}{dx} = \frac{4x - x^3}{4 + y^3}, \quad y(0) = 1.$
We compute directly,
$$\int (4x - x^3)\,dx = \int (4 + y^3)\,dy.$$Then
$$2x^2 - \frac{x^4}{4} = 4y + \frac{y^4}{4} + c,$$or
$$y^4 + 16y + x^4 - 8x^2 + c = 0.$$Substituting $y(0) = 1$ yields
Can you draw the curve that passes through $y(0) = 1$? We further note that $\dfrac{dy}{dx}$ is undefined when $y^3 + 4 = 0$, that is $y = (-4)^{1/3} \approx -1.5874$. So the corresponding $y$ coordinates can be computed numerically from
$$y^4 + 16y + x^4 - 8x^2 - 17 = 0$$and are
$$(-3.348, -1.5874), \quad (3.348, -1.5874).$$A function $f(x, y)$ is said to be homogeneous of degree $n$ if
$$f(\lambda x, \lambda y) = \lambda^n f(x, y), \qquad \lambda \in \mathbb{C}.$$Example 1. Consider $f(x, y) = x^3 - x^2 y$. Then
$$f(\lambda x, \lambda y) = \lambda^3 x^3 - (\lambda^2 x^2)\lambda y = \lambda^3(x^3 - x^2 y) = \lambda^3 f(x, y).$$So $f$ is a homogeneous function of degree 3.
Example 2. Consider $f(x, y) = e^{2x/y} + \sin \dfrac{y}{x}$. Then
$$f(\lambda x, \lambda y) = e^{2\lambda x/(\lambda y)} + \sin \frac{\lambda y}{\lambda x} = e^{2x/y} + \sin \frac{y}{x} = \lambda^0 f(x, y).$$So $f$ is a homogeneous function of degree 0.
Example 3. Consider $f(x, y) = y^2 + \sin y \sin x$. Then
$$f(\lambda x, \lambda y) = \lambda^2 y^2 + \sin \lambda y \sin \lambda x \neq \lambda^n f(x, y)$$for any integer $n$. So $f$ is not homogeneous.
Example. Solve $\;x^3 + y^3 = 3xy^2\dfrac{dy}{dx}.$
Note that $M(x, y) = x^3 + y^3$ and $N(x, y) = 3xy^2$ are both homogeneous functions of degree 3. Substitute $y = vx$ and $dy = v\,dx + x\,dv$ into the DE yields
$$(1 - 2v^3)\,dx - 3v^2 x\,dv = 0,$$or
$$\frac{3v^2}{1 - 2v^3}\,dv = \frac{dx}{x}.$$Integrating both sides yields
$$-\frac{1}{2}\ln|1 - 2v^3| = \ln|x| + c_1$$ $$\ln|1 - 2v^3| = -2\ln|x| + c_2$$ $$|1 - 2v^3| = \frac{C}{x^2}$$Thus
Suppose $M(x, y)$ and $N(x, y)$ are both homogeneous of degree $n$. Then the differential equation
$$M(x, y)\,dx + N(x, y)\,dy = 0$$can be transformed into a first order separable differential equation.
where
$$M_1(x/y) = M(1, y/x), \qquad N_1(x/y) = N(1, y/x).$$Since $y = vx$ so that $dy = v\,dx + x\,dv$. Thus the above DE can be re-written as
$$M_1(v)\,dx + N_1(v)(v\,dx + x\,dv) = 0,$$which can be written into a separable form
$$\frac{dx}{x} + \frac{N_1(v)\,dv}{M_1(v) + vN_1(v)} = 0.$$In each of the following problems, solve the initial value problem, plot a graph and determine the interval in which the solution is defined.
Given the differential equation:
$$\frac{dy}{dx} = \frac{x^2}{1 - y^2}$$What method should we use to solve this DE?
What's the first step?
Good. Now what's the next step?
What do we do with the integration results?
Rearranging $\dfrac{dy}{dx} = \dfrac{x^2}{1-y^2}$ into separated form, what is $M(x)$?
What is $N(y)$?
$\displaystyle\int M(x)\,dx = \int -x^2\,dx = H_1(x) = \;?$
$\displaystyle\int N(y)\,dy = \int (1 - y^2)\,dy = H_2(y) = \;?$
Final implicit solution $H_1(x) + H_2(y) = c$:
For each function, determine if it is homogeneous and find its degree.
$f(x, y) = x^3 - x^2 y$. Is this homogeneous? If so, what degree?
$f(x, y) = e^{2x/y} + \sin \dfrac{y}{x}$. Is this homogeneous? If so, what degree?
$f(x, y) = y^2 + \sin y \sin x$. Is this homogeneous?
Given the differential equation:
$$x^3 + y^3 = 3xy^2\frac{dy}{dx}$$What method should we use to solve this DE?
What's the first step?
After confirming homogeneity, what's next?
After substituting, what should happen?
After solving for $v$, what's the final step?
Rewrite in the form $M\,dx + N\,dy = 0$. With $M = x^3 + y^3$ and $N = -3xy^2$, substitute $y = vx$:
$(x^3 + v^3 x^3)\,dx + (-3x \cdot v^2 x^2)(v\,dx + x\,dv) = 0$
Simplify to get:
Separate variables from $(1 - 2v^3)\,dx = 3v^2 x\,dv$:
Integrate $\displaystyle\int \dfrac{3v^2}{1 - 2v^3}\,dv$. (Hint: use substitution $u = 1 - 2v^3$)
From $\ln|x| = -\frac{1}{2}\ln|1 - 2v^3| + c_1$, solve for the relationship and substitute $v = y/x$:
Solve the IVP:
$$\frac{dy}{dx} = \frac{3x^2 + 4x + 2}{2(y-1)}, \quad y(0) = -1$$What type of DE is this? What method should we use?
First step for a separable IVP?
After finding the general solution with constant $c$, what's next?
If the solution involves $y = 1 \pm \sqrt{\cdots}$, how do we choose the sign?
Separate and integrate: $\displaystyle\int 2(y-1)\,dy = \int (3x^2 + 4x + 2)\,dx$. Result:
Apply $y(0) = -1$: $((-1)-1)^2 = 0 + 0 + 0 + c$. What is $c$?
So $(y-1)^2 = x^3 + 2x^2 + 2x + 4$, giving $y = 1 \pm \sqrt{x^3 + 2x^2 + 2x + 4}$. Which sign?
— End of Separation of Variables Notes —