Is it allowed to solve this integral:
$${I=\int_{-\infty}^{\infty}{t^2e}^{it^2}dt}$$
as follows?
$$I=\lim_{a\rightarrow1}{\left[\int_{-\infty}^{\infty}{t^2e}^{iat^2}dt=\int_{-\infty}^{\infty}{-i\frac{\partial e^{iat^2}}{\partial a}}dt=-i\frac{d}{da}\int_{-\infty}^{\infty}e^{iat^2}dt\right]}\\ =\lim_{a\rightarrow1}{\left[i\frac{d\left(\sqrt{\frac{\pi}{2a}}\right)}{da}\left(1+i\right)=i\sqrt{\frac{\pi}{\left(2a\right)^3}}\left(1+i\right)\right]}=\sqrt{\frac{\pi}{8}}(i-1)$$
Your integral diverges. Integrate by parts to get an antiderivative $$ \int_0^x t^2 e^{it^2} dt = \frac{-ixe^{ix^2}}{2} + \frac{i\sqrt{\pi}}{2(\sqrt{2}-i\sqrt{2})}\;\text{erf}\left(\frac{\sqrt{2}-i\sqrt{2}}{2}\;x\right) $$ But then note $\int_0^x t^2 e^{it^2} dt$ converges neither as $x \to +\infty$ nor as $x \to -\infty$. Here is its real part:
Note that the "principal value" $\lim_{x \to \infty}\int_{-x}^x t^2 e^{it^2} dt =2\lim_{x \to \infty}\int_{0}^x t^2 e^{it^2} dt$ also diverges.