Solving a Differential Equation by Substitution

A given substitution, and the variables separate.

When the variables do not separate

dy/dx = (x + y)² cannot be written as f(x) times g(y), so the variables do not separate as it stands. The question gives a substitution, u = x + y, that turns it into an equation that does.

The first step is to differentiate the substitution with respect to x: du/dx = 1 + dy/dx. This links the new derivative to the old one.

Replace every y

From du/dx = 1 + dy/dx, dy/dx = du/dx − 1. Put that and u = x + y into the equation: du/dx − 1 = u², so du/dx = 1 + u².

Only u and x are left, and the right side depends on u alone, so the variables separate.

Solve, then return to y

Separate and integrate: ∫ 1/(1 + u²) du = ∫ 1 dx, so tan⁻¹ u = x + C and u = tan(x + C).

The answer must be in x and y, so put x + y back for u: x + y = tan(x + C), and y = tan(x + C) − x.

Check by differentiating: dy/dx = sec²(x + C) − 1 = tan²(x + C), and tan(x + C) is x + y, so dy/dx = (x + y)².

The substitution y = vx

dy/dx = (x + y)/x is solved with y = vx, where v is a new variable that depends on x. Since y is a product of v and x, the product rule gives dy/dx = v + x dv/dx.

Substitute: v + x dv/dx = (x + vx)/x = 1 + v, so x dv/dx = 1. Separate: ∫ 1 dv = ∫ 1/x dx, so v = ln|x| + C.

Multiply back by x: y = x ln|x| + Cx. Check: dy/dx = ln|x| + 1 + C, and (x + y)/x = 1 + ln|x| + C.

Two more examples

dy/dx = (2x + y)² with u = 2x + y. Now du/dx = 2 + dy/dx, so du/dx = 2 + u². Integrating gives (1/√2) tan⁻¹(u/√2) = x + C, and then y = √2 tan(√2x + D) − 2x, where D = √2C.

dy/dx = (x² + y²)/(xy) with y = vx. The right side is (1 + v²)/v = 1/v + v, so v + x dv/dx = 1/v + v and x dv/dx = 1/v. Then ∫ v dv = ∫ 1/x dx gives v²/2 = ln|x| + C, and with v = y/x, y² = 2x² ln|x| + Ax².

The usual slips

Treating du/dx as dy/dx. For u = 2x + y, du/dx = 2 + dy/dx: the 2x term changes with x too.

Writing dy/dx = dv/dx for y = vx. v changes with x, so the product rule gives v + x dv/dx.

Stopping at u or v. The question asks for y, so put the substitution back and make y the subject.

Practice Solving a Differential Equation by Substitution in the app