Bernoulli Equations

The hook: a nonlinear equation in disguise

You now have a complete recipe for the first-order linear equation y' + P(x)\,y = Q(x): form the integrating factor \mu = e^{\int P\,dx}, collapse the left side into a product derivative, and integrate. But the moment the right side sprouts a power of y

y' + P(x)\,y = Q(x)\,y^{2},

the machinery jams. That y^2 makes the equation nonlinear: y now appears squared, so no integrating factor can turn the left side into a clean product derivative, and the variables refuse to separate either. It looks like a dead end.

It isn't. This whole family — y' + P(x)\,y = Q(x)\,y^{n} — is a Bernoulli equation, and it hides a linear equation inside. One well-chosen substitution peels away the nonlinearity and hands you back exactly the linear problem you already know how to solve. It is the first great lesson of differential equations: the right change of variable can turn a hard problem into an easy one you have already met.

What counts as a Bernoulli equation

A first-order ODE is Bernoulli when it can be written in the standard shape

\frac{dy}{dx} + P(x)\,y = Q(x)\,y^{\,n},\qquad n \neq 0,\ 1.

The coefficients P and Q may be any functions of x; the whole nonlinearity is packed into the single power y^{\,n} on the right. The exponent n can be any real number — 2, 3, \tfrac12, even -1except 0 and 1, and we will see in a moment exactly why those two are barred.

Before you do anything else, always arrange the equation so the coefficient of y' is 1 and everything with a bare y (first power) is on the left, with the lone y^n term on the right. Only once it is in this exact shape can you read off P, Q and n.

The trick, derived: v = y^{1-n}

Watch the nonlinearity dissolve. Start from the standard form and divide every term by y^{\,n}:

y^{-n}\,y' + P(x)\,y^{\,1-n} = Q(x).

Two things now carry the same exponent 1-n: the term y^{\,1-n} outright, and — after the chain rule — y^{-n}y' as well. That is the clue. Define the new unknown

v = y^{\,1-n}.

Differentiate with the chain rule: v' = (1-n)\,y^{-n}\,y', so the awkward first term is y^{-n}y' = \dfrac{v'}{\,1-n\,}. Substitute both pieces into the divided equation:

\frac{v'}{1-n} + P(x)\,v = Q(x).

Finally multiply through by (1-n) to clear the fraction, and the equation stands revealed as linear in v:

\boxed{\,v' + (1-n)\,P(x)\,v = (1-n)\,Q(x).}

There is no v^2, no v^n — just v and v' to the first power. This is a first-order linear equation, so hit it with the integrating factor \mu = e^{\int (1-n)P\,dx}, solve for v(x), and then back-substitute v = y^{1-n} to recover y. Four moves: substitute → linearise → solve → back-substitute.

Worked example 1: y' + y = y^{2}

Read off the parts: P = 1, Q = 1, and the power is n = 2. Since n \neq 0,1, it is genuinely Bernoulli.

Step 1 — choose the substitution. v = y^{\,1-n} = y^{-1}, so v' = -y^{-2}y'.

Step 2 — linearise. Divide the equation by y^2: y^{-2}y' + y^{-1} = 1. Since y^{-2}y' = -v' and y^{-1} = v, this becomes -v' + v = 1, i.e.

v' - v = -1.

(Same answer straight from the boxed formula: v' + (1-n)Pv = (1-n)Q with 1-n=-1 gives v' - v = -1. ✓)

Step 3 — solve the linear equation. Here the linear coefficient is -1, so the integrating factor is \mu = e^{\int -1\,dx} = e^{-x}. Multiply through:

\big(e^{-x}v\big)' = -e^{-x} \;\Longrightarrow\; e^{-x}v = e^{-x} + C \;\Longrightarrow\; v = 1 + C\,e^{x}.

Step 4 — back-substitute v = y^{-1} = 1/y:

\boxed{\,y = \frac{1}{1 + C\,e^{x}}.}

Sanity check. With y = (1+Ce^{x})^{-1} we get y' = -Ce^{x}(1+Ce^{x})^{-2}, so y' + y = \dfrac{-Ce^{x} + (1+Ce^{x})}{(1+Ce^{x})^{2}} = \dfrac{1}{(1+Ce^{x})^{2}} = y^{2}. ✓ The nonlinear equation is solved — via a detour through a linear one.

Three slips sink most Bernoulli attempts. Guard against all three:

Worked example 2: y' + \tfrac{1}{x}\,y = x\,y^{2}

Now P = \tfrac1x, Q = x, and again n = 2, so v = y^{1-n} = y^{-1} and 1 - n = -1.

Step 1 — linearise straight from the boxed formula v' + (1-n)Pv = (1-n)Q:

v' - \frac{1}{x}\,v = -x.

Step 2 — integrating factor. The linear coefficient is -\tfrac1x, so \mu = e^{\int -\frac{1}{x}\,dx} = e^{-\ln x} = \dfrac{1}{x}. Multiply the linear equation through by \tfrac1x; the left side collapses:

\left(\frac{v}{x}\right)' = -1 \;\Longrightarrow\; \frac{v}{x} = -x + C \;\Longrightarrow\; v = Cx - x^{2}.

Step 3 — back-substitute v = 1/y:

\boxed{\,y = \frac{1}{Cx - x^{2}} = \frac{1}{x\,(C - x)}.}

Notice how a variable-coefficient Bernoulli equation is no harder than a constant one: once the substitution has done its work, you are simply running the integrating-factor recipe on v, exactly as in the linear lesson.

Why n = 0 and n = 1 are excluded

The exclusions are not an arbitrary rule — those two powers make the equation something you already know, so the Bernoulli detour would be pointless (and the substitution even breaks down):

So the honest Bernoulli cases — where the substitution earns its keep — are precisely n \neq 0, 1.

This equation was posed by Jacob Bernoulli in 1695 and solved shortly after by his younger brother (and bitter rival) Johann and by Leibniz — the same tight circle that had just invented calculus. The Bernoullis were a dynasty of mathematicians so prolific that "Bernoulli's equation" is ambiguous: this one lives in differential equations, while a different Bernoulli equation governs the pressure of flowing fluids, and Bernoulli numbers, Bernoulli trials and the Bernoulli distribution turn up in analysis and probability. Eight Bernoullis across three generations did serious mathematics — a family feud conducted almost entirely in theorems.

The solution family, live

Below is the family y = \dfrac{1}{1 + C e^{x}} that solved example 1. Slide the constant C (fixed in practice by an initial value). Every curve slips smoothly from 1 on the far left toward 0 on the right — the logistic-style profile that the nonlinear y^2 term produces, all recovered by back-substituting a plain linear solution.