Method of Separation of Variables

The method of separation of variables is a fundamental technique used to solve certain types of first-order ordinary differential equations (ODEs). This method is applicable when the differential equation can be rearranged such that all terms involving the dependent variable (say, y) and its differential (dy) are on one side of the equation, and all terms involving the independent variable (say, x) and its differential (dx) are on the other side.

Consider a first-order differential equation of the form:

d y d x = f ( x , y )

This equation can be solved using the method of separation of variables if the function $f(x, y)$ can be expressed as a product of a function of x only and a function of y only. That is, if:

f ( x , y ) = g ( x ) h ( y )

Then the differential equation becomes:

d y = g ( x ) h ( y ) d x

To separate the variables, we divide both sides by $h(y)$ (assuming $h(y) \neq 0$) and multiply by $dx$:

d y = g ( x ) d x

This is the separated form of the differential equation.

Once the variables are separated, we integrate both sides of the equation:

1 h ( y ) d y = g ( x ) d x

Let $G(x)$ be the integral of $g(x)$ with respect to $x$, and $H(y)$ be the integral of $\frac{1}{h(y)}$ with respect to $y$. The general solution of the differential equation is then given by:

H ( y ) = G ( x ) + C

where $C$ is the constant of integration. It is sufficient to add the constant of integration to only one side of the equation.

Steps to Solve a Differential Equation using Separation of Variables:

  1. Check for Separability: Verify if the differential equation $\frac{dy}{dx} = f(x, y)$ can be written in the form $\frac{dy}{dx} = g(x)h(y)$.
  2. Separate the Variables: Rearrange the equation to have all terms involving $y$ and $dy$ on one side, and all terms involving $x$ and $dx$ on the other side. This typically looks like $\frac{1}{h(y)} dy = g(x) dx$.
  3. Integrate Both Sides: Integrate both sides of the separated equation with respect to their respective variables.

    1 h ( y ) d y = g ( x ) d x

  4. Add the Constant of Integration: Add the constant of integration ($C$) to one side of the integrated equation.
  5. Solve for y (if possible): Simplify the resulting equation and, if possible, solve for $y$ in terms of $x$ to obtain the explicit general solution. If solving for $y$ is difficult or not required, the implicit solution is acceptable.

Important Considerations:

  • Division by Zero: Be careful when dividing by functions of $y$ or $x$. If $h(y) = 0$ for some values of $y$, these might correspond to constant solutions (equilibrium solutions) of the differential equation. These solutions should be checked separately. For example, if $h(y_0) = 0$, then $y(x) = y_0$ is a solution if $\frac{dy}{dx} = g(x)h(y)$ becomes $\frac{d(y_0)}{dx} = g(x)h(y_0)$, which simplifies to $0 = g(x) \cdot 0$, which is $0=0$.
  • Domain of Solutions: The solution obtained is valid over an interval where the functions $g(x)$ and $h(y)$ are continuous and $h(y) \neq 0$.

Example 1:

Solve the differential equation $\frac{dy}{dx} = \frac{x^2}{y^2}$.

Solution:

The given differential equation is $\frac{dy}{dx} = \frac{x^2}{y^2}$. This equation is in the form $\frac{dy}{dx} = g(x)h(y)$, where $g(x) = x^2$ and $h(y) = \frac{1}{y^2}$. We can rewrite this as:

y 2 d y = x 2 d x

Now, we integrate both sides:

y 2 d y = x 2 d x

Performing the integration:

y 3 3 = x 3 3 + C

To simplify, we can multiply the entire equation by 3:

y 3 = x 3 + 3 C

Let $C_1 = 3C$ be a new arbitrary constant.

y 3 = x 3 + C 1

The general solution is $y^3 = x^3 + C_1$. We can also express this explicitly as $y = \sqrt[3]{x^3 + C_1}$. We must also consider the case where $h(y) = \frac{1}{y^2} = 0$, which is impossible. However, if the original equation was $\frac{dy}{dx} = x^2 y^2$, then $h(y)=y^2$. In that case, $y=0$ would be a potential solution, which satisfies $0=0$.

Example 2:

Solve the differential equation $\frac{dy}{dx} = \frac{e^x}{y}$.

Solution:

The equation is $\frac{dy}{dx} = e^x \cdot \frac{1}{y}$. Here, $g(x) = e^x$ and $h(y) = \frac{1}{y}$. Separating variables, we get:

y d y = e x d x

Integrating both sides:

y d y = e x d x

This yields:

y 2 2 = e x + C

Multiplying by 2:

y 2 = 2 e x + 2 C

Let $C_1 = 2C$. The general solution is $y^2 = 2e^x + C_1$. The explicit solution is $y = \pm \sqrt{2e^x + C_1}$. We must also consider the case where $h(y) = \frac{1}{y} = 0$, which is impossible. If the equation was $\frac{dy}{dx} = e^x y$, then $h(y)=y$, and $y=0$ would be a solution.

Example 3: Initial Value Problem

Solve the differential equation $\frac{dy}{dx} = xy$ with the initial condition $y(0) = 2$.

Solution:

The equation is $\frac{dy}{dx} = x \cdot y$. Here, $g(x) = x$ and $h(y) = y$. Separating variables:

d y = x d x

For $y \neq 0$, we divide by $y$:

d y = x d x

Integrating both sides:

d y = x d x

ln | y | = x 2 2 + C

Exponentiating both sides:

| y | = e x 2 2 + C = e C e x 2 2

Let $A = e^C$, where $A > 0$. So, $|y| = A e^{x^2/2}$. This means $y = \pm A e^{x^2/2}$. We can write this as $y = K e^{x^2/2}$, where $K = \pm A$. Now, we must check the case $y=0$. If $y=0$, then $\frac{dy}{dx} = 0$. The original equation becomes $0 = x \cdot 0$, which is $0=0$. So $y=0$ is also a solution. This solution is included in $y = K e^{x^2/2}$ if we allow $K=0$. Thus, the general solution is $y = K e^{x^2/2}$ for any real constant $K$. Now, apply the initial condition $y(0) = 2$:

2 = K e 0 2 2 = K e 0 = K 1 = K

So, $K=2$. The particular solution satisfying the initial condition is $y = 2 e^{x^2/2}$.

Exam Shortcut:

When you see a differential equation where the derivative $\frac{dy}{dx}$ can be written as a product of a function of $x$ and a function of $y$, immediately think of separation of variables. The key is to get all $y$ terms with $dy$ on one side and all $x$ terms with $dx$ on the other. The integration step is crucial, so ensure you are comfortable with standard integration formulas. Remember to add the constant of integration to only one side. For JEE Main, problems often involve standard functions like polynomials, exponentials, and trigonometric functions.

Mnemonic: "Separate the SPECIES: y with dy, x with dx!"