How to prove main-lobe side-lobe ratio in hann window is $-32\textrm{ dB}$?

I found that the value of the main lobe is about $N$, when I try to calculate the value of the sidelobe I got $0$, I assumed that the peak is at $\theta=\frac{6\pi}{N}$.

How can I find the size of the side-lobe?

So, the Hann function is defined to be [1, eq. 27b]

$$w(t)= \sin^2 \left ( \frac{ \pi t}{N-1} \right)\tag{def}$$

Now, to find local maxima, you'd just go ahead,

• find the Fourier transform $W(f)$ of that (easy: it's a multiplication of two sines and a rectangular window in time domain, which means it's the convolution of the transforms of these sines and the window), and
• do like every 11th grader and derive $\frac{dW(f)}{df}$ (harder, since now includes deriving a sum of sincs, but I'm pretty sure you'll manage!)
• set that function, its absolute or its square to 0 (hint: for which values does a cosine have a zero value?),
• find the point $f_\text{sidelobe}$ of the first local maximum that's not at $f=0$ (which is the main lobe) , and insert that point in the original window, giving you a value for $W(f_\text{sidelobe})$.

Things can get arbitrarily complicated as soon as you realize that sidelobes that are at $t\notin \mathbb Z$ kind of don't count, but presuming this is an assignment and not a dissertation... assume a very very large $N$ in the worst case.

Alternative: Read [1], which very nicely derives both the spectrum of the Hann Window (by presenting it as a sum of three Dirichlet Kernels) and why it's very elegant in multiple aspects.

[1] harris, Frederic J.:"On the use of windows for harmonic analysis with the discrete Fourier transform," in Proceedings of the IEEE, vol. 66, no. 1, pp. 51-83, Jan. 1978. doi: 10.1109/PROC.1978.10837

Marcus gives the general program to follow, but finding the lobe peaks analytically as the zeros of the derivative of the Fourier transform is not that easy. For a normalized and zero-centered "infinite-$N$" Hann window:

$$\cos^2\left(\frac{\pi x}{2}\right)$$

with Fourier transform:

$$\frac{\pi^2\sin(\omega)}{\omega(\omega + \pi)(\pi - \omega)}$$

they are located at solutions of:

$$\omega(\omega + \pi)(\omega - \pi)\cos(\omega) + (\pi^2 - 3\omega^2)\sin(w) = 0.$$

The first sidelobe peak is at:

$$\omega \approx \pm7.420232637.$$

The corresponding magnitude of the Fourier transform is:

$$\left|\frac{\pi^2\sin(7.420232637)}{7.420232637(7.420232637 + \pi)(\pi - \omega)}\right| \approx 0.02670758430$$

or in dB (compared to zero frequency, which is normalized to a magnitude of $1$ in the Fourier transform):

$$20\log_{10}(0.0267075843) = 20\frac{\log(0.0267075843)}{\log(10)} \approx -31.46730784 \text{ dB.}$$

Maybe your cited $-32$ dB is an approximation assuming that the peak is located half-way between the two first zeros of the Fourier transform, at $\omega = \frac{5\pi}{2} \approx 7.853981633,$ where the magnitude is approximately $-32.30498369$ dB.