# Question regarding differentiating with $e$

What is $\left[h(x) = \dfrac{3x-2}{e^x} \right]'?$

My textbook tackles this problem in this way:

$h'(x) = \dfrac{e^x\cdot3-(3x-2)e^x}{(e^x)^2} = \dfrac{3-(3x-2)}{e^x}$ etc...

I however don't understand how this is correct? If one of the $e^x$ in the numerator would have gotten cancelled I would have not problem, but how come they're both cancelled?

-
Both the terms in the numerator have $e^x$ since the derivative of $e^x$ is itself and hence it gets canceled with one $e^x$ in the denominator. – user17762 Jan 14 '13 at 18:54
Don't mind all this 'cancelling rhetoric' it is very dangerous. First note that for all non-zero real numbers $a$; $\frac{a}{a}=1$ by definition of diviosion/axiom of multiplicative inverses. $\frac{e^x}{e^x}=1$ because $e^x>0$ for all real numbers $x$. Then we also have the fact that $1\cdot a=a$ for all real numbers $a$. This is why the $\frac{e^x}{e^x}$ seemingly disappears... Numbers don't "cancel". They are added together, multiplied together, etc. The word "cancel" should be barred from use. – Jp McCarthy Jan 14 '13 at 19:08
Your mistake is in algebra, not in calculus. My answer addresses ONLY the algebra. – Michael Hardy Jan 14 '13 at 19:16

\begin{align} \text{INCORRECT}: & \qquad \frac{5a+5b}{5c} = \frac{a+5b}{c} \\[12pt] \text{INCORRECT}: & \qquad \frac{5a+b}{5c} = \frac{a+b}{c} \\[12pt] \text{CORRECT:} & \qquad \frac{5a+5b}{5c} = \frac{a+b}{c} \end{align}

You can cancel a factor that is common to the numerator and the denominator. What was done in this last cancelation is this: $$\frac{5a+5b}{5c} = \frac{5(a+b)}{5c},$$ followed by cancelation. The number $5$ is a factor of the numerator since the numerator is $5$ times something. The number $5$ is a factor of the denominator since the denominator is $5$ times something.

-

What you have above as $h'(x)$ is completely right. You surely know that for every real number $x$, $\text{e}^x\neq 0$. So if you factor it from the terms in the numerator and then cancel by one term in the denominator, you have a resulted fraction. In fact $$\frac{3\text{e}^x-(3x-2)\text{e}^x}{\text{e}^{2x}}=\frac{\text{e}^x(3-(3x-2))}{\text{e}^{x}\cdot\text{e}^{x}}=\frac{3-(3x-2)}{\text{e}^{x}}$$

-
Very helpful explanation! + 1 – amWhy Feb 17 '13 at 0:06

Recall the quotient rule that says that $$[f(g) / g(x)]' = \frac{f'(x)g(x) - f(x)g'(x)}{g(x)^2}$$ Now with $g(x) = e^x$ also recall that $g'(x) = e^x$. And here $f(x) = 3x - 2$, so $f'(x) = 3$. Hence you get $$[f(g) / g(x)]' = \frac{3e^x - (3x-2)e^x}{(e^{x})^2} \stackrel{\star}{=}\frac{e^x[3 - (3x-2)]}{e^xe^x} = \frac{3 - (3x-2)}{e^x}$$ In setp $(\star)$ you factor out an $e^x$ from the numerator.

-

I think what the OP has a problem with is this part of the problem:

$$\dfrac{e^x.3-e^x(3x-2)}{(e^x)^2} = \dfrac{e^x(5-3x)}{(e^x)(e^x)}=\dfrac{5-3x}{e^x}$$

That is - in the second step, we factorize the $e^x$ and thus yes, they "both" get cancelled.

-