Solution (source code)

= Solution

For the <linear differential operator> $L=D^2+4D+5$, the <characteristic equation> is $m^2+4m+5=0$, with roots $-2\pm i$. Take the <fundamental system of solutions>
$$
u(x)=e^{-2x}\cos x,\qquad v(x)=e^{-2x}\sin x,\qquad W(x)=uv'-u'v=e^{-4x}.
$$
The <Wronskian> is never zero, so <variation of parameters> is valid on the whole interval. Write a particular solution as $a(x)u(x)+b(x)v(x)$, and impose the auxiliary condition $a'u+b'v=0$. Substitution then gives $a'u'+b'v'=f$. These two equations give
$$
a'=-\frac{vf}{W},\qquad b'=\frac{uf}{W}.
$$
Choosing both <integrals> to start at zero makes the resulting particular solution and its first <derivative> vanish there:
$$
y_p(x)=-u(x)\int_0^x\frac{v(t)f(t)}{W(t)}\,dt+v(x)\int_0^x\frac{u(t)f(t)}{W(t)}\,dt=e^{-2x}\int_0^xe^{2t}\sin(x-t)f(t)\,dt.
$$
A general solution is $Au+Cv+y_p$. The <boundary condition> at zero sets $A=0$. The condition at $\ell=\pi/2$ gives
$$
C=-\int_0^{\pi/2}e^{2t}\cos t\,f(t)\,dt,
$$
because $\sin\ell=1$ and $\sin(\ell-t)=\cos t$. Combining the two <integrals> yields the <Green's function> representation
$$
\boxed{y(x)=\int_0^{\pi/2}G(x,t)f(t)\,dt,\qquad G(x,t)=-e^{2(t-x)}\sin(\min(x,t))\cos(\max(x,t)).}
$$
Indeed, for $t<x$ the kernel is $-e^{2(t-x)}\sin t\cos x$, since $\sin(x-t)-\sin x\cos t=-\cos x\sin t$; for $x<t$ it is $-e^{2(t-x)}\sin x\cos t$.

For fixed interior $t$, the <Green's function> vanishes at both endpoints, is continuous at $x=t$, solves the homogeneous equation away from $t$, and satisfies
$$
G_x(t^+,t)-G_x(t^-,t)=\sin^2t+\cos^2t=1.
$$
This <derivative> jump is the normalization required by the leading <coefficient> one in $L$. Finally, a <homogeneous solution> satisfying the first <boundary condition> is $Ce^{-2x}\sin x$, and the second <boundary condition> at $\pi/2$ forces $C=0$. Thus the <boundary value problem> has exactly one solution for every continuous forcing, justifying the unique inverse represented by this kernel.