= Solution
Insert the source into the <Green-function representation> and split the integral at its source discontinuity in <derivative>:
$$
\begin{aligned}
y(x)&=-e^x\cos x\int_0^x\sin\xi\,d\xi-e^x\sin x\int_x^{\pi/2}\cos\xi\,d\xi\\
&=-e^x[\cos x(1-\cos x)+\sin x(1-\sin x)].
\end{aligned}
$$
Using $\sin^2x+\cos^2x=1$, the answer is
$$
\boxed{y(x)=e^x(1-\cos x-\sin x).}
$$
Both endpoint values are zero. As a direct check, conjugating by $e^x$ sends $y''-2y'+2y$ to $e^x(v''+v)$, and $v=1-\cos x-\sin x$ gives $v''+v=1$. Thus the differential equation and both <boundary conditions> are satisfied.
Back to article page