Prove that for all $x \in [0,\ln2]$ we have $x+1 \leq e^x \leq 2x+1$

Question:

Prove that for all $x \in [0,\ln2]$ we have $x+1 \leq e^x \leq 2x+1.$

My proof goes something like this:

you can trivially show this is true at $x=1$ and $x=\ln2$

then gradient of $x+1=1$ which is always less than gradient of $e^x=e^x$ and gradient go $2x+1=2$ which is greater than gradient of $e^x$ when $x\leq\ln2$

therefore because gradient of $e^x$ is between the other two gradients in this interval then ($x+1 \leq e^x \leq 2x+1$) holds. Just wondering if this is right/rigorous enough or if this actually proves it? thanks


The idea is correct. If you want to make it more rigorous, you can define $f(x):=2x+1-e^x$ and prove that $f\geq 0$ in this interval, using the techniques you mentioned. You can do the same for $g(x):=e^x-x-1$.