Solution (source code)

= Solution

First solve for $v=y'$. <Multiplication> by $e^x$ and use of $v(1)=0$ give
$$
v(x)=-e^{-x}\int_x^1e^tf(t)\,dt.
$$
Integrating from zero to $x$, and using $y(0)=0$, yields $y(x)=-\int_0^xe^{-s}\int_s^1e^tf(t)\,dt\,ds$. Reversing the order of integration gives
$$
\boxed{G_1(x,t)=1-e^t\quad(0\leq t\leq x),\qquad G_2(x,t)=e^{t-x}-e^t\quad(x\leq t\leq1).}
$$
Thus $G(x,t)$ equals $G_1$ for $t<x$ and $G_2$ for $x<t$. It is continuous at $x=t$, vanishes at $x=0$, and has $G_x(1,t)=0$. Its derivative jumps from $-1$ to zero across $x=t$, so the jump is $+1$, matching the coefficient of $y''$. Both pieces satisfy $G_{xx}+G_x=0$ away from the jump. These facts also verify the Green representation directly. The homogeneous solutions are $A+Be^{-x}$, and the two <boundary conditions> force $A=B=0$, proving <uniqueness>.

For $f(t)=e^{-t}$, the formula gives
$$
\int_0^x(e^{-t}-1)\,dt+\int_x^1(e^{-x}-1)\,dt=-xe^{-x}.
$$
Hence \b[$y(x)=-xe^{-x}$]. Indeed $y'=(x-1)e^{-x}$ and $y''=(2-x)e^{-x}$, which verify the equation and both <boundary conditions>.