# What is the derivative of $f(x) = 2 - e^x + 2x$ on $[0,1]$ using the definition of the derivative?

Here is what I have so far.

Let $$x_0 \in [0,1]$$. $$f$$ is differentiable if $$f'(x_0) = \lim_{x \to x_{0}} \frac{f(x) - f(x_0)}{x - x_0}$$ exists. So $$\lim_{x \to x_0} \frac{2 - e^x + 2x -2 + e^{x_0} - 2x_0}{x - x_0} = \lim_{x \to x_0} \frac{-e^x + e^{x_0} + 2x - 2x_0}{x - x_0} = 2 +\lim_{x \to x_0} \frac{e^{x_0}-e^x}{x - x_0}$$.

I do not know how to proceed from here.

I am grateful for any help. Thank you in advance.

• Do you know the derivative of $e^x$? – J. W. Tanner Aug 4 at 3:56
• Yes, its $e^x$. – Garrett Aug 4 at 3:56
• @Garrett if you know how you know that the derivative of e^x is e^x, then you know how to evaluate your remaining limit. (To within a minus sign.) – nitsua60 Aug 4 at 4:00

Use that rule with $$f(x)=g(x)+h(x)+i(x),$$ where $$g(x)=2,$$ $$h(x)=-e^x$$, and $$i(x)=2x,$$

to get $$f'(x)=-e^x+2$$.

• Great comment, I'm going to attempt this right now. Thank you. – Garrett Aug 4 at 4:01

With

$$f(x) = 2 - e^x + 2x \tag{1}\label{eq1}$$

you can get

$$f'(x) = -e^x + 2 \tag{2}\label{eq2}$$

just using the basic derivatives for constants, $$e^x$$ and powers of $$x$$.

As you're doing it, I suggest you do the limit calculations for each term separately, to make it a bit easier (e.g., the derivative of $$2$$, as a constant, is just $$0$$). This is not particularly important for a relatively simple expression as in \eqref{eq1}, but it can be very helpful to use that the derivative of a sum of expressions is the sum of the derivatives of these expressions when they become considerably more complicated, e.g., when there are many terms involved.

What you've done with your work is correct. Note that

$$\lim_{x \to x_0} \frac{e^{x_0} - e^{x}}{x - x_0} = -e^{x} \tag{3}\label{eq3}$$

You can determine this using the properties of exponentials. In particular, the MSE Using the Limit definition to find the derivative of $$e^x$$ gives a lot of good details about how to do this.

• Yes, I'm restricting myself to using the definition of the derivative. I'm going to try to apply it to each term separately as you suggested. Thank you. – Garrett Aug 4 at 4:00
• @Garrett You're welcome. It's useful to understand the basics of calculus, so it's good to check on using the direct definition of derivatives, like you're doing. – John Omielan Aug 4 at 4:19

By definition then, $$f'(x)=\lim_{h\to0}\frac{2-e^{x+h}+2(x+h)-(2-e^x+2x)}{h}$$ $$=\lim_{h\to0}\frac{e^x-e^{x+h}+2h}{h}=\lim_{h\to0}\frac{e^x(1-e^h)}{h}+\lim_{h\to0}\frac{2h}{h}$$ $$=-e^x\lim_{h\to0}\frac{e^h-1}{h}+\lim_{h\to0}2$$

Recall since $$e^h=\sum_{n=0}^\infty\frac{h^n}{n!}$$ that $$\lim_{h\to0}\frac{e^h-1}{h}=1$$

Hence we have $$f'(x)=-e^x(1)+2=2-e^x$$

• $\lim_{h\to0}\dfrac{e^h-1}{h}$ is also the derivative of $e^x$ at $x=0$ – J. W. Tanner Aug 4 at 4:06

Let $$h \not =0$$.

Show $$\lim_{h \rightarrow 0}\dfrac{e^h-1}{h}=1$$;

1)$$\displaystyle{\int_{0}^{h}}e^tdt=e^h-1$$;

2) $$\displaystyle{\int_{0}^{h}}e^tdt = e^r \int_{0}^{h}dt= he^r$$,

where $$r \in [0,h]$$.

(Mean value theorem for integration)

3)$$\dfrac{e^h-1}{h}=e^r$$;

Note: $$\lim_{ h \rightarrow 0} r = 0$$;

Hence:

$$\lim_{ h \rightarrow 0}\dfrac{e^h-1}{h}= \lim_{h \rightarrow 0}e^r =1$$.