Find the general solution of y'' - y = x^2 + 1
Find the general solution of $y'' - y = x^2 + 1$.
Explanation of Method
With real characteristic roots ±1, the trial y*=Ax²+Bx+C (r=0 not a root) matches coefficients to A=−1, B=0, C=−3.
Step 1: Homogeneous solution
\[ r^2-1=0 \implies (r-1)(r+1)=0 \implies r_1=1,\ r_2=-1. \]
\[ Y_h = C_1e^{x} + C_2e^{-x}. \]
Step 2: Particular solution
The right-hand side $f(x)=x^2+1$ is a polynomial of degree 2, and $r=0$ is not a root of the characteristic equation, so try $y^*=Ax^2+Bx+C$: $y^{*\prime}=2Ax+B, \qquad y^{*\prime\prime}=2A.$
Substitute into the equation: \[2A - (Ax^2+Bx+C) = x^2+1 \implies -Ax^2 - Bx + (2A-C) = x^2+1.\]
Step 3: Match coefficients
\[ x^2:\ -A=1\implies A=-1, \qquad x^1:\ -B=0\implies B=0, \qquad x^0:\ 2A-C=1\implies -2-C=1\implies C=-3. \]
\[ y^* = -x^2-3. \]
Step 4: Verify
\[ y^{*\prime\prime} - y^* = 2 - (-x^2-3) = 2+x^2+3 = x^2+1.\ \checkmark \]
Step 5: General solution
The solution is recorded in the result below.
Result
Final answer:
\[\boxed{\,y = C_1e^{x} + C_2e^{-x} - x^2 - 3\,}\]