Let $$ a_n=\int^\pi_0e^{-nx}\sin(n^2x)dx $$
find $\sup\{a_n:n\in\mathbb N\}$
I found myself the solution.
Integrating twice by parts we have $$ a_n=n\int^\pi_0e^{-nx}\cos(n^2x)dx=\left[-e^{-nx}\cos(n^2x)\right]^\pi_{x=0}-n^2\int^\pi_0e^{-nx}\sin(n^2x)dx=1-e^{-n\pi}\cos(n^2\pi)-n^2a_n\\ a_n=\frac{1-e^{-n\pi}\cos(n^2\pi)}{1+n^2}=\frac{1-(-1)^ne^{-n\pi}}{1+n^2}\\ a_{2k}=\frac{1-e^{-2k\pi}}{1+(2k)^2}\\ a_{2k+1}=\frac{1+e^{-(2k+1)\pi}}{1+(2k+1)^2} $$ then $$ a_{2k}<a_{2k-1}<a_1=\frac{1+e^{-\pi}}{2} $$
I found myself the solution.
Integrating twice by parts we have $$ a_n=n\int^\pi_0e^{-nx}\cos(n^2x)dx=\left[-e^{-nx}\cos(n^2x)\right]^\pi_{x=0}-n^2\int^\pi_0e^{-nx}\sin(n^2x)dx=1-e^{-n\pi}\cos(n^2\pi)-n^2a_n\\ a_n=\frac{1-e^{-n\pi}\cos(n^2\pi)}{1+n^2}=\frac{1-(-1)^ne^{-n\pi}}{1+n^2}\\ a_{2k}=\frac{1-e^{-2k\pi}}{1+(2k)^2}\\ a_{2k+1}=\frac{1+e^{-(2k+1)\pi}}{1+(2k+1)^2} $$ then $$ a_{2k}<a_{2k-1}<a_1=\frac{1+e^{-\pi}}{2} $$