# **The Bernoulli Differential Equation**

*How to solve this special first order differential equation*** **

A **Bernoulli equation** has this form:

\frac{dy}{dx} + P(x)y = Q(x)y^{n}

where n is any Real Number but not 0 or 1

When n = 0 the equation can be solved as a First Order Linear Differential Equation.

When n = 1 the equation can be solved using Separation of Variables.

For other values of n we can solve it by substituting

u = y^{1−n}

and turning it into a linear differential equation (and then solve that).

**Example 1: **Solve

\frac{dy}{dx} + x^{5} y = x^{5} y^{7}

It is a Bernoulli equation with P(x)=x^{5}, Q(x)=x^{5}, and n=7, let's try the substitution:

u = y^{1−n}

u = y^{−6}

In terms of y that is:

y = u^{(−16)}

Differentiate y with respect to x:

\frac{dy}{dx} = \frac{−1}{6} u^{(−76)} \frac{du}{dx}

Substitute \frac{dy}{dx} and y into the original equation \frac{dy}{dx} + x^{5} y
= x^{5} y^{7}

\frac{−1}{6}u^{(−76)} \frac{du}{dx} + x^{5}u^{(−16)} = x^{5}u^{(−76)}

Multiply all terms by −6u^{(76)}

\frac{du}{dx} − 6x^{5}u = −6x^{5}

The substitution worked! We now have an equation we can hopefully solve.

Simplify:

\frac{du}{dx} = 6x^{5}u − 6x^{5}

\frac{du}{dx} = (u−1)6x^{5}

Using separation of variables:

\frac{du}{u−1} = 6x^{5} dx

Integrate both sides:

∫\frac{1}{u−1} du = ∫6x^{5} dx

Gets us:

ln(u−1) = x^{6} + C

u−1 = e^{x6 + C}

u = e^{(x6 + c)} + 1

Substitute back y = u^{(−16)}

y = ( e^{(x6 + c)} + 1 )^{(−16)}

Solved!

Let's look again at that substitution we did above. We started with:

\frac{dy}{dx} + x^{5}y = x^{5}y^{7}

And ended with:

\frac{du}{dx} − 6x^{5}u = −6x^{5}

In fact, **in general**, we can go straight from

\frac{dy}{dx} + P(x)y = Q(x)y^{n}

n is not 0 or 1

to:

\frac{du}{dx} + (1−n)uP(x) = (1−n)Q(x)

Then solve that and finish by putting back y = u^{(−1n−1)}

Let's do that in the next example.

**Example 2: **Solve

\frac{dy}{dx} − \frac{y}{x} = y^{9}

It is a Bernoulli equation with n = 9, P(x) = \frac{−1}{x} and Q(x) = 1

Knowing it is a Bernoulli equation we can jump straight to this:

\frac{du}{dx} + (1−n)uP(x) = (1−n)Q(x)

Which, after substituting n, P(X) and Q(X) becomes:

\frac{du}{dx} + \frac{8u}{x} = −8

Now let's try to solve that.

Unfortunately we cannot separate the variables, but the equation is linear and is of the form \frac{du}{dx} + R(X)u = S(x) with R(X) = \frac{8}{x} and S(X) = −8

Which we can solve with steps 1 to 9:

Step 1: Let u=vw

Step 2: Differentiate u = vw

\frac{du}{dx} = v\frac{dw}{dx} + w\frac{dv}{dx}

Step 3: Substitute u = vw and \frac{du}{dx} = v \frac{dw}{dx} + w \frac{dv}{dx} into \frac{du}{dx} + \frac{8u}{x} = −8:

v\frac{dw}{dx} + w\frac{dv}{dx} + \frac{8vw}{x} = −8

Step 4: Factor the parts involving w.

v\frac{dw}{dx} + w(\frac{dv}{dx} + \frac{8v}{x}) = −8

Step 5: Set the part inside () equal to zero, and separate the variables.

\frac{dv}{dx} + \frac{8v}{x} = 0

\frac{dv}{v} = \frac{−8dx}{x}

Step 6: Solve this separable differential equation to find v.

∫\frac{dv}{v} = − ∫\frac{8dx}{x}

ln(v) = ln(k) − 8ln(x)

v = kx^{−8}

Step 7: Substitute v back into the equation obtained at step 4.

kx^{−8} \frac{dw}{dx} = −8

Step 8: Solve this to find v

kx^{−8} dw = −8 dx

k dw = −8x^{8} dx

∫ k dw = ∫ −8x^{8} dx

kw = \frac{−8}{9}x^{9} + C

w = \frac{1}{k}( \frac{−8}{9} x^{9} + C )

Step 9: Substitute into u = vw to find the solution to the original equation.

u = vw = \frac{kx^{−8}}{k}( \frac{−8}{9} x^{9} + C )

u = x^{−8} ( \frac{−
8}{9} x^{9} + C )

u = \frac{−8}{9}x + Cx^{−8}

Now, the substitution we used was:

u = y^{1−n} = y^{−8}

Which in our case means we need to substitute back y = u^{(−18)} :

y = ( \frac{−8}{9} x + c x^{−8} ) ^{(−18)}

Done!

**Example 3: **Solve

\frac{dy}{dx} + \frac{2y}{x} = x^{2}y^{2}sin(x)

It is a Bernoulli equation with n = 2, P(x) = \frac{2}{x} and Q(x) = x^{2}sin(x)

We can jump straight to this:

\frac{du}{dx} + (1−n)uP(x) = (1−n)Q(x)

Which, after substituting n, P(X) and Q(X) becomes:

\frac{du}{dx} − \frac{2u}{x} = − x^{2}sin(x)

In this case, we cannot separate the variables, but the equation is linear and
of the form \frac{du}{dx} + R(X)u = S(x) with R(X) = \frac{−2}{x} and S(X) = −x^{2}sin(x)

Solve the steps 1 to 9:

Step 1: Let u=vw

Step 2: Differentiate u = vw

\frac{du}{dx} = v\frac{dw}{dx} + w\frac{dv}{dx}

Step 3: Substitute u = vw and \frac{du}{dx} = v\frac{dw}{dx} + w\frac{dv}{dx} into \frac{du}{dx} − \frac{2u}{x} = −x^{2}sin(x)

v\frac{dw}{dx} + w\frac{dv}{dx} − \frac{2vw}{x} = −x^{2}sin(x)

Step 4: Factor the parts involving w.

v\frac{dw}{dx} + w(\frac{dv}{dx} − \frac{2v}{x}) = −x^{2}sin(x)

Step 5: Set the part inside () equal to zero, and separate the variables.

\frac{dv}{dx} − \frac{2v}{x} = 0

\frac{1}{v}dv = \frac{2}{x}dx

Step 6: Solve this separable differential equation to find v.

∫\frac{1}{v} dv = ∫\frac{2}{x} dx

ln(v) = 2ln(x) + ln(k)

v = kx^{2}

Step 7: Substitute u back into the equation obtained at step 4.

kx^{2}\frac{dw}{dx} = −x^{2}sin(x)

Step 8: Solve this to find v.

k dw = −sin(x) dx

∫k dw = ∫−sin(x) dx

kw = cos(x) + C

w = \frac{cos(x) + C}{k}

Step 9: Substitute into u = vw to find the solution to the original equation.

u = kx^{2}\frac{cos(x) + C}{k}

u = x^{2}(cos(x)+C)

Finally we substitute back y = u^{-1}

y = \frac{1}{x^{2} (cos(x)+C)}

Tada!

The Bernoulli Equation is attributed to Jacob Bernoulli (1655-1705), one of a family of famous Swiss mathematicians.