In calculating $$\int_{0}^{\infty}e^{-x^{2}} dx = \frac{\sqrt{\pi}}{2}$$ What is the motivation and where does the idea to define $$F(x) = \int_{0}^{\infty}\frac{e^{-x(1+t^{2})}}{1+t^{2}}dt $$ come from?
Two thoerems we proved prior to this example:
Dominating Convergence Theorem(but over continuous functions)
If $f_{n}$ is a sequence of continuous functions on the closed interval $[a,b]$, converging uniformly to $f(x)$, fixing $c \in [a,b]$ then $\lim_{n\rightarrow \infty} \int_{c}^{x}f_{n}(t) dt = \int_{c}^{x}\lim_{n\rightarrow \infty}f_{n}(t) dt = \int_{c}^{x}f(t)$
Leibniz Rule: Assume $f(x,t)$, $d_{x}f(x,t)$ are continuous on $[a,b] X [a,b]$. If $F(x) = \int_{c}^{d} f(x,t)dt$ then $\frac{dF(x)}{dx} = \int_{c}^{d} d_{x}f(x,t) dt$
I ask because when solving this expression we use this function with the necessary theorems (Leibniz Rule, Integral Convergence/ Dominating Convergence) to find our result, but it feels as if $F(x,t)$ was pulled out of thin air.
If you'll pardon me, it'll help with what comes next if I instead write $$F(t):=\int_0^\infty\frac{\exp(-t(1+y^2))}{1+y^2}dy.$$
Now, there are many ways to evaluate $J:=\int_0^\infty e^{-x^2}dx$; the best compilation of them I know is here. I'll refer to proofs therein with its numbering. Almost all the proofs use a double integral, sometimes by squaring one integral. So if you try inventing your own proof, it's often wise to look for why the original integral squared should have a nice behaviour (especially in view of its value being a nice square root).
The OP asks about the motivation behind proof 4. We start with $$-2Je^{-t^2}=-2e^{-t^2}\int_0^\infty e^{-x^2}dx=-2te^{-t^2}\int_0^\infty e^{-t^2y^2}dy=\frac{d}{dt}F(t^2).$$(It's a little inconvenient for our purposes that the variable labelling I've borrowed from the above link differs from that of the OP.) Integrating from $t=0$ to $t=\infty$, $-2J^2=F(\infty)-F(0)=-\frac{\pi}{2}.$So we can state the motive of $F$'s definition as writing $J$ times the function we're integrating as the derivative of something we can evaluate at the ends of the integration range. More generally, $$A:=\int_a^b f(t)dt\implies A^2=\int_a^b Af(t) dt,$$so it'd be nice to somehow write $Af$ as a derivative.