Let $f: [a,b] \to \mathbb R$ be continuous on $[a,b]$ and differentiable on $(a,b)$. If $f(a) = 0$ and $|f'(x)|\le k|f(x)|$ for some $k$, then $f(x)$ is zero on $[a,b]$.
I tried proving it using Legrange's Mean Value Theorem but couldn't get it.
$f(x)$ is differentiable on $(a,b)$. $f(x)$ is continuous on $[a,b]$. Let $x$ belong to $[a,b]$ s.t $a < x$. Consider the interval $[a,x]$. By Legrange's Mean Value Theorem,
$$\frac{f(x)-f(a)}{x-a} = f'(t) ; \ \ a \le t \le x.$$
Since $f(a)=0$,
$$f(x)=(x-a)f'(t)$$
$$|f(x)| \le (x-a)k|f(t)|.$$
After this, I was thinking of proceeding with the inequality by putting $f(a)$ in the place of $f(t)$.
As I commented, we first prove the conclusion for a smaller interval.
Proof. $\blacktriangleleft$ We may assume $b-a > 1/(2k)$ [otherwise we proceed on $[a,b]$, and the following argument is still applicable with slight modification] First consider the interval $[a, a + 1/(2k)] \subset [a,b]$. By Lagrange’s MVT, $$ \forall x \in \left[a, a + \frac {b-a}{2k}\right],\;|f(x)| = |f(x) - f(a)| = |f’(c_1)||x-a| \leqslant k |f(c_1)| \cdot \frac {1}{2k} = \frac 12 |f(c_1)| \quad [c_1\in (a, x)]. $$ Now for $c_1$, the Lagrange’s MVT gives that $$ |f(c_1)| = |f(c_1) - f(a)| = |f’(c_2)| |c_1 - a| \leqslant k |f(c_2)| \cdot \frac {1} {2k} = \frac 12 |f(c_2)| \quad [c_2 \in (a,c_1)]. $$ Repeatedly we have a sequence $(c_n)_1^\infty$ s.t. $0 < c_n < c_{n-1} < x$ and $$ |f(c_{n-1})| \leqslant \frac 12 |f(c_{n})|\quad [\forall n \in \mathbb N^*], $$ hence $$ \forall n, |f(x)| \leqslant \frac 12 |f(c_1)| \leqslant \frac 14 |f(c_2)| \leqslant \cdots \leqslant \frac 1{2^n} |f(c_n)|. $$ Since $f$ is continuous on $[a, b]$, $|f|$ is also continuous and attain its maximum on $[a, b]$. Let the maximum be $M$, then $$ \forall n \in \mathbb N^*, |f(x)| \leqslant \frac M {2^n}. $$ Let $n \to \infty$, then $|f| \equiv 0$ on $[a, a+1/(2k)]$.
Now for the whole interval $[a,b]$, divide it into $m = \lceil (b-a)/2k \rceil$ subintervals $[a + (j-1)/(2k), a+j/(2k)] [j \leqslant m-1]$ and $[a + (m-1)/2k, b]$, then by induction we could successively show that $f$ vanishes on each subinterval [because $f$ vanishes at the left endpoint of each subinterval]. Hence $f \equiv 0$ on $[a,b]$. $\blacktriangleright$