# Area between $y = e^x - xe^x$

I am trying to find the area between $y = e^x - xe^x$ and x= 0

I get stuck on trying to find the antiderivative of $xe^x$ I don't know how to do a complex number like that. I know the curves intersect at 1,1 so I am finding it from 0 to 1.

-
$\int xe^x\,dx$ is a standard integration by parts; set $u=x$ and $dv=e^x\,dx$. – Brian M. Scott Apr 28 '12 at 20:11
I have not been introduced to integration by parts. – user138246 Apr 28 '12 at 20:14
I don’t offhand see any straightforward systematic way to get the antiderivative without using integration by parts. Try taking the derivative of $2e^x-xe^x$ with respect to $x$, and see if that helps you to find the antiderivative that you need. – Brian M. Scott Apr 28 '12 at 20:23
It might help to think about what differentiates to a similar function (i.e. the whole function, y). @Mark Bennet's answer is a good hint that is straightforward and avoids integration by parts. – Ronald Apr 28 '12 at 20:31

You may not know about integration by parts, but you might be expected to use some intelligent guesswork. You know that the derivative of $e^x$ is $e^x$ so how about ...

Take the derivative of $xe^x$ and find that it is $e^x+xe^x$.

So the derivative of $xe^x-e^x$ is ... and go from there.

-

$$\int_0^1e^x-xe^xdx=\int_0^1e^xdx-\int_0^1xe^xdx=e-1-\int_0^1xe^xdx$$

$$\int_0^1xe^xdx=xe^x| _0^1-\int_0^1e^xdx\ \ \ \ \ \ \ \text{(by parts)}$$ $$=e-(e-1)=1$$

$$\int_0^1e^x-xe^xdx=e-2$$

-
Integration by parts is not something introduced until the next chapter which will not be apart of this course. – user138246 Apr 28 '12 at 20:16

First remember the formula for derivatives by parts. You can remember it by integrating the product formula for derivatives $$(fg)' = f(g') + (f')g \quad\xrightarrow{\int_0^1}\quad fg|_{x=0}^{1} = \int_0^1 f(g')dx + \int_0^1 (f')g dx$$ Or rephrased: $\int_0^1 (f')g dx = fg|_{x=0}^{1} - \int_0^1 f(g')dx$.

If we chose $f'=e^x \Rightarrow f=e^x$ and $g=x$ we get $$\int_0^1 e^x x dx = [e^x x]_{x=0}^{1} - \int_0^1 e^x(1)dx.$$

Now this, we can solve...

$$\int_0^1 e^x dx - \int_0^1 e^x x dx = - [e^x x]_{x=0}^{1} + 2 \int_0^1 e^x(1)dx$$ $$= -e + 2(e-1) = e-2$$

-