Mathematics
Level 1/ODEs

3. Bernoulli's ODE

-----

A first-order differential equation that can be transformed into a linear equation by a suitable change of variables.

dydx+f(x)y=g(x)ynwheren0,1y(0)=1\dfrac{dy}{dx} + f(x)y = g(x)y^n \quad \text{where} \quad n \neq 0, 1 \quad y(0) = 1

How to solve

Convert to linear ODE

yndydx+f(x)y1n=g(x)\begin{equation} y^{-n}\dfrac{dy}{dx} + f(x)y^{1-n} = g(x) \end{equation}

we need the   y1n  \; y^{1-n} \; term to be linear so set

z=y1n,y=z11n,dzdy=(1n)ynz = y^{1-n}, \quad y = z^{\textstyle \frac{1}{1 - n}}, \quad \dfrac{dz}{dy} = (1 - n)y^{-n}

we will also need

dzdx=d(y1n)dx=(1n)yndydx\dfrac{dz}{dx} = \dfrac{d(y^{1 - n})}{dx} = (1 - n)y^{-n}\dfrac{dy}{dx}

note the expression   yndydx  \; y^{-n}\dfrac{dy}{dx} \; in the above equation is the same as the first term in (1)(1)

lets solve for this term

yndydx=11ndzdxy^{-n}\dfrac{dy}{dx} = \dfrac{1}{1 - n}\dfrac{dz}{dx}

now lets get rid of all the yy terms in (1)(1) by subbing in   11ndzdx  \; \dfrac{1}{1 - n}\dfrac{dz}{dx} \; and   z=y1n  \; z = y^{1 - n} \;

this gives us

11ndzdx+f(x)z=g(x)\dfrac{1}{1 - n}\dfrac{dz}{dx} + f(x)z = g(x)

dzdx+(1n)f(x)z=(1n)g(x)\boxed{\dfrac{dz}{dx} + (1 - n)f(x)z = (1 - n)g(x)}

this is in the same form as a first order ODE.

Note: it can be useful to memorise this equation

Example

Solve

dydx+y=xy3wherey(0)=1\dfrac{dy}{dx} + y = xy^3 \quad \text{where} \quad y(0) = 1

Answer

n=3,z=y2,y=z12,f(x)=1,g(x)=xn = 3, \quad z = y^{-2}, \quad y = z^{- \textstyle \frac{1}{2}}, \quad f(x) = 1, \quad g(x) = x

Sub into Bernoulli's ODE

dzdx2z=2x\dfrac{dz}{dx} -2z = -2x

Solve for integrating factor (IF)

μ(x)=e2  dx=e2x\mu(x) = e^{\textstyle \int{-2 \, \; dx}} = e^{-2x}

multiply ODE by μ(x)\mu(x)

e2xdzdx2ze2x=xe2xe^{-2x}\dfrac{dz}{dx} -2ze^{-2x} = xe^{-2x}

integrate both sides

z=x+12+Ce2xz = x + \frac{1}{2} + Ce^{2x}

so

y=(x+12+Ce2x)12y = (x + \frac{1}{2} + Ce^{2x})^{- \textstyle \frac{1}{2}}

since   y(0)=1\; y(0) = 1,   C=12\; C = \dfrac{1}{2}

therefore

y=(x+12+12e2x)12y = (x + \frac{1}{2} + \frac{1}{2}e^{2x})^{- \textstyle \frac{1}{2}}