How to find a positive function $g(x)$ such that \begin{align} \int_0^\infty e^{-\frac{c}{2x^2}} g(x) dx =\sqrt{\frac{\pi}{2}} e^{-\frac{\sqrt{c}}{2}} \end{align}
I know that the solution is $e^{-\frac{x^2}{2}}$ but not sure how to search for such a solution.
A little guesswork leads to the ansatz
$$g=b \exp \left(-a x^2\right)$$
Inserting into the integral gives for the two parameters
$$a=\frac{1}{8}, b=\frac{1}{2}$$
This is a soluton. I don't know if there are more. The comment of Paul Enta relating the Problem to Laplace Transformation suggests that there is only one positive solution.
If we drop the condition of positivity for $g$ we can find more solutions.
I tried to look for a function g which makes the integral equal to zero. A good candidate could be something convergent with a sine function.
The ansatz
$$\int_0^{\infty } \sin \left(p x^2\right) \exp \left(-\frac{c}{2 x^2}\right) \, dx$$
is successful with
$$p=\frac{\left(\frac{3 \pi }{4}\right)^2}{c}$$
Another zero solution comes with the cosine
$$\int_0^{\infty } \exp \left(-\frac{c}{2 x^2}\right) \cos \left(\frac{\left(\frac{\pi x}{4}\right)^2}{c}\right) \, dx=0$$