# Differential Equation and Bernoulli

I'm working on the following question with initial condition (x,u)=(2,1):

$$\frac{du}{dx} = u(2-u)$$

This appears to be a Bernoulli form and substitution v=1/u is needed.

$$v=1/u$$ $$v' = \frac{-1}{u^2} \frac{du}{dx}$$ $$v' = \frac{-1}{u^2} u(2-u)$$ $$v' = \frac{-1}{u}(2-u)$$ $$v' = \frac{-2}{u}+1$$ $$v' + \frac{2}{u} = 1$$ $$v' + 2v = 1$$

Is this the correct away to approach this problem? It now looks like it is in standard linear form and can be solved by taking the integrating factor. However, I'm not sure what v' represents, $\frac{dv}{du}$ OR $\frac{dv}{dx}$?

How do I get the solution in u(x)=... form?

• Here $v' = \frac{dv}{du}$. – Cure Sep 22 '13 at 19:56
• When I solve this linear equation, I get an integrating factor of e^2x, and a final answer of v=c. – Bob Shannon Sep 22 '13 at 20:02
• I'm not sure where to go from here to get this in u(x)=... form. – Bob Shannon Sep 22 '13 at 20:02
• Sorry, $v'=dv/dx$. Solution of last equation becomes $v=Ae^{-2x}+1/2$, and now $u=1/v$. – Maesumi Sep 22 '13 at 20:07
• $u(x) = \dfrac{2e^{2x}}{e^{2x} + e^{4}}$ – Amzoti Sep 22 '13 at 20:21

I would rather do it in the naive, but easy way:

$\displaystyle \frac{du}{dx}=u(2-u) \implies \frac{du}{u(2-u)}=dx \implies \int \frac{1}{u(2-u)}du=\int dx$

$$\frac{1}{u(2-u)}=\frac{A}{u}+\frac{B}{2-u}$$

$$A(2-u)+B(u)=1 \implies A=\frac{1}{2}, B=\frac{1}{2}$$

$$\frac{1}{u(2-u)}=\frac{1}{2u}-\frac{1}{2(u-2)}$$

$$x = \frac{1}{2}(\int \frac{1}{u}du - \int\frac{1}{u-2}du )$$

$$2x = \ln(\frac{u}{u-2})+C$$

$$Ce^{2x}=\frac{u}{u-2} \implies Ce^{2x}u-2Ce^{2x}=u \implies u(Ce^{2x}-1)=2Ce^{2x}$$

$$u=\frac{2Ce^{2x}}{Ce^{2x}-1}$$.

Now you can find $C$ by your initial conditions as follows:

$$1=\frac{2Ce^{4}}{Ce^{4}-1} \implies Ce^{4}-1=2Ce^{4} =\implies C=-\frac{1}{e^4}$$ Plugging $\displaystyle C=\frac{-1}{e^4}$ into what we had obtained we'll get: $$u=\frac{2e^{2x}}{e^{2x}+e^4}$$

I have to apologize for two things. First of all, I did all these calculations here on MSE because I didn't have a pen and paper around me here, and it was very hard for me to do calculations this way without a pen and paper because I had to do some intermediate steps in my head. So it's possible that I have made some minor mistakes. Secondly, it seems like you were looking for another solution to your problem. Fortunately my method worked, but I can't guarantee this one is the best way to do such problems.

• It looks like this gets you an answer in the form of x(u)=... - is that correct? – Bob Shannon Sep 22 '13 at 20:04
• @Bob: Yes, you're right. But at the end you have $\ln(\sqrt{u(2-u)})$ I guess (I haven't calculated it on paper). But regardless of what precisely you'll get, it will definitely be a something involving $\ln$ alone and you can invert it to get $u(x)=\cdots$ instead. This certainly isn't the best approach. I made a mistake at first that I didn't notice you needed $x(u)$ instead, but fortunately this one is invertible, so it leads to the answer. – user66733 Sep 22 '13 at 20:08
• What method or fact do you use to invert it? – Bob Shannon Sep 22 '13 at 20:12
• @BOB: I will write down the details of my calculations in case that they might be useful. – user66733 Sep 22 '13 at 20:28
• @Bob: I edited my post. – user66733 Sep 22 '13 at 20:44

You have done the problem correctly. Here, $v' = \frac{dv}{du}$ because you are taking the derivative of both sides of the equation $v=\frac{1}{u}$ with respect to u.