# Solving $(f'(x)) ^{2}=(f(x))^{2}$ when $f(0)=f'(0)=0$

While looking at this answer https://math.stackexchange.com/a/2111753/72031 could not help wondering about the following implication : $$(f'(x)) ^{2}=(f(x))^{2}\Rightarrow f'(x) =f(x) \text{ or } f'(x) =-f(x)$$ Note that the equation $f'^{2}=f^{2}$ is possible if for some values of $x$ we have $f'(x) =f(x)$ and for other values of $x$ we have $f'(x) =-f(x)$. The linked answer assumes that this will never be the case. It appears that it is not obvious that only one of the alternatives will be true for all values of $x$. I could neither establish this nor find an easy counter-example. So I pose the following problem:

Let $f:\mathbb{R} \to\mathbb{R}$ be such that $f''(x) =f(x)$ for all $x\in\mathbb{R}$ and let $f'(0)=f(0)=0$. Then it is easy to prove that that $(f'(x)) ^{2}=(f(x))^{2}$ for all real $x$. Show that either "$f'(x) =f(x)$ for all real $x$" or "$f'(x) =-f(x)$ for all real $x$" .

Please avoid solutions based on techniques of solving differential equations. Simpler approaches using theorems from elementary calculus are expected.

• maybe you can use the fact that the derivative of f(x) is continuous so that it cannot change randomly between -f(x) and f(x)? – ryan w. Jan 25 '17 at 5:48
• @ryanw.: it can change precisely at a point where $f$ vanishes. – Paramanand Singh Jan 25 '17 at 5:50
• yes. at that point -f(x) = f(x), so it's alright. i will try give a full proof when i get home. but i do think the continuity of f'(x) is key. – ryan w. Jan 25 '17 at 5:53
• If $f(0)=0$, then the only solution to this differential equation, regardless of sign choice, is $f(x)=0$. – Arthur Jan 25 '17 at 6:06
• @ParamanandSingh - Hi, sorry had to write this although this here because there is no other way to connect. This is Nilotpal, 11 years ago, we were both the admins of the Orkut math community in the early days of internet mathematics. I have a math project in mind and wanted to connect with you to see if it interests you. Let me know how to connect. I am in Delhi 2,3,7, 59, 211, 13469 and neel@olpoints.com – Nilotpal Kanti Sinha Jan 27 '17 at 15:15

If $f$ is identically zero we're done. We have $f(0)=0$. Suppose $f$ is nonzero somewhere on $(0,\infty)$. Let $a=\max\{x:f([0,x])=\{0\}\}$. Let $b\in(a,a+1)$ be such that $|f(b)|=\max\{|f(x)|:x\in[a,b]\}$. Then $|f(b)|=\left|\int_a^b f'(x)\,dx\right|\leq\int_a^b|f'(x)|\,dx=\int_a^b|f(x)|\,dx\leq(b-a)|f(b)|<|f(b)|,$ a contradiction. Hence $f$ is identically $0$ on $[0,\infty)$. With similar reasoning to the left we can conclude that $f$ is identically zero.

This fills the logical gap you point to, showing that $f$ must be identically $0$ without assuming $f'=f$ or $f'=-f$ identically. Now that we can conclude $f=0$ identically, we know both $f'=f$ and $f'=-f$ identically.

An alternative approach, maybe more in the spirit of patching the linked answers, builds on nullUser's observation that $f$ is analytic.

See nullUser's answer for reasons why $f$ is analytic. Thus $f'-f$ and $f'+f$ are analytic. We have $(f'-f)(f'+f)=0$. Because the factors are analytic on a connected domain, this implies one of the factors is identically $0$.

Suppose $f$ and $g$ are analytic on $\mathbb R$ with $fg\equiv0$. Then one of the sets of zeroes of $f$ and $g$ must have an accumulation point, say $g$ wlog. Let $a$ be an accumulation point of the zero set of $g$. If $g$ were not identically $0$, we could write $g(x)=(x-a)^nh(x)$ with $n$ a positive integer and $h$ an analytic function such that $h(a)\neq0$. By continuity of $h$, this form shows that $a$ is actually an isolated zero of $g$, a contradiction. Thus $g\equiv 0$.

See the Identity Theorem for analytic functions for more details.

Note that the assumption of $f''(x)$ existing and $f''(x)=f(x)$ implies that any such $f$ is infinitely differentiable. Moreover, by Taylor's theorem the remainder term $R_k(x) = \frac{f^{(k+1)}(\xi)}{(k+1)!}x^{k+1}$ clearly goes to $0$ as $k$ increases since $f^{k+1}$ just cycles through $f,f',f,f',...$ Thus $f$ is analytic. The assumptions $f'(0)=f(0)=0$ then imply its Taylor series is zero, so $f=0$. Clearly $f'=f$ is satisfied.

• This answer points out that $f$ must be analytic, hence $f'-f$ and $f'+f$ are also analytic. If $fg=0$ with both $f$ and $g$ analytic, then $f=0$ or $g=0$. Assuming access to this fact would justify the step taken in the linked answers. – Jonas Meyer Jan 25 '17 at 6:25
• @JonasMeyer: how do we prove this fact about analytic functions? – Paramanand Singh Jan 25 '17 at 9:22
• @ParamanandSingh: I updated my answer to elaborate on that. It uses the identity theorem for analytic functions, which you may look up for more details. It is closely related to the reason we can conclude an analytic function is $0$ everywhere if its Taylor series at one point is $0$ (and the domain is connected). – Jonas Meyer Jan 25 '17 at 18:04

The other two answers both proved a stronger result ($f\equiv 0$). I'd like to fill the logic gap assuming only $$(f'(x)) ^{2}=(f(x))^{2}$$ to prove that either $$\forall x,f'(x) =f(x)$$or$$\forall x,f'(x) =-f(x).$$

We have two sets $A$ and $B$ where $$A=\{x|f'(x)=f(x) \}$$$$B=\{x|f'(x)=-f(x)\}$$ Obviously both $A$ and $B$ are closed sets.

Suppose $f(x_0)>0$ at some point $x=x_0\in A$. Then on the right side of $x_0$, $f'(x)$ is always greater than $0$ and $f(x)$ will only grow bigger and bigger. So $f'(x)$ will never equal to $-f(x)$ when $x$ moves from $x_0$ to $+\infty.$

Now we consider what happens on the left side of $x_0.$ When $x$ moves from $x_0$ to the left, $f(x)$ decreases. If we can prove that $f(x)$ is always greater than $0$ for all $x$ in $(-\infty, x_0)$, then we're done. $f'(x)$ cannot equal to $-f(x)$ if $f(x)$ is always above the $x$ axis.

Now we consider the sulotions of $f'(x)=f(x)$. The general solutions are $$f(x)=c_1e^{x-c_2}$$ We have assumed $f(x)>0$, so $c_1>0$.

Further more, we know that for $\forall x$ in $(-\infty, +\infty)$, $$f(x)=c_1e^{x-c_2}>0$$ Essentially, we have proved $B=\emptyset$.

We can apply the similar reasonings if $x_0\in B$ or if $f(x_0)<0$ for $x=x_0$ in $A$ or $B$.

Well, I have shown that if $f(x)>0$ for some $x=x_0\in A$, then all the $x$ on the right side of $x_0$, $f'(x)=f(x)$. Suppose for some solution $g(x)$, $g(x_1)=0$ for some $x_1$. We may need to assume that $x_1$ is the nearest zero of $g(x)$ to $x_0$. Then there exists $\{a_n\}$, $a_1>a_2>...>a_n$ and $a_n\rightarrow x_1.$ For all $a_n$, all the points on right side of $a_n$ lie on $$f(x)=c_ne^{x}.$$ We can further conclude that $c_1=c_2=...=c_n=...$ because there could only be at most one exponential curve passing all these points. However, $f(x_1)=\lim{f(a_n)}=g(x_1)=0$, a contradiciton. Is it rigorous enough now?
• I didn't assume $f'(0)=f(0)=0$. Hope this helps. – ryan w. Jan 25 '17 at 9:00
• The solution $f$ in terms of exponential function is valid only for $x\geq x_{0}$. You can't use the same for less than $x_{0}$. – Paramanand Singh Jan 25 '17 at 9:19
• While I appreciate your effort, the part of the proof where you show that if $f$ is positive at $x_{0}$ and $f'(x_{0})=f(x_{0})$ then $f'(x) =f(x)$ for all $x>x_{0}$ is convincing. Rest of the proof does not stand at the same level and tries to use the fact that the desired $f$ is an exponential function. The trouble here is that it becomes circular. Also the update which uses function $g$ is very difficult to follow and I am not able to comprehend the argument properly. – Paramanand Singh Jan 25 '17 at 9:58
• BTW I want precisely the kind of solution which you are trying to provide. Other answer have conveniently side stepped on the actual issue and instead proved that $f$ vanishes identically. – Paramanand Singh Jan 25 '17 at 10:01