The given second-order differential equation is:
\[
\frac{d^2 y}{dx^2} + 2 \frac{dy}{dx} + y = 0
\]
The characteristic equation corresponding to this differential equation is:
\[
r^2 + 2r + 1 = 0
\]
Solving for \( r \), we get a double root \( r = -1 \). Therefore, the general solution to the differential equation is:
\[
y(x) = (A + Bx) e^{-x}
\]
Using the given boundary conditions \( y(0) = 1 \) and \( y(1) = 3 \):
- For \( y(0) = 1 \):
\[
A = 1
\]
- For \( y(1) = 3 \):
\[
1 + B e^{-1} = 3 $\Rightarrow$ B = (3 - 1) e = 2e
\]
Thus, the solution is:
\[
y(x) = \left( 1 + 2e x \right) e^{-x}
\]
which simplifies to:
\[
y(x) = e^{-x} + (3e - 1) x e^{-x}
\]
Therefore, the correct answer is option (A).
Final Answer:
(A) \( e^{-x} + (3e - 1) x e^{-x} \)