Proof that the exponential function is the only solution to dy/dx = y, y(0) = 1

Suppose $g'(x)=g(x)$ for all $x\in\mathbb R.$ $$ \underbrace{\frac d {dx}\,\frac{g(x)}{e^x} = \frac{e^x g'(x) - e^x g(x)}{e^{2x}}}_\text{quotient rule} = 0 \text{ for all } x\in\mathbb R. $$ Therefore $x\mapsto g(x)/e^x$ is constant on $\mathbb R.$

So $g(x) = \text{constant}\cdot e^x$ for $x\in\mathbb R.$

(The mean value theorem is tacitly used here, in that it is used in the proof that if the derivative of a function is $0$ everywhere in an interval, then the function is constant on that interval.)


You can also make an argument that does not require you to know anything about the logarithm. suppose that $f$ and $g$ are two solutions to $y'=y$ with $f(x_0)=g(x_0)\neq 0$.

Then, by continuity, there exists $\delta$ such that $(x_0-\delta,x_0+\delta)\cap g^{-1}(\{0\})=\emptyset$. For $x\in (x_0-\delta,x_0+\delta),$ we have $$ \left(\frac{f}{g}\right)'(x)=\frac{f'g(x)-fg'(x)}{g^2(x)}=0, $$ So that $f=g$ on $(x_0-\delta,x_0+\delta)$. In fact, applying continuity, $f=g$ on $[x_0-\delta,x_0+\delta]$ and iterating this, we get that $f=g$ on the largest interval $I$ containing $x_0$ such that $g(y)\neq 0$ for all $y\in I$. However, picking $g(x)=\exp(x),$ we get that $I=\mathbb{R}$ and so, $f(x)=\exp(x)$.