Solving $f=(f^2)'$ Find all differentiable mappings $f:\mathbb{R}\to \mathbb{R}$ so that $f=(f^2)'=2ff'$. My problem is that $f$ may very well be $0$ at some points ($f=0$ is for example a solution and so is $\frac12x$) so I can't simplify. Any hints?
 A: Let us consider different cases for the problem.


*

*$f\equiv 0$. This is the trivial solution.

*$\exists! x^*$ such that $f(x^*)=0$. Here we can take the domain $\Omega = \{x |f(x)\not = 0\}= \mathbb R-\{x^*\}$. Then we can still solve $f=2ff'$ on $\Omega$ and get $ f=2ff' \Rightarrow 1/2=f'\Rightarrow f(x) = x/2+c$ on $\Omega$. To get $f$ on $\mathbb R$ we have to define the value at $x^*$ to be $f(x^*)=0$ to get a continous function. Then we have $f(x) = x/2-x^*/2$ on $\mathbb R$ which is also a solution of the problem.

*Assume there exist two different points (or more) $x_*$ and $x^*$, with both $f(x_*)=f(x^*)=0$. As before we have $f(x)=x/2+c$ on $\Omega = \{x |f(x)\not = 0\}$. Again we have to fulfill $f(x_*)=0$ and $f(x^*)=0$ to get $f$ continous on $\mathbb R$. But this is not possible if $x_* \not = x^*$ as we only have one parameter $c$. Therefore, a solution of the problem can only have one root or be the zero function.


By this we conclude, that there exist no other solution, different from $f\equiv 0$ or $f=x/2+c$ for the given problem.
Edit: If we assume $f(x)\not =0,\ \forall x$ we would come to a contradiction, as the solution would also be $f(x)=x/2+c$, which has one root.
A: Just split it up in two cases: for every $x$ you need either $f(x)=0$ or $1=2f'(x)$.
Then figure out (this will be an ad hoc argument) how it is possible for a function to satisfy at least one of these at every point.
A: Since $f$ is differentiable, then it is continuous, and so (as a preimage of an open set) we have that $$S_f=\{x\in\Bbb R:f(x)\neq 0\}$$ is an open set. Let's suppose that $f$ isn't identically zero (since we've found that solution already), so $S_f$ is a nonempty open set, and so $S_f$ is either a disjoint union of at most countably many open intervals/rays or else is all of $\Bbb R$. I claim that $S_f=(-\infty,x_0)\cup(x_0,\infty)$ for some $x_0\in\Bbb R$. If not, then either (i) $S_f$ has some bounded open interval as a component, (ii) $S_f$ has no more than one ray as a component, (iii) $S_f$ has as its components exactly two rays which don't share an endpoint, or (iv) $S_f=\Bbb R$. (Why?)
Suppose $(a,b)$ is a component of $S_f$ for some $a<b$. Since $f'\equiv\frac12$ on $(a,b)$, then there is some $c$ such that $f(x)=\frac12x+c$ for all $x\in(a,b)$. By continuity, we have $f(a)=\frac12a+c$ and $f(b)=\frac12b+c$, so $f(a)<f(b)$. But $a,b\notin S_f$, so $f(a)=f(b)=0$. Contradiction.
Suppose $S_f$ has at most one ray as a component--so exactly one ray, since it is nonempty and has no interval components--meaning that (WLOG) $S_f=(x_0,\infty)$ for some $x_0$. As above, there is some $c$ such that for all $x\in(x_0,\infty)$, we have $f(x)=\frac12x+c$, and continuity necessitates that $f(x_0)=0$. But then $$f(x)=\begin{cases}0 & x\leq x_0\\ \frac12x-\frac12x_0 & x>x_0,\end{cases}$$ which fails to be differentiable at $x=x_0$. Contradiction. We run into a similar problem if we suppose that $S_f=(-\infty,x_0)\cup(x_1,\infty)$ for some $x_0<x_1$, giving us another piecewise linear function that fails to be differentiable at $x=x_0,x_1$.
Finally, it's clear that $S_f\neq\Bbb R$, for if not, then we'd have $f'\equiv\frac12$, yielding $f(x)=\frac12x+c$ for some $c,$ but then $f(-2c)=0,$ so $-2c\notin S_f,$ and so $S_f\neq\Bbb R.$ Contradiction.
Thus, we do, indeed, have $S_f=(-\infty,x_0)\cup(x_0,\infty)$. There then exist $c,d$ such that $f(x)=\frac12x+c$ for $x<x_0$ and $f(x)=\frac12x+d$ for $x>x_0$. To obtain continuity, we need $c=d=-\frac12x_0$, and so $f(x)=\frac12x+c$ on all of $\Bbb R$.
Hence, among differentiable functions, only the constant $0$ function and functions of the form $f(x)=\frac12x+c$ satisfy the given differential equation.
