= Solution
Choose the left homogeneous solution $v(x)=\sinh x$ and the right one $w(x)=\sinh(1-x)$. Their <Wronskian> is $vw'-v'w=-\sinh1$. The <Dirichlet modified Helmholtz Green function on an interval>, with operator sign $D_x^2-1$, is therefore
$$
G(x,\xi)=-\frac{\sinh(x_<)\sinh(1-x_>)}{\sinh1},\qquad x_<=\min(x,\xi),\quad x_>=\max(x,\xi).
$$
It vanishes at both endpoints, is continuous at $x=\xi$, and its first <derivative> jumps by $+1$, giving $(D_x^2-1)G=\delta(x-\xi)$. The <Green-function representation> then gives
$$
u(x)=-\frac{\sinh(1-x)}{\sinh1}\int_0^xe^\xi\sinh\xi\,d\xi-\frac{\sinh x}{\sinh1}\int_x^1e^\xi\sinh(1-\xi)\,d\xi.
$$
The two <integrals> are $(e^{2x}-1)/4-x/2$ and $e(1-x)/2-(e-e^{2x-1})/4$, respectively. Substituting them and simplifying gives
$$
\boxed{u(x)=\frac12\left[xe^x-\frac{e\sinh x}{\sinh1}\right].}
$$
Direct <differentiation> verifies $u''-u=e^x$ and both zero boundary values. The negative kernel also explains why the solution is negative inside the interval despite the positive right-hand side.
\Image[/past-exam-of-the-mathematics-course-of-the-year-2-of-the-natural-sciences-course-of-the-university-of-cambridge/2007/paper-1-green-response.png]
{title=A negative Dirichlet Green kernel produces a negative response to positive forcing}
{description=Left: three source locations give continuous kernels with derivative jump $+1$. Right: the integrated solution of $u''-u=e^x$ returns to zero at both boundaries.}
Back to article page