### Method of Separation of Variables: Detailed Explanation with Example
The **method of separation of variables** is a technique used to solve **first-order ordinary differential equations (ODEs)** of the form:
$$
\frac{dy}{dx} = f(x)g(y)
$$
This method works by rearranging the equation so that all terms involving $y$ are on one side and all terms involving $x$ are on the other. Once separated, we integrate both sides to find the solution.
---
### **Steps of the Method**
1. **Start with a separable differential equation:**
$$
\frac{dy}{dx} = f(x)g(y)
$$
2. **Rearrange the equation to separate variables:**
$$
\frac{1}{g(y)} \, dy = f(x) \, dx
$$
3. **Integrate both sides:**
$$
\int \frac{1}{g(y)} \, dy = \int f(x) \, dx
$$
4. **Solve the resulting expressions, if possible, to find an explicit solution for $y$ in terms of $x$.**
---
### **Example**
Solve the differential equation:
$$
\frac{dy}{dx} = x y
$$
#### **Step 1: Identify the form**
The equation is already separable because the right-hand side is a product of a function of $x$ and a function of $y$:
$$
\frac{dy}{dx} = x \cdot y
$$
#### **Step 2: Separate the variables**
We divide both sides by $y$ and multiply both sides by $dx$ to separate the variables:
$$
\frac{1}{y} \, dy = x \, dx
$$
#### **Step 3: Integrate both sides**
Now integrate both sides:
$$
\int \frac{1}{y} \, dy = \int x \, dx
$$
$$
\ln |y| = \frac{x^2}{2} + C
$$
Where $C$ is the constant of integration.
#### **Step 4: Solve for $y$**
Exponentiate both sides to eliminate the logarithm:
$$
|y| = e^{\frac{x^2}{2} + C}
$$
Since $e^C$ is a constant, let $A = \pm e^C$, so:
$$
y = Ae^{\frac{x^2}{2}}
$$
---
### **Final Answer:**
$$
\boxed{y = Ae^{\frac{x^2}{2}}}
$$
Where $A$ is an arbitrary constant determined by initial conditions (if any are given).
---
### **Summary**
The method of separation of variables is a powerful and straightforward way to solve differential equations when you can algebraically isolate each variable on opposite sides of the equation. It relies on integrating each side and then solving for the dependent variable. It's widely used in physics, engineering, and mathematical modeling.
Would you like to see how this method is applied to partial differential equations too?