This question already has an answer here:

I'm primitive in integrals and derivatives and I'm trying to solve the integral $\int \frac{1}{e^x}\,dx$, but especially this integral was hard to me to solve it.

So I tried:

$$\begin{align} \int\frac{1}{e^x}\,dx&=\int \frac{1}{\color{Red}{e^x}}\color{Blue}{e^x\,dx}\\&=\int \frac{1}{\color{Red}{u}}\,\color{Blue}{du}\\&=\ln\left(|u|\right)\\&=\ln \left(|e^x|\right)+C \end{align}$$

But my solution is wrong while I used the integration by substitution method ?!

Correct answer:

$$\begin{align} \int\frac{1}{e^x}\,dx&=\left(-e^{-x}\right)+C \end{align}$$


marked as duplicate by user63181, rschwieb, Dan Rust, Vedran Šego, Lord_Farin Aug 24 '13 at 13:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Your very first equation is wrong. Look at it again! $\endgroup$ – TonyK Aug 24 '13 at 11:43
  • 1
    $\begingroup$ The substitution you made puts an $e^x$ where there was none to start. You can't just put $e^x$ in from nowhere. $\endgroup$ – James S. Cook Aug 24 '13 at 11:45

$$\int dx\frac{1}{e^x} = \int e^{-x}dx =$$ With substitution $y=-x$: $$=-\int e^ydy = -e^y +C = -e^{-x} +C$$

Your solution is wrong because the first step is wrong: $$\int dx\frac{1}{e^x}\neq \int dx\frac{1}{e^x}e^x$$ If you apply the substitution $u=e^x$ correctly you get: $$\int dx\frac{1}{e^x} = \int\frac{1}{u^2}du = -u^{-1}+C = -e^{-x}+C$$

  • 1
    $\begingroup$ The OP is asking why is his solution wrong $\endgroup$ – Shobhit Aug 24 '13 at 11:43
  • $\begingroup$ @Shobhit: Edited. $\endgroup$ – Daniel Robert-Nicoud Aug 24 '13 at 11:48

Indeed, you can use the substitution method for integrating $$\int \frac 1{e^x} \,dx = \int e^{-x} \, dx $$

$$\text{Put}\;\;\color{blue}{\bf u = -x} \implies du = -\,dx \iff \color{red}{\bf -\,du = dx}$$

Substituting then gives us $$\begin{align} \int e^{\color{blue}{\bf -x}} \,\color{red}{\bf dx} & = \int e^\color{blue}{\bf u} (\color{red}{\bf -\,du}) \\& = -\int e^u\,du \\ \\ & = -e^u + C \\ & = - e^{-x} + C \\ \\ & = \frac{-1}{e^x} + C\end{align}$$

  • $\begingroup$ Thank you that was more clarification $\endgroup$ – Mohammad Fakhrey Aug 24 '13 at 12:15
  • $\begingroup$ You're welcome Mohammad. Sorry I couldn't have been of more help. $\endgroup$ – Namaste Aug 24 '13 at 12:17

You can see the steps, one by one, or all steps at once by inserting the following codes in Maple:

  [> with(Student[Calculus1]):
     IntTutor(1/exp(x), x);

enter image description here


Not the answer you're looking for? Browse other questions tagged or ask your own question.