© All Rights reserved @ LearnWithDash
Step-by-Step Solution
Step 1: Identify and Solve for f(x)
We are given that $f'(x) = f(x)$ and $f(0) = 1$. The general solution of the differential equation $f'(x) = f(x)$ is
$$
f(x) = Ae^x,
$$
where $A$ is a constant. Using the initial condition $f(0) = 1$, we get
$$
A e^0 = 1 \quad \Rightarrow \quad A = 1.
$$
Hence,
$$
f(x) = e^x.
$$
Step 2: Express g(x)
We are also given that $f(x) + g(x) = x^2$. Thus,
$$
g(x) = x^2 - f(x) = x^2 - e^x.
$$
Step 3: Set Up the Required Integral
We want to evaluate
$$
\int_{0}^{1} f(x) \, g(x) \, dx = \int_{0}^{1} e^x \bigl(x^2 - e^x\bigr) \, dx.
$$
Distribute $e^x$ inside the parentheses:
$$
\int_{0}^{1} e^x \bigl(x^2 - e^x\bigr) \, dx
= \int_{0}^{1} x^2 e^x \, dx \;-\; \int_{0}^{1} e^{2x} \, dx.
$$
Step 4: Evaluate Each Integral Separately
4.1. Evaluate $∫_{0}^{1} x^2 e^x dx$
We use integration by parts. Let:
$$
u = x^2, \quad dv = e^x dx.
$$
Then,
$$
du = 2x \, dx, \quad v = e^x.
$$
By the integration by parts formula,
$$
\int x^2 e^x \, dx
= x^2 e^x - \int 2x e^x \, dx.
$$
We apply integration by parts again for $\int 2x e^x \, dx$:
let $u = 2x$ and $dv = e^x dx$. Then
$$
du = 2 \, dx, \quad v = e^x.
$$
So,
$$
\int 2x e^x \, dx = 2x e^x - \int 2 e^x \, dx
= 2x e^x - 2 e^x
= 2 e^x(x - 1).
$$
Therefore,
$$
\int x^2 e^x \, dx
= x^2 e^x - 2 e^x (x - 1)
= e^x \bigl(x^2 - 2x + 2\bigr).
$$
Evaluating from $0$ to $1$:
$$
\left[\! e^x \bigl(x^2 - 2x + 2\bigr) \right]_{0}^{1}
= e^1 \bigl(1^2 - 2\cdot1 + 2\bigr) - e^0 \bigl(0^2 - 2\cdot0 + 2\bigr).
$$
That is
$$
e \, (1 - 2 + 2) \;-\; 1 \cdot (2) = e \cdot 1 - 2 = e - 2.
$$
Hence,
$$
\int_{0}^{1} x^2 e^x \, dx = e - 2.
$$
4.2. Evaluate $∫_{0}^{1} e^{2x} \, dx$
We have
$$
\int e^{2x} \, dx
= \frac{1}{2} \, e^{2x}.
$$
Therefore,
$$
\int_{0}^{1} e^{2x} \, dx
= \left[\frac{1}{2} e^{2x}\right]_{0}^{1}
= \frac{1}{2} \left(e^{2} - 1\right).
$$
Step 5: Combine the Results
Now, substitute the two results back:
$$
\int_{0}^{1} e^x \bigl(x^2 - e^x\bigr) \, dx
= \int_{0}^{1} x^2 e^x \, dx - \int_{0}^{1} e^{2x} \, dx
= \bigl(e - 2\bigr) - \frac{1}{2} \left(e^{2} - 1\right).
$$
Simplify:
$$
= e - 2 - \frac{e^{2}}{2} + \frac{1}{2}
= e - \frac{e^{2}}{2} - \frac{3}{2}.
$$
Final Answer
$$
\int_{0}^{1} f(x)g(x) \, dx
= e \;-\; \frac{e^2}{2} \;-\; \frac{3}{2}.
$$