# Bernoulli equation when not homogenous

$$x \frac{dy}{dx} + y = -2x^6y^4$$

Divided by x

$$\frac{dy}{dx} + \frac{y}{x} = -2x^5y^4$$

$$n = 4$$ $$z = \frac{1}{y^3}$$ $$a(x) = \frac{1}{x}$$ $$b(x) = -2x^5$$

$$\frac{z'}{-4+1} + \frac{1}{x}z = -2x^5$$

Multiply by -3

$$z' + \frac{-3}{x}z = 6x^5$$

I could not extract z from this to integrate. What should I do now? Thanks

Integrating factor ... \begin{eqnarray*} IF= \exp(\int \frac{-3}{x} dx ) = x^{-3}. \end{eqnarray*} divide your equation by $x^3$ and it becomes \begin{eqnarray*} \frac{1}{x^3} \frac{dz}{dx} -\frac{3z}{x^4}=\frac{d}{dx}\left( \frac{z}{x^3} \right) =6x^2 \end{eqnarray*} should be easy from here ?

$$z' + \frac{-3}{x}z = 6x^5$$ Multiply by $x^3$ $$x^3z' -3x^2z = 6x^8$$ $$\left (\frac z {x^3} \right )' = 6x^2$$ Simply integrate....

Here is a simple method for this kind of equations $$x \frac{dy}{dx} + y = -2x^6y^4$$ $$(xy)'= -2x^6y^4$$ $$(xy)'= -2x^2(xy)^4$$ Integrate $$\int \frac {d(xy)}{(xy)^4}=-2\int x^2dx$$

What you are left with is a linear differential equation of the first order. That equation is of the form:

$y' + P(x)y = Q(x)$

The solution of this equation can be derived as follows:

$y' + P(x)y = Q(x)$ $/e^{\int P(x) dx}$

$(ye^{\int P(x) dx})'= Q(x)e^{\int P(x) dx}$

$ye^{\int P(x) dx} = \int Q(x)e^{\int P(x) dx}+C$

$y = e^{-\int P(x) dx}(\int Q(x)e^{\int P(x) dx}+C)$

In your case the variable is $z$ and after you identify $P(x)$ and $Q(x)$ and solve for $z$ you have the connection between $y$ and $z$ to solve for $y$.

Now you just have to solve a linear first order differential equation. All linear first order differential equations have an algorithmic solution. It is weird that you have not seen it yet and you are trying to solve a Bernoulli equation.

I suggest you to read the following - Linear Differential Equations. And as Gregory pointed out in the comments, this wikipedia page is a great source as well.