A way to show $\int_0^\infty e^{-t^2}dt=\frac{\sqrt{\pi}}{2}$ Question Let $f(x)=[\int_0^x e^{-t^2}dt]^2$, and $g(x)=\int_0^1 \frac{e^{-x^2(t^2+1)}}{t^2+1} dt$
Show that $$f'(x)+g'(x)=0$$ Hence $$f(x)+g(x)=\frac{\pi}{4}$$
What I did for the first part:
$$f'(x)=2(\int_0^x e^{-t^2}dt)\frac{d}{dx}\int_0^x e^{-t^2}dt=2(\int_0^x e^{-t^2}dt)(\int_0^x e^{-x^2}dt)=2xe^{-x^2}\int_0^x e^{-t^2}dt$$
and $$g'(x)=\int_0^1 \frac{\partial}{\partial x}\frac{e^{-x^2(t^2+1)}}{t^2+1} dt=-2x\int_0^1 e^{-x^2(t^2+1)}dt=-2xe^{-x^2}\int_0^1 e^{-x^2t^2}dt$$
So $$f'(x)+g'(x)=2xe^{-x^2}(\int_0^x e^{-t^2}dt-\int_0^1 e^{-x^2t^2}dt)$$
But I can't show that the last term =0, where did I make a mistake, or what should I do to take this further?
Any help is appreciated.
 A: One thing you miss is 
$$f'(x)=2(\int_0^x e^{-t^2}dt)\frac{d}{dx}\int_0^x e^{-t^2}dt=2e^{-x^2}\int_0^x e^{-t^2}dt$$
by the fundamental theorem of calculus (as @user284331 said),
and $$g'(x)=\int_0^1 \frac{\partial}{\partial x}\frac{e^{-x^2(t^2+1)}}{t^2+1} dt=-2xe^{-x^2}\int_0^1 e^{-x^2t^2}dt = -2e^{-x^2}\int_0^x e^{-u^2}du$$
by change variable $u=xt$. So you have $f'(x)+g'(x)=0$. Hence
$$
f(x)+g(x) = C 
$$
Because its constant take $x=0$ will gives $C=\pi/4$. Because of the title, i assume you want to find the integral $\int^{\infty}_0 e^{-t^2} dt$ also, which we can get by taking the limit $x \rightarrow \infty$ to the $f(x)+g(x) = \pi/4 $.
Note :
Another quick way to evaluate the integral
$$I = \int^{\infty}_0 e^{-y^2} dy
$$
is by squared and change to polar coordinate
$$
I^2= \int^{\infty}_0 \int^{\infty}_0 e^{-(x^2+y^2)} dx dy = \int^{\frac{\pi}{2}}_0 \int^{\infty}_0 e^{-r^2} r dr d\theta = \pi/4
$$
Hence
$$
I=  \int^{\infty}_0 e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
A: So 
\begin{align*}
f'(x)=2e^{-x^{2}}\int_{0}^{x}e^{-t^{2}}dt
\end{align*}
and 
\begin{align*}
x\int_{0}^{1}e^{-x^{2}t^{2}}dt=\int_{0}^{x}e^{-t^{2}}dt,
\end{align*}
the rest goes through.
A: Another way
$I = \int^{\infty}_0 e^{-x^2} dx =\int^{\infty}_0 e^{-y^2} dy$
$I^2 = \iint_{S: x, y : 0 \to \infty} e^{-x^2} e^{-y^2} dxdy = \iint_{S} e^{-x^2-y^2} dx dy = \int^{\frac{\pi}2}_0\int^{\infty}_0 e^{-r^2} r dr d\theta  = \frac{\pi} {4} \implies I = \frac{\sqrt{\pi}}{2}$ (Here S is 1st quadrant of XY Plane)
