# What is the net area between f(x) = xlnx-xe^x  and the x-axis over x in [2, 4 ]?

Jan 6, 2017

$14 \ln 2 - 3 {e}^{4} + {e}^{2} - 3 = - 149.7$ areal units, nearly. The negative integral indicates that area below the x-axis is quite large. Really, f < 0 and x > 8, and the graph is below the x-axis

#### Explanation:

$y = f \left(x\right) = x \left(\ln x - {e}^{x}\right)$

The area $= \int y \mathrm{dx}$, with x from 2 to 4.

$= \int x \left(\ln x - {e}^{x}\right) \mathrm{dx}$, with x from 2 to 4

$= \int \left(\ln x d \left({x}^{2} / 2\right) - x d \left({e}^{x}\right)\right)$, with x from 2 to 4

$= \left[{x}^{2} / 2 \ln x - \int {x}^{2} / 2 d \left(\ln x\right) - \left(x {e}^{x} - \int {e}^{x} \mathrm{dx}\right)\right]$, x from 2 to 4.

$= \left[{x}^{2} / 2 \ln x - \frac{1}{2} \int x \mathrm{dx} - x {e}^{x} + {e}^{x}\right]$, with x from 2 to 4

#=[1/4x^2(2 ln x -1 )-e^x(x-1)]@, between the limits x = 2 and 4.

Upon substitution of limits and simplification, this

$= 14 \ln 2 - 3 - 3 {e}^{4} + {e}^{2}$.

The graph inserted is suitably scaled to revveal the relevant portion of the curve

graph{x(ln x-e^x) [0, 4, -300, -0]}