1. **Problem Statement:** Find the area of the shaded region bounded by the curves $y = e^x$, $y = xe^x$, and the vertical line $x = 2$.
2. **Understanding the curves:**
- $y = e^x$ is an exponential function starting at $(0,1)$ and increasing.
- $y = xe^x$ starts at $(0,0)$ and grows faster than $e^x$ for $x > 1$.
3. **Determine the interval:** The region is bounded between $x=0$ and $x=2$.
4. **Find the points of intersection:** At $x=0$, $e^0=1$ and $0 \cdot e^0=0$, so $y=e^x$ is above $y=xe^x$.
5. **Set up the integral for the area:** The area between two curves $y=f(x)$ and $y=g(x)$ from $a$ to $b$ is
$$\text{Area} = \int_a^b |f(x) - g(x)| \, dx$$
Here, $f(x) = e^x$ and $g(x) = xe^x$, and since $e^x > xe^x$ on $[0,2]$,
$$\text{Area} = \int_0^2 (e^x - xe^x) \, dx$$
6. **Simplify the integrand:**
$$e^x - xe^x = e^x(1 - x)$$
7. **Compute the integral:**
$$\int_0^2 e^x(1 - x) \, dx = \int_0^2 e^x \, dx - \int_0^2 x e^x \, dx$$
8. **Calculate each integral separately:**
- First integral:
$$\int_0^2 e^x \, dx = [e^x]_0^2 = e^2 - 1$$
- Second integral (by integration by parts):
Let $u = x$, $dv = e^x dx$ then $du = dx$, $v = e^x$.
$$\int x e^x \, dx = x e^x - \int e^x \, dx = x e^x - e^x + C = e^x(x - 1) + C$$
Evaluate from 0 to 2:
$$[e^x(x - 1)]_0^2 = e^2(2 - 1) - e^0(0 - 1) = e^2 - (-1) = e^2 + 1$$
9. **Combine results:**
$$\text{Area} = (e^2 - 1) - (e^2 + 1) = e^2 - 1 - e^2 - 1 = -2$$
10. **Interpretation:** Area cannot be negative, so take absolute value:
$$\text{Area} = 2$$
**Final answer:**
$$\boxed{2}$$
Area Shaded Region Ec6B78
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.