Let $\displaystyle f(x) = \int_{0}^{x} e^{\frac{x^2}{2}-\frac{t^2}{2}} dt$. Show that $f'(x) - x \cdot f(x) = 1, ∀ x \in \mathbb{R}$.
I'm pretty sure I'm supposed to use Leibniz's rule for this one, but when I do all I can find is that $f'(x) = 1$ which means I'm supposed to prove $xf(x)$ equals zero. Does anybody know how to proceed in this situation? Any help would be kindly appreciated.
Observe that \begin{alignat*}{2} f'(x) &= \frac{\mathrm d}{\mathrm dx} \left( \int_0^x e^{\frac{x^2}{2} - \frac{t^2}{2}} \;\mathrm dt \right) \\ &= \frac{\mathrm d}{\mathrm dx} \left( e^{\frac{x^2}{2}} \int_0^x e^{-\frac{t^2}{2}} \;\mathrm dt\right) \\ &= \frac{\mathrm d}{\mathrm dx} \left( e^{\frac{x^2}{2}} \right) \int_0^x e^{-\frac{t^2}{2}} \;\mathrm dt + e^{\frac{x^2}{2}} \frac{\mathrm d}{\mathrm dx} \left( \int_0^x e^{-\frac{t^2}{2}} \;\mathrm dt\right) && \quad\text{by the product rule}\\ &= x e^{\frac{x^2}{2}} \int_0^x e^{-\frac{t^2}{2}} \; \mathrm dt + e^{\frac{x^2}{2}} e^{-\frac{x^2}{2}} && \quad \text{by FTC} \\ &= x f(x) + 1. \end{alignat*} Thus the required result is obtained.