Key Concept: General Solution Derivation
a) $$y = x^2 – 2x + 2 + Ce^{-x}$$
[Solution Description]
The differential equation is in the standard linear form $$\frac{dy}{dx} + P(x)y = Q(x)$$, where $$P(x) = 1$$ and $$Q(x) = x^2$$.
First, we find the integrating factor:
$$I.F = e^{\int 1 \, dx} = e^x$$
Now, multiply both sides of the equation by the integrating factor:
$$e^x \frac{dy}{dx} + e^x y = x^2 e^x$$
This can be rewritten as:
$$\frac{d}{dx}(e^x y) = x^2 e^x$$
Integrate both sides with respect to $$x$$:
$$e^x y = \int x^2 e^x \, dx$$
Using integration by parts, let $$u = x^2$$ and $$dv = e^x \, dx$$. Then $$du = 2x \, dx$$ and $$v = e^x$$. Apply integration by parts formula:
$$\int u \, dv = uv – \int v \, du$$
We get:
$$\int x^2 e^x \, dx = x^2 e^x – \int 2x e^x \, dx$$
Solve $$\int 2x e^x \, dx$$ again using parts, let $$u = 2x$$ and $$dv = e^x \, dx$$. Then $$du = 2 \, dx$$ and $$v = e^x$$. We have:
$$\int 2x e^x \, dx = 2x e^x – \int 2 e^x \, dx = 2x e^x – 2 e^x$$
Substituting back:
$$\int x^2 e^x \, dx = x^2 e^x – (2x e^x – 2 e^x) = x^2 e^x – 2x e^x + 2 e^x$$
Therefore:
$$e^x y = x^2 e^x – 2x e^x + 2 e^x + C$$
Divide through by $$e^x$$:
$$y = x^2 – 2x + 2 + Ce^{-x}$$
Your Answer is correct.
a) $$y = x^2 – 2x + 2 + Ce^{-x}$$
[Solution Description]
The differential equation is in the standard linear form $$\frac{dy}{dx} + P(x)y = Q(x)$$, where $$P(x) = 1$$ and $$Q(x) = x^2$$.
First, we find the integrating factor:
$$I.F = e^{\int 1 \, dx} = e^x$$
Now, multiply both sides of the equation by the integrating factor:
$$e^x \frac{dy}{dx} + e^x y = x^2 e^x$$
This can be rewritten as:
$$\frac{d}{dx}(e^x y) = x^2 e^x$$
Integrate both sides with respect to $$x$$:
$$e^x y = \int x^2 e^x \, dx$$
Using integration by parts, let $$u = x^2$$ and $$dv = e^x \, dx$$. Then $$du = 2x \, dx$$ and $$v = e^x$$. Apply integration by parts formula:
$$\int u \, dv = uv – \int v \, du$$
We get:
$$\int x^2 e^x \, dx = x^2 e^x – \int 2x e^x \, dx$$
Solve $$\int 2x e^x \, dx$$ again using parts, let $$u = 2x$$ and $$dv = e^x \, dx$$. Then $$du = 2 \, dx$$ and $$v = e^x$$. We have:
$$\int 2x e^x \, dx = 2x e^x – \int 2 e^x \, dx = 2x e^x – 2 e^x$$
Substituting back:
$$\int x^2 e^x \, dx = x^2 e^x – (2x e^x – 2 e^x) = x^2 e^x – 2x e^x + 2 e^x$$
Therefore:
$$e^x y = x^2 e^x – 2x e^x + 2 e^x + C$$
Divide through by $$e^x$$:
$$y = x^2 – 2x + 2 + Ce^{-x}$$