From the Wikipedia page, Landsberg-Schaar relation is the following equation: $$\frac{1}{\sqrt{p}}\sum_{n=0}^{p-1}\exp(\frac{2\pi i n^2 q}{p})=\frac{e^{\pi i/4}}{\sqrt{2q}}\sum_{n=0}^{2q-1}\exp (-\frac{\pi i n^2 p}{2q}).$$ Here $p$ and $q$ are positive integers.
The wiki page says that the standard way to prove it is to use the functional equation of theta function: $$\sum_{n=-\infty}^\infty e^{-\pi n^2 z}=\frac{1}{\sqrt{z}}\sum_{n=-\infty}^{\infty}e^{-\pi n^2/z}.$$ Put $z=2iq/p+\varepsilon$ with $\varepsilon>0$ and then let $\varepsilon\to 0$. But I don't see how this implies the Landsberg-Schaar relation, can anyone give some details?
The Landsberg-Schaar relation (LS) admits not only analytic proof. The article A proof of the Landsberg-Schaar relation by finite methods by Ben Moore gives an elementary proof of the LS. But this proof is unreasonably complicated. The LS can be proven in two steps.
It is well known that an arbitrary complex-valued function $f$ is represented by its finite (discrete) Fourier series $$f(x)=\sum\limits_{k=0}^{n-1}\widehat{f}_n(k)e\left(\frac{kx}{n}\right)\qquad(0\le x<n),$$ with finite Fourier coefficients $$\widehat{f}_n(k)=\dfrac{1}{n}\sum\limits_{x=0}^{n-1}f(x)e\left(-\frac{kx}{n}\right)\qquad(0\le k<n)$$ where $e(t)=e^{2\pi it}$. The first step is “A Discrete Analog of the Poisson Summation Formula”: if $n=n_1n_2$ then $$\sum\limits_{x=0}^{n_2-1}f(n_1x)=n_2 \sum\limits_{x=0}^{n_1-1}\widehat{f}_n(n_2x).$$ It follows directly from the formula for $\widehat{f}_n(k)$.
The function $f(x)=e\left(x^2/( 4pq)\right)$ is periodic with the period $n=2pq$ and \begin{align*} \widehat{f}_{2pq}(k)=&\frac{1}{ 2pq}\sum_{y=0}^{2pq-1}e\left(\frac{y^2-2ky}{ 4pq}\right)=\frac{1}{ 2pq}\sum_{y=0}^{2pq-1}e\left(\frac{(y-k)^2-k^2}{ 4pq}\right)=\\=& \frac{1}{ 2pq}e\left(-\frac{k^2}{ 4pq}\right)\sum_{y=0}^{2pq-1}e\left(-\frac{y^2}{ 4pq}\right)=\frac{1}{ 2pq}e\left(-\frac{k^2}{ 4pq}\right)\cdot\frac{S(4pq)}{ 2}, \end{align*} where $$S(p)=\sum\limits_{x=1}^{p}e(x^2/p)=\frac{1+i^{-p}}{1+i^{-1}}\cdot\sqrt{p}$$ is a Gauss sum. So (the second step) applying the discrete Poisson summation formula to $f$ with $n_1=2q$, $n_2=p$ and $n=n_1n_2=2pq$ we get the formula $$\sum_{x=0}^{p-1}e\left(\frac{qx^2}{ p}\right)=\frac{S(4pq)}{4q}\sum_{x=0}^{2q-1}e\left(-\frac{px^2}{ 4q}\right),$$ which is equivalent to LS.