4
$\begingroup$

Find the function $f$, given that $$f'(x) = f(x)(1-f(x))$$ and that $f(0) = \frac12$

The answer is

$$y = \frac{1}{1+e^{-x}}$$

What I tried doing is changing $f'(x)$ as \frac{dy}{dx} and all the $f(x)$ as $y$ to make it easier to read for myself. Manipulating the equation.

I got

$$\left(y + \frac1y\right)dy = 1dx$$

but when I integrate I'm not getting the correct answer, I'm pretty sure I'm doing this incorrectly. Any advice?

  • 1
    When you separate, do you not get $\frac {dy}{y(1-y)}=dx$?2017-02-08
  • 0
    I am not, that's probably where I'm misunderstanding something,....AND it just clicked. If you divide the entire right side by y(1-y) it does not become 0, it becomes 1, so you can transfer dx over to that side. For some reason i was doing my right side = 0 and then dx(0)= 0 So i had no dx to integrate. Thank you!2017-02-08

2 Answers 2

3

$$\frac{dy}{dx}=y(1-y)$$ $$\int\frac{dy}{y(1-y)}=\int dx$$ $$\int\frac{dy}{y}+\int\frac{dy}{1-y}=\int dx$$ $$\ln y-\ln(1-y)=x+c$$ $$\ln\left(\frac{y}{1-y}\right)=x+c$$ $$f(0)=\frac12$$ Thus, $c=0$. $$\frac{y}{1-y}=e^{x}$$ $$y=e^{x+c}-ye^{x}$$ $$y(1+e^{x+c})=e^{x}$$ $$y(1+e^{-x})=1$$ $$y=\frac{1}{1+e^{-x}}$$

  • 0
    Can you explain how you went from your second to third step? How did y(1-y) become y + (1-y)2017-02-08
  • 0
    $\frac1y+\frac1{1-y}=\frac{1-y+y}{y(1-y)}=\frac{1}{y(1-y)}$2017-02-08
1

If you expand the right hand side you'll obtain the differential equation: $y'-y= -y^2$ In that equation we let $u=y^{-1}$ so $u'=-y^{-2}y'$ Now we multiply the original equation with $-y^-{2}$. We now have the equation: $-y^{-2}y'+y^-{1}=1$ which by our substitution transforms into: $u'+u=1$ I guess you can take it from here!

  • 0
    Can you explain how you know to set u as (y^-1) I've never substituted with something that was not in my equation before.2017-02-08
  • 0
    These are known as Bernoulli differential equations which are solved by this particular substitution!2017-02-08