Find the derivative of $f(x) = \int_{-\infty}^\infty \frac{e^{-xy^2}}{1+y^2}\ dy.$ Problem statement: Find the derivative of 
$$f(x) = \int_{-\infty}^\infty \frac{e^{-xy^2}}{1+y^2}\ dy$$
and find an ordinary differential equation that $f$ solves. Find the solution to this ordinary differential equation to determine an explicit value for $f$.
My attempt: Normally, to find $f'(x)$ in this situation, if this was a calculus problem, I would write:
$$\frac{d}{dx} f(x) = \frac{d}{dx}\int_{-\infty}^\infty \frac{e^{-xy^2}}{1+y^2}\ dy = \frac{d}{dx}\left(\int_{-\infty}^0\frac{e^{-xy^2}}{1+y^2}\ dy + \int_0^\infty \frac{e^{-xy^2}}{1+y^2}\ dy\right)$$
and then I would differentiate under the integral sign:
$$f'(x) = \int_{-\infty}^0\frac{\partial}{\partial x}\frac{e^{-xy^2}}{1+y^2}\ dy + \int_0^\infty \frac{\partial}{\partial x}\frac{e^{-xy^2}}{1+y^2}\ dy,$$
which leaves me with
$$f'(x) = \int_{-\infty}^0 \frac{-y^2e^{-x(y^2+1)}}{1+y^2}\ dy + \int_{0}^\infty \frac{-y^2e^{-x(y^2+1)}}{1+y^2}\ dy.$$
However, this is actually an analysis problem, and as such I am having a really hard time justifying all of these steps. I have already proved that if $F(x) = \int_a^x f(y) \ dy$, then $F$ is absolutely continuous, and therefore the derivative exists a.e. Now, I also know from the FCT that if $f$ is integrable, $F'(x) = f(y)$ a.e. But I still can't quite figure out how to justify moving the derivative in the integral sign, particularly when I have infinite bounds, which I do. Any help would be much appreciated here!
 A: My eyes glaze over when I read the wikipedia page on differentiating through the integral sign. Perhaps this is simpler (and more general) for the case at hand: Let $f(x) = \int_{-\infty}^\infty g(x,y)\,dy,$ assuming the integrand belongs to $L^1(\mathbb {R})$ for each $x$ in an open interval $(a,b).$ Letting $D$ denote the partial derivative with respect to $x,$ suppose that
i)  $Dg(x,y)$ exists for all $(x,y) \in (a,b)\times \mathbb {R}$
ii) There exists $h \in L^1(\mathbb {R})$ such that $|Dg(x,y)| \le h(y)$ for all $(x,y)\in (a,b)\times \mathbb {R}.$ Then $$f'(x) = \int_\infty^\infty Dg(x,y)\,dy  \ \text {for all} \ x\in (a,b).$$
It's harder to state than prove; it's just the mean value theorem and the dominated convergence theorem.
Now in your problem we have $f(x)$ defined on $[0,\infty).$ The above applied to any $(a,\infty), a>0,$ shows $f$ is differentiable on $(0,\infty)$ with the formula for $f'(x)$ as in ii). I don't think $f'(0)$ exists.
A: Using Differentiation Under the Integral Sign, we get
$$
\begin{align}
f(x)&=\int_{-\infty}^\infty\frac{e^{-xy^2}}{1+y^2}\,\mathrm{d}y\tag{1}\\
f'(x)&=\int_{-\infty}^\infty\frac{-y^2e^{-xy^2}}{1+y^2}\,\mathrm{d}y\tag{2}\\
f(x)-f'(x)&=\int_{-\infty}^\infty e^{-xy^2}\,\mathrm{d}y\tag{3}\\
&=\sqrt{\frac\pi{x}}\tag{4}
\end{align}
$$
Explanation:
$(1)$: Given
$(2)$: Differentiation Under the Integral Sign. Alternatively, use Fubini's Theorem to show
$$\begin{align}
f(x)
&=\int_{-\infty}^\infty\frac{e^{-xy^2}}{1+y^2}\,\mathrm{d}y\\
&=\int_{-\infty}^\infty\int_x^\infty\frac{y^2e^{-ty^2}}{1+y^2}\,\mathrm{d}t\,\mathrm{d}y\\
&=\int_x^\infty\int_{-\infty}^\infty\frac{y^2e^{-ty^2}}{1+y^2}\,\mathrm{d}y\,\mathrm{d}t\\
\end{align}$$
Then the FTC to show that
$$f'(x)=\int_{-\infty}^\infty\frac{-y^2e^{-xy^2}}{1+y^2}\,\mathrm{d}y
$$
$(3)$: subtract $(2)$ from $(1)$
$(4)$: evaluate the integral in $(3)$
A: If you just try and compute naively with the limit, you can justify your steps a long the way (adding assumptions as needed, where some are needed here, i.e. $x$ must certainly be nonnegative).
We want to compute
$$
f'(x)=\lim_{h\to 0}\int_{\mathbb{R}}\frac{e^{-(x+h)y^2}-e^{-xy^2}}{(1+y^2)h}
$$
In particular, we want to have this really just be the integral of the derivative of the integrand in $x$, so we want to commute that limit with the integral. Let's justify, 
$$
\frac{e^{-(x+h)y^2}-e^{-xy^2}}{(1+y^2)h}\leq
\frac{e^{-(x+h)y^2}-e^{-xy^2}}{h}=e^{-cy^2}
$$ 
for some $c$ between $x$ and $x+h$ by the mean value theorem. Here I believe the assumption that $x\in (\epsilon,\infty)$, $\epsilon>0$ is needed. It certainly helps as then we may claim that 
$$
e^{-cy^2}\leq e^{-\epsilon y^2}
$$
for any such $c$. The latter is integrable and by the dominated convergence theorem, you may commute and conclude. 
