Substitution: For $x>0$m let $f(x) = \int_{0}^\infty e^{-t-\frac{x^2}{t}}\cdot t^{-\frac{1}{2}}dt $. This question is from an old qualification exam for a master degree in my college. I tried to solve it as prep. 
For $x>0$m let $f(x) = \int_{0}^\infty e^{-t-\frac{x^2}{t}}\cdot t^{-\frac{1}{2}}dt $.
1) 
Using a substitution, show that $$f\left(x\right)= x\int_{0}^\infty e^{-t-\frac{x^2}{t}}\cdot t^{-\frac{3}{2}} dt$$
2)
Then show that $f(x) = C \cdot e^{-2x}$ for some positive constant $C$.
For part 1, I substitute $\frac{x^2}{t}$ as u, and proved $f\left(x\right)= x\int_{0}^\infty e^{-u-\frac{x^2}{u}}\cdot u^{-\frac{3}{2}} du$
Please help me to solve the second part of the question. 
 A: For part 1), we can use the substitution $u = x^2/t$ (and accordingly $dt = -(x/u)^2 \, du$) to write
$$ f(x)
= \int_{0}^{\infty} e^{-\frac{x^2}{u} - u} \left(\frac{x^2}{u}\right)^{-1/2} \cdot \frac{x^2}{u^2} \, du
= x \int_{0}^{\infty} e^{-u-\frac{x^2}{u}} u^{-3/2} \, du. $$
For part 2), we use part 1) to rewrite $f(x)$ as
$$ f(x) = \frac{f(x) + f(x)}{2} = \int_{0}^{\infty} e^{-t - \frac{x^2}{t}} \left( \frac{ t^{-1/2} + xt^{-3/2}}{2} \right) \, dt. $$
Here the crucial ideal is to introduce the substitution $v = t^{1/2} - xt^{-1/2}$. As $t$ moves from 0 to $\infty$, this new variables $v =v(t)$ sweeps all the possible values in $\Bbb{R}$ from $-\infty$ to $\infty$. Also we easily notice that $v^2 + 2x = t + (x^2/t)$ and $dv = \frac{1}{2}(t^{-1/2} + xt^{-3/2})$. Thus it follows that
$$ f(x) = \int_{-\infty}^{\infty} e^{-(v^2 + 2x)} \, dv = \sqrt{\pi}e^{-2x}. $$

Remark. Aside from the computation itself, here is a possible source of motivation of this problem. If you have some knowledge on Brownian motion, you can check that this function is closely related to the hitting time of the Brownian motion as follows: If $B = (B_t : t \geq 0)$ is the standard 1-dim Brownian motion started at 0 and $T_a = \inf\{ t \geq 0 : B_t = a \}$ is the hitting time at level $a > 0$, then
$$ \Bbb{P}(T_a \in dt) = \frac{a}{\sqrt{2\pi}} e^{-a^2/2t} t^{-3/2} \, dt. \tag{1} $$
Consequently the Laplace transform of $T_a$ is
$$ \Bbb{E}e^{-sT_a} = \int_{0}^{\infty} e^{ - st} \, \Bbb{P}(T_a \in dt) = e^{-\sqrt{2s}a}. \tag{2} $$
These two facts can be obtained by using the reflection principle and the exponential martingale trick, respectively. That said, in principle we can prove 2) without any direct computation. (This is certainly a sledgehammer method, though.)
A: For part $1)$, as has already been said, just substitute $u = \frac{x^2}{t}$
For part $2)$, differentiate $f(x)$ w.r.t. $x$ in the original definition of $f(x)$, and since the limits are constants not dependent on $x$, you get:
$f'(x) = \int_0^{\infty} e^{-t-\frac{x^2}{t} } \cdot \left( -\frac{2x}{t}\right) \cdot t^{-\frac{1}{2}}dx = (-2)\left(x\int_0^{\infty} e^{-t-\frac{x^2}{t} } \cdot t^{-\frac{3}{2}}dx\right) = (-2) f(x)$
which gives you a differential equation in f(x), that is:
$f'(x) = -2f(x) $,
whose solution is as given.
