= Solution
{c}
The nonzero endpoint data contribute to the <Fredholm alternative> condition. With $w=e^x\sin x$, the same <integration by parts> identity gives
$$
\int_0^\pi w\mathcal Ly\,dx
=[wy'-w'y+2wy]_0^\pi
=-w'(\pi)y(\pi)+w'(0)y(0)=1.
$$
For the specified forcing the left side is $A\int_0^\pi\sin^2x\,dx=A\pi/2$. Hence
$$
\boxed{A=\frac2\pi}.
$$
To verify sufficiency, set $y=e^{-x}u$. Direct <differentiation> gives $\mathcal Ly=e^{-x}(u''+u)$. At this value of $A$, a <particular solution> of $u''+u=(2/\pi)\sin x$ is $-(x/\pi)\cos x$. The complete family obeying the two <boundary conditions> is
$$
\boxed{y(x)=e^{-x}\left[\left(1-\frac{x}{\pi}\right)\cos x+C\sin x\right],\qquad C\in\mathbb R}.
$$
The arbitrary constant records the one-dimensional <kernel>; existence does not imply uniqueness here.
Back to article page