Solution (source code)

= Solution

Away from $x=x'$, the free equation is $G''+k^2G=0$. The <outgoing boundary condition> selects $G=Ae^{ik|x-x'|}$, continuous at its source. Integrating the <differential equation> across the source gives the <derivative> jump
$$
-\frac{\hbar^2}{2m}\left[G'(x'^+,x')-G'(x'^-,x')\right]=1.
$$
The jump for the proposed form is $2ikA$, so $A=im/(k\hbar^2)$. Thus
$$
\boxed{G(x,x')=\frac{im}{k\hbar^2}e^{ik|x-x'|}.}
$$
For $x$ far to either side, the $x'$-dependent <phase> is absorbed into the outgoing amplitude. The outgoing prescription is equivalently the boundary value of the <resolvent> with $E\to E+i0$; changing that prescription would give a different <Green function>.