# Solving Bernoulli Differential Equations

### Bernoulli Equations:

A Bernoulli equation is a differential equation of the form:

$$\frac{dy}{dx}+f(x)y=g(x)y^n \qquad(1)$$

or:

$$y'+f(x)y=g(x)y^n$$

### Goal:

to use some sort of substitution that allows us to transform a given Bernoulli equation into a linear differential equation of the form:

$$\frac{dv}{dx}+f(x)v=g(x)$$

Our substitution will involve

$$v=y^{1-n}$$

...where n is the exponent in our Bernoulli equation (eqn #1)

$$v'=(1-n)y^{-n}y'$$

$$y=y^ny^{1-n}$$

$$y=y^nv$$

$$y'=\frac{1}{(1-n)}y^nv'$$

### (Ex 1) Solve the following initial value problem:

$$y'+\frac{4}{x}y=x^3y^2 \;,\; y(2)=-1 \qquad(eqn \; 2)$$

Make a substitution:

$$v=y^{1-n}, \;where \; n=2$$

$$v=y^{-1}=\frac{1}{y}$$

$$y=\frac{1}{v}=v^{-1}$$

$$y'=\frac{dy}{dv}\frac{dv}{dx}$$

$$=\frac{-1}{v^2}\frac{dv}{dx}$$

Now substitute these values into the original Bernoulli eqn (eqn #2) to obtain a linear differential equation:

$$\frac{-1}{v^2}\frac{dv}{dx}+\frac{4}{x}(\frac{1}{v})=x^3(\frac{1}{v^2})$$

$$\frac{dv}{dx}-\frac{4}{x}v=-x^3 \qquad(3)$$

Now solve the above equation using our standard method of integrating factors:

$$integrating \; factor = u(x) = e^{-4\int{}{}\frac{1}{x}dx}$$

$$u(x)=e^{-4ln(x)}=e^{ln(x^{-4})}$$

$$u(x)=x^{-4}=\frac{1}{x^4}$$

...proceed to multiply eqn #3 through by our integrating factor:

$$(\frac{1}{x^4})(\frac{dv}{dx}) - (\frac{1}{x^4})(\frac{4}{x})v=-(\frac{1}{x^4})x^3$$

$$(\frac{1}{x^4})(\frac{dv}{dx})-(\frac{4}{x^5})v=\frac{-1}{x}$$

...and utilizing the product rule for derivatives (in reverse) for the left side of the above equation, we obtain:

$$\frac{d}{dx}(\frac{1}{x^4}v)=\frac{-1}{x}$$

Now integrate both sides of the above equation and solve for v:

$$\frac{v}{x^4}=-\int{}{}\frac{1}{x}dx$$

$$\frac{v}{x^4} = -ln(x)+C$$

$$v = -x^4ln(x)+x^4C$$

Remember that we want to solve for y, so back substitute for v and proceed:

$$\frac{1}{y} = -x^4ln(x)+x^4C$$

$$y = \frac{1}{Cx^4-x^4ln(x)} \qquad(4)$$

Equation #4 is our general solution to the original differential equation.

Now recall our initial condition, [y(2)=-1], and use it to solve for C in eqn #4

$$\frac{1}{C2^4-2^4ln(2)}=-1$$

$$\frac{-1}{16C-16ln(2)}=1$$

$$16C-16ln(2)=-1$$

$$16C = -1+16ln(2)$$

$$C = ln(2)-\frac{1}{16}$$

...and now plug our above value for C into eqn #4:

$$y_p=\frac{1}{x^4(ln(2)-16)-x^4ln(x)} \qquad(5)$$