Solution (source code)

= Solution

Extend $q$ by zero to the negative half-line. Its ordinary <Fourier transform> is then exactly the <Half-range Fourier transform> $\widehat q(k)$. The <Fourier inversion theorem> gives the real-line term for $x>0$; no endpoint convention at $x=0$ is needed.

It remains to show that each extra <contour> contributes zero, independently of its coefficient. For $\operatorname{Im}k<0$, the <integral> defining $\widehat q$ is <holomorphic>. With $\alpha=e^{2\pi i/3}$, multiplication by $\alpha^2$ rotates the sector $E$ into $-2\pi/3\leq\arg(\alpha^2k)\leq-\pi/3$, and multiplication by $\alpha$ rotates $D$ into $-2\pi/3\leq\arg(\alpha k)\leq-\pi/3$. Thus the two rotated transforms are <holomorphic> on their respective upper sectors.

Orient the <contours> as in the PDF: $\partial E$ runs from infinity on the $\pi/3$ ray into zero and then out along the positive real axis; $\partial D$ runs from negative real infinity into zero and then out along the $2\pi/3$ ray. Both have their sector on their left. Smooth decay and <integration by parts> give $\widehat q(k)=O(1/k)$ in closed lower-half-plane sectors. The factor $e^{ikx}$ decays in the <upper half-plane> for $x>0$. Close each sector by a large arc; the arc <integral> vanishes by <Jordan lemma>, including its short portion near the real axis. The <Cauchy integral theorem> therefore gives the <rotated null contours for half-range Fourier inversion>:
$$
\boxed{\int_{\partial E}e^{ikx}\widehat q(\alpha^2k)\,dk=0,\qquad
\int_{\partial D}e^{ikx}\widehat q(\alpha k)\,dk=0\quad(x>0).}
$$
Adding arbitrary constant multiples of these two zero <integrals> to ordinary <Fourier inversion> proves the asserted inversion formula. \b[The constants $c_1,c_2$ are arbitrary in this part]; selecting them later is what removes an unknown <boundary trace>.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2006/iii/paper-86-cubic-contours.png]
{title=The rotated inversion sectors and the middle sector that eliminates an unknown boundary transform}