Differential equations with variables separable

A first-order differential equation often ties xx, yy and dydx\dfrac{dy}{dx} together in one tangled expression. But sometimes the tangle comes apart cleanly: every yy-term (with dydy) can be dragged to one side, every xx-term (with dxdx) to the other, and the equation is solved just by integrating each side on its own. This is the variables-separable method — the first concrete solving technique taught in the CBSE Class 12 Differential Equations chapter, right after order, degree and the idea of a general versus particular solution. It matters beyond this one chapter too: the next topic, homogeneous equations, works by using a clever substitution to force a stubborn, mixed-up equation into exactly this separable shape, so mastering separation here pays off immediately afterwards.

The core insight

If dydx=h(x) g(y)\dfrac{dy}{dx} = h(x)\,g(y), sending all yy-terms to one side and all xx-terms to the other turns the differential equation into two ordinary integrals joined by a single arbitrary constant.

The core idea

A first-order differential equation is said to have variables separable when it can be written as a product of a pure function of xx and a pure function of yy:

dydx=h(x) g(y)\frac{dy}{dx} = h(x)\, g(y)

where: h(x)h(x) depends only on xx, g(y)g(y) depends only on yy, and dydx\dfrac{dy}{dx} is the rate of change linking them. Recognising this shape is the whole game — if the right-hand side cannot be factored this way, the method simply does not apply. Once the shape is confirmed, divide both sides by g(y)g(y) (assuming g(y)≠0g(y) \neq 0) and multiply by dxdx to physically separate the differentials:

dyg(y)=h(x) dx.\frac{dy}{g(y)} = h(x)\,dx.

where: each side now contains only one variable together with its own differential, so the two sides can be treated as completely independent integration problems. Integrating both sides independently gives the general solution:

∫dyg(y)=∫h(x) dx+C,\int \frac{dy}{g(y)} = \int h(x)\,dx + C,

where: CC is a single arbitrary constant. Each side technically produces its own constant of integration, but since only their difference matters, the two collapse into one net constant CC written on either side — never both. The figure below shows the separation as a literal rearrangement: terms migrate across the equals sign until yy-stuff and xx-stuff sit on opposite banks, ready to be integrated.

Figure
A differential equation with mixed x and y terms on the left splitting into two separated integrals on the right
Separating the variables dy/dx = h(x) g(y) mixed together separate dy/g(y) = h(x) dx y-side and x-side apart integrate integral dy/g(y) = integral h(x) dx + C general solution, one constant C

Not every equation qualifies. When xx and yy are genuinely mixed — a sum like x+yx + y, for instance — the right-hand side cannot be split into a pure-xx factor times a pure-yy factor, and a different technique is needed. That is precisely the motivation for the homogeneous-equation method taught next: a substitution (y=vxy = vx) that turns certain non-separable equations into separable ones, bringing them back within reach of this same integration approach.

Derivation ADeriving the general solution of a separable equation

The goal is to show, starting from nothing but the defining shape dydx=h(x)g(y)\dfrac{dy}{dx} = h(x)g(y) and the ordinary rules of algebra and integration, exactly why dividing by g(y)g(y) and integrating both sides independently produces a valid general solution containing precisely one arbitrary constant — not zero, and not two.

Step 1. Start from the assumed separable form, dydx=h(x) g(y)\dfrac{dy}{dx} = h(x)\,g(y), with g(y)≠0g(y) \neq 0 on the interval of interest. Since g(y)≠0g(y) \neq 0, dividing both sides by g(y)g(y) is a legitimate algebraic step and preserves the equation exactly:

1g(y)⋅dydx=h(x).\frac{1}{g(y)}\cdot\frac{dy}{dx} = h(x).

Step 2. Treat dy/dxdy/dx as if dydy and dxdx can be separated (this is justified rigorously by the chain rule when both sides are integrated with respect to xx, but informally it is just "multiply across"), giving

dyg(y)=h(x) dx.\frac{dy}{g(y)} = h(x)\,dx.

The left side is now a function of yy alone with dydy, and the right side a function of xx alone with dxdx — the two variables no longer appear on the same side together.

Step 3. Integrate the left side with respect to yy and the right side with respect to xx, independently:

∫1g(y) dy=∫h(x) dx.\int \frac{1}{g(y)}\,dy = \int h(x)\,dx.

Each of these is an ordinary indefinite integral, evaluated using whatever standard technique applies (power rule, substitution, standard forms, and so on, from the Integrals chapter).

Step 4. Every indefinite integral carries its own arbitrary constant, so strictly the equation reads F(y)+C1=G(x)+C2F(y) + C_1 = G(x) + C_2, where FF and GG are antiderivatives of 1/g(y)1/g(y) and h(x)h(x) respectively. Since C1C_1 and C2C_2 are both arbitrary, their difference C2−C1C_2 - C_1 is itself just some arbitrary constant; call it CC. Moving it to one side gives the general solution in its standard form:

F(y)=G(x)+C.F(y) = G(x) + C.

This single relation between xx, yy and one constant CC is the general solution — it represents an entire family of curves, one for each value of CC, and a specific member of that family is picked out only when an initial condition fixes CC to a particular number.

Worked example

Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}, given that y=4y = 4 when x=3x = 3.

Step 1. Confirm the equation is separable: dydx=x⋅1y\dfrac{dy}{dx} = x \cdot \dfrac{1}{y} is a pure function of xx times a pure function of yy, so the method applies directly.

Step 2. Separate the variables by cross-multiplying:

y dy=x dx.y\,dy = x\,dx.

Step 3. Integrate both sides:

∫y dy=∫x dx  ⟹  y22=x22+C1.\int y\,dy = \int x\,dx \implies \frac{y^2}{2} = \frac{x^2}{2} + C_1.

Step 4. Simplify to the standard general-solution form. Multiplying through by 22 and writing C=2C1C = 2C_1:

y2=x2+C.y^2 = x^2 + C.

Step 5. Apply the initial condition x=3, y=4x = 3,\ y = 4 to pin down CC:

16=9+C  ⟹  C=7.16 = 9 + C \implies C = 7.

Step 6. Write the particular solution:

y2=x2+7,or equivalently y2−x2=7.y^2 = x^2 + 7, \quad \text{or equivalently } y^2 - x^2 = 7.

Check: differentiating y2−x2=7y^2 - x^2 = 7 implicitly gives 2ydydx−2x=0  ⟹  dydx=xy2y\dfrac{dy}{dx} - 2x = 0 \implies \dfrac{dy}{dx} = \dfrac{x}{y}, which matches the original equation exactly, and x=3,y=4x=3,y=4 satisfies 16−9=716-9=7. The particular solution is y2−x2=7y^2 - x^2 = 7.

Competitive stretch

Solve dydx=ex−y\dfrac{dy}{dx} = e^{x-y}.

Step 1. Rewrite using laws of exponents: dydx=ex⋅e−y\dfrac{dy}{dx} = e^x \cdot e^{-y}, which is separable since it is a pure-xx factor times a pure-yy factor.

Step 2. Separate by multiplying both sides by eye^{y}: ey dy=ex dxe^{y}\,dy = e^{x}\,dx.

Step 3. Integrate: ∫ey dy=∫ex dx  ⟹  ey=ex+C\displaystyle\int e^{y}\,dy = \int e^{x}\,dx \implies e^{y} = e^{x} + C.

The general solution is ey=ex+Ce^{y} = e^{x} + C, equivalently y=ln⁡(ex+C)y = \ln(e^x + C) wherever ex+C>0e^x + C > 0.

Common traps

  • Dividing by g(y)g(y) without noting where it could be zero. The separation step assumes g(y)≠0g(y) \neq 0; CBSE problems rarely test this edge case explicitly, but a careful answer flags it.
  • Writing two constants instead of combining them into one. Integrating each side independently technically produces C1C_1 and C2C_2 — these must be merged into a single CC in the final general solution, not left floating on both sides.
  • Forcing a separation that is not algebraically valid. An equation like dydx=x+y\dfrac{dy}{dx} = x + y cannot be split into a pure function of xx times a pure function of yy; it needs the homogeneous-equation substitution instead, not a forced separation.
  • Sign or algebra slips while rearranging exponential or fractional terms. A misplaced sign while moving a term across the equals sign silently changes the entire family of solutions.

Ask the tutor: if you're unsure whether a given equation is truly separable, or how to separate a trickier expression mixing exponentials or trig terms, ask your AI tutor to walk through the separation step before you integrate.

Why does integrating both sides only need one constant C, when each side technically has its own?

Each indefinite integral does produce its own constant, so strictly you get F(y)+C1=G(x)+C2F(y) + C_1 = G(x) + C_2. But C1C_1 and C2C_2 are both arbitrary numbers, so their difference C2−C1C_2 - C_1 is itself just some arbitrary constant. Renaming that difference as a single CC and moving it to one side gives F(y)=G(x)+CF(y) = G(x) + C — one net constant is all the equation needs, and writing two is redundant, not more correct.

How do I know whether a differential equation is separable at all?

Check whether the right-hand side of dy/dx=(something)dy/dx = (\text{something}) can be factored into a piece that depends only on xx multiplied by a piece that depends only on yy. If you can write it as h(x) g(y)h(x)\,g(y), it is separable. Sums like x+yx + y, or expressions where xx and yy are genuinely tangled together, usually cannot be factored this way — those need a different method, such as the homogeneous-equation substitution covered right after this topic.

Do I always need an initial condition to solve a separable equation?

No. Separating and integrating both sides always gives you the general solution, a family of curves parametrised by the constant CC — that step needs no extra information. An initial condition (a given point the curve must pass through, like y=4y=4 when x=3x=3) is only needed if you want to narrow that family down to one specific particular solution by solving for the exact value of CC.

Before this

Where this leads