Integrating $e^x / (e^x - 2)$

880 Views Asked by At

Well, I expected this to be a fairly simple task, but in the online portal of my uni it is stated I got zero points for it, although I recall pretty clearly this is exactly what I did. Where is my mistake then?

Task: $\int \frac{e^x}{e^x - 2}dx$

First I applied a substitution, as I always find it nice to have just a lone variable below fraction to see possible connections to standard integrals.

So I used u = $e^x - 2$. This also requires u' or $\frac{du}{dx}$ which = $e^x$. Rearranging this gives dx = $\frac{du}{e^x}$ which we then insert. So now we have:

$\int \frac{u + 2}{u} * \frac{du}{e^x}$

{I am expressing the $e^x$ in numerator with my substitution too, is this good practice? Or should I leave it as just $e^x$ next time? In next step it is seen that it wasn't so smart here, but what about a general rule?}

I now see that I can shorten ${e^x}$ if I undo the substitution in the numerator again:

$\int \frac{e^x -2 + 2}{u} * \frac{du}{e^x}$

{I now shorten ${e^x}$ by crossing it out in denominator of $\frac{du}{e^x}$ and cross out the whole numerator of $\frac{e^x -2 + 2}{u}$ and replace it with 1. Or would further explanations be needed here?} This leaves:

$\int \frac{1}{u}du$

which is a standard integral = ln(u). At last I undo the substitution: u = $e^x -2$ which leaves as our result:

ln($e^x -2$)

I then add the absolute value due to the behaviour of ln: Final solution:

ln($|e^x -2|$) + C

4

There are 4 best solutions below

0
On BEST ANSWER

As others have said, the result was correct but you took the long way to get there. Where could you have saved time.

$u = e^x - 2$ is a good substitution

$du = e^x dx$

here you could have saved a few steps:

$\int \frac {e^x}{e^x - 2} \ dx = \int \frac {(e^x dx)}{e^x - 2} = \int \frac {du}{u}$

And you could even drop the intermediate step.

It is cleaner than what you have.

0
On

Your solution is correct. Notice that your integral is of the form: $$\int \frac{f'(x)}{f(x)}~dx=\ln|f(x)|+C$$ So you can easily obtain the solution if you know this fact.


The online portal may have wanted you to omit the absolute value signs as @Ian suggested or it may be due to the brackets you've added on $\ln(|f(x)|)+C$.

0
On

Let $e^{x}-2 = z$

$d(e^{x}-2)/dx = e^x$

Therefore $e^x dx$ = $dz$

Then $∫e^x/(e^x-2) dx = ∫dz/z = \ln(z)+c=\ln(e^x-2)+C$ [where c is the constant of integration]

0
On

"$\int \frac{u+2}{u} * \frac{\mathrm{d}u}{\mathrm{e}^x}$" is gibberish (until you write "$x(u)$" in that exponent). If you are integrating with respect to $u$, everything still in the integrand should be a function of $u$. If you have a bare "$\mathrm{e}^x$", that is a constant with respect to variation in $u$ and should be factored out of the integral.

You had an integral whose integrand contained only $x$s and which was integrated with respect to $x$. After your change of variable, you should have an integral whose integrand contains only $u$s and which is integrated with respect to $u$. If you have a mixture of $x$s and $u$s, you give your reader the impression you are confused.

When you write $u = \mathrm{e}^x - 2$, you should immediately (implicitly) differentiate to obtain $\mathrm{d}u = \mathrm{e}^x \,\mathrm{d}x$. I say "implicitly" because we have treated $u$ and $x$ both as functions of a third anonymous variable. If we give that third variable a name, say $t$, then we would write $\frac{\mathrm{d}u}{\mathrm{d}t} = \mathrm{e}^x \frac{\mathrm{d}x}{\mathrm{d}t}$. However, since "$t$" is entirely extraneous and we are attempting to pattern match in our integral, it is far more useful to write $\mathrm{d}u = \mathrm{e}^x \,\mathrm{d}x$.

Now, go back to your integral and match as much of $\mathrm{e}^x \,\mathrm{d}x$ as you can. This immediately absorbs the numerator. For the rest of the integrand, replace the $x$s with $\ln(u+2)$ and then simplify. You will get $$ \int \frac{\mathrm{d}u}{u} \text{,} $$ which is easy to do. This is the strategy : propose the substitution, find the resulting relation between the differentials, then absorb as much of the integrand as possible into the differential. One of the functions of substitutions is to make awkward terms in the integrand absorb into the differential, which won't happen if you don't pattern match to capture as much of the integrand as you can into the replacing differential.

There is an alternative. As I hinted at the top of this answer, use the substitution to explicitly write $x$ as a function of $u$. For instance, \begin{align*} u &= \mathrm{e}^x - 2 \text{, so } \\ x &= \ln(u + 2) \end{align*} Then \begin{align*} \mathrm{d}u &= \mathrm{e}^x \,\mathrm{d}x \text{, } \\ \mathrm{e}^{-x} \,\mathrm{d}u &= \mathrm{d}x \text{, } \\ \mathrm{e}^{-\ln(u+2)} \,\mathrm{d}u &= \mathrm{d}x \text{, and finally} \\ \frac{\mathrm{d}u}{u+2} &= \mathrm{d}x \text{.} \end{align*} (We know we are on the right track because one side of this equation has only $u$s and one side has only $x$s.) Then you can correctly write your substituted antiderivative as $$ \int \frac{u+2}{u} \cdot \frac{\mathrm{d}u}{u+2} \text{.} $$ Now cancel, integrate the result, substitute back from $u$s to $x$s, and be done.