What functions satisfy $D^* f = Df$? I came across one exercise that I found pretty interesting. The problem gave us a new definition of derivate $D^*f(x) = \lim_{h \to 0} \frac{f^2(x + h) - f^2(x)}{h}$. It asks us for what functions does $D^*f = Df$.
I know that $D^*f = 2fDf$ but I am not sure what functions satisfies $D^*f = Df$ except constant functions. Any idea for other non-trivial possibilities?
 A: You require $D^*f = Df$, and you have shown that $D^*f = 2fDf \text{  }$ $(1)$
Equating, $2f(Df) = (Df)$ gives $(2f-1)(Df) = 0$
Therefore either $2f-1 = 0$ or $Df = 0$.
This means that either $f = \frac{1}{2}$ or $f$ is such that $\frac{df}{dx} = 0$ everywhere. But the condition that $\frac{df}{dx} = 0$ everywhere tells you that $f$ is a constant function. Therefore $f$ is a constant. There can be no non-trivial solutions if statement $(1)$ does indeed hold for every $f$
However,
$D^*f = \lim_{h \rightarrow 0}\frac{(f(x + h) - f(x))(f(x + h) + f(x))}{h} = \lim_{h \rightarrow 0} (f(x+h) + f(x)) \cdot Df$
Let $D^*f = Df$ to obtain $\lim_{h \rightarrow 0} (f(x+h) + f(x)) = 1$, under the strict assumption that $Df \neq 0$
Clearly, for the above to be true when $f \neq \frac{1}{2}$, $f$ must be a discontinous function. I assume you could define an $f$ such that $f(x)$ equals both $1$ and $0$, but I have no rigourous definition of this function. I am thinking along the lines of a function like $\sin(x)$, where $\sin(x+h) = \sin(x)\cos(h) + \cos(x)\sin(h)$, but with a discontinous function instead. Let $f(x+h) = f(x)g(h) + g(x)f(h)$. Let it be so that taking the limit of h to $0$ gives $g(h) = 0$ and $f(h) = 1$. This holds if we let $g(x) = 1-f(x)$
Here you have it so when $f(x) = 1$,  $f(x+h) =  1 \cdot 0 + 0 \cdot 1 = 0$, and when $f(x) = 0$, $f(x+h) = 0 \cdot 0 + 1 \cdot 1 =  1$. Any discontinous function of $x$ swapping between values of $0$ and $1$ will satisfy the above condition, and I'm sure this can be extended to any values you like. This of course is under the assumption that the function indeed has this property. I believe that since this function is discontinuous everywhere, $Df$ cannot be properly defined and as such dividing by $Df$ poses a problem, but ignoring this it holds.
A: I suppose we're working looking for all differentiable functions $f:\Bbb{R}\to\Bbb{R}$ such that $D^*f=Df$. I claim that $f$ satisfies this equation if and only if $f$ is a constant function.

*

*Clearly, if $f$ is a constant function, then $D^*f=Df$ is satisfied because both sides are zero.


*Conversely, suppose $f$ is a differentiable function satisfying $D^*f=Df$. To be clear, this means for every $x\in\Bbb{R}$, we have $(f^2)'(x)=f'(x)$. By the mean-value theorem, this assertion is equivalent to saying there exists a constant $c\in\Bbb{R}$ such that $f^2=f+c$, i.e for every $x\in\Bbb{R}$, the number $f(x)$ satisfies the quadratic equation $[f(x)]^2-f(x)-c=0$. This means the image of $f$ contains at most two points (because a quadratic equation has at most two real roots). But a continuous function having at most two points in its image must be a constant (by the intermediate value theorem). This shows $f$ is constant.
This completes the proof.

Some Remarks:
Note that it is important to realize that for a function $F$, saying $F\neq 0$
means that there is a point $x\in\Bbb{R}$ where $F(x)\neq 0$. This is different from saying $F$ is nowhere vanishing (i.e for every $x\in\Bbb{F}$, $F(x)\neq 0$, or equivalently, $0\notin\text{image}(F)$).
Here, we have had to be careful with the way we argued because although from the equation $2fDf=Df$ we would like to conclude $Df=0$ or $f=\frac{1}{2}$, we just can't. All we can conclude is that for each $x\in\Bbb{R}$, either $Df(x)=f'(x)=0$ or $f(x)=\frac{1}{2}$. In other words, it is conceivable that there might exist a function $f$ which at one point $x_1$ satisfies $f(x_1)=\frac{1}{2}$, while at a different point $x_2$ satisfies $f(x_2)\neq \frac{1}{2}$, while satisfying $f'(x_2)=0$. We need to argue carefully to rule out this possibility (and off the top of my head, using the weak assumption of real differentiability, I do not see how).
As a side remark: if we had assumed $f:\Bbb{C}\to\Bbb{C}$ is complex-differentiable, then this is equivalent to $f$ being an analytic function (being able to be expressed locally as a power series). For analytic functions, it does hold that if a product is zero, then one of the factors is identically $0$, so that $(2f-1)Df=0$ implies $2f-1=0$ or $Df=0$ (again, this is not a trivial thing to show; it's by the uniqueness of analytic continuation), and in either case, we find that $f$ is a constant function. Of course, the equivalence of complex-differentiability/holomorphy with analyticity is a very non-trivial result, whereas the intermediate value theorem is readily available after a first calculus/analysis course.
