Solve the separable differential equation dy/dx = xy.

Solution

Differential Equations · Medium

Step 1: Recognize that the equation is separable.

The equation is:
dy/dx = xy

We can separate the variables so that all y-terms are on one side and all x-terms are on the other.

Step 2: Separate the variables for y ≠ 0.

Divide both sides by y and multiply by dx:

(1/y) dy = x dx

Step 3: Integrate both sides.

∫ (1/y) dy = ∫ x dx

This gives:
ln|y| = x^2/2 + C

Step 4: Solve for y.

Exponentiate both sides:

|y| = e^(x^2/2 + C)

Using e^(a + b) = e^a e^b:

|y| = e^C e^(x^2/2)

The arbitrary constant can absorb the sign and the factor e^C, so we write:

y = Ce^(x^2/2)

Step 5: Include the equilibrium solution.

During separation, we divided by y, so we should check y = 0 separately.

If y = 0, then dy/dx = 0 and xy = 0, so y = 0 is also a solution. It is included in y = Ce^(x^2/2) by taking C = 0.

Step 6: Check the general solution.

Differentiate:
y' = Cxe^(x^2/2)

Since y = Ce^(x^2/2):
y' = xy

Therefore, the general solution is y = Ce^(x^2/2).

Result

y = Ce^(x^2/2)