How do I prove that the given function is continuous and monotonically increasing? How do I prove that the following function is continuous and monotonically increasing?
$$f(x) = \begin{cases} \dfrac{e^x-1}{x}  & \text{if $x \neq0$ } \\ 1 & \text{if $x=0$ } \end{cases}$$
I tried to show that it's continuous by that it's always continuous, even when $x=0$ (because by definition it becomes $1$ and $1$ is in the upper functions definition) but it's not sufficient and I don't know how to write it mathematically, and without that I can not step forward to prove it being monotonously rising.
Then to show it's monotonously rising, we can see that the derivative is $\frac{e^xx-e^x+1}{x^2}$ (it exists because the function is continuous (which I don't know how to prove yet)), and then to show that it is monotonically increasing i show that $f'(x)>0$.
Please show me the right way to do so mathematically.
 A: Assuming $x\neq 0$ we have
$$ \frac{e^x-1}{x} = \frac{1}{x}\int_{0}^{x} e^y\,dy \stackrel{y\mapsto xz}{=} \int_{0}^{1}e^{xz}\,dz$$
hence $f(x)$ is increasing  because $x\geq y$ ensures $e^{xz}\geq e^{yz}$ for $z\in[0,1]$.
Continuity follows from the monotone/dominated convergence theorem.
Addendum: it is also straightforward to check that $f$ is convex, by just invoking Jensen's inequality.
A: Depending on how much you're allowed to assume, you might be able to answer the part about continuity by using these results:

If $a\in\mathbb R^+$ and $f(x)$ and $g(x)$ are continuous on $F$ and $G$ respectively, then:

*

*$f(x)+g(x)$ is continuous on $F\cap G$


*$a^{f(x)}$ is continuous on $F$


*If $(\forall x\in F\cap G)\,\,\,g(x)\neq0$, then $\frac{f(x)}{g(x)}$ is continuous on $F\cap G$

Using these results, you can conclude $f(x)$ is continuous on the intervals $(-\infty,0)$ and $(0,\infty)$.
Now, using L'Hôpital,
$$\lim_{x\rightarrow0}\frac{e^x-1}{x}=\lim_{x\rightarrow0}{e^x}=1$$
$\implies$
$$\lim_{x\rightarrow0^-}f(x)=\lim_{x\rightarrow0^+}f(x)=1=f(x)$$
Therefore $f(x)$ is continuous on $\mathbb R$.

For the next part,
$$f'(x)=\frac{(x-1)e^x+1}{x^2}$$
Let $g(x)=(x-1)e^x+1$. Then
$$g'(x)=xe^x$$
$$\implies (x=0\iff g'(x)=0)$$
$$g''(x)=(x+1)e^x$$
$$\implies g''(0)=1>0$$
Now $g(0)=0 \land (x=0\iff g'(x)=0) \land g''(0)>0 \implies 0$ is the only minimum.
$$\implies(\forall x\in\mathbb R)\,\,g(x)\ge0$$
$$\implies(\forall x\in\mathbb R)\,\,f'(x)\ge0$$
$\implies(\forall x\in\mathbb R)\,\,f(x)$ is monotonically increasing.
A: If $0\leq x\leq y$ then $\frac{x^{n-1}}{n!}\leq \frac{y^{n-1}}{n!}$ for all $n>0$.
Therefore $\frac{e^x-1}{x}=\sum_{n>0}\frac{x^{n-1}}{n!}\leq\sum_{n>0}\frac{y^{n-1}}{n!}=\frac{e^y-1}{y}$.
A: Not a proof, but an animation loop that should make the claim "obvious". The function $f(x)$ is the slope of the secant line between $(0, 1)$ and $(x, e^{x})$ if $x \neq 0$, or the slope of the tangent line if $x = 0$. Since the exponential function is smooth (continuously differentiable) and convex, this slope increases continuously with $x$:

