Integral equation/ODE I have to find all the functions $f(x)$ such that
$$f(x)=xe^{(1-x^{2})/2}-xe^{-x^{2}/2}\int_{1}^{x}t^{-2}e^{t^{2}/2}dt$$
which satisfies
$$f(x)=1-x\int_{1}^{x}f(t)dt$$
I tried to equal both, but when I derivate, the integral keeps there.
What should I do?
PS: the answer is: only the function given first satisfies the equation.
 A: The question is bizarre, one should probably solve the following:

Consider the function $f$ defined by
  $$f(x)=xe^{(1-x^{2})/2}-xe^{-x^{2}/2}\int_{1}^{x}t^{-2}e^{t^{2}/2}dt.\tag{1}$$
  Show that $f$ solves
  $$f(x)=1-x\int_{1}^{x}f(t)dt.\tag{2}$$

To show this, consider the function $g$ defined by
$$
g(x)=xe^{(1-x^{2})/2},$$ then $(1)$ is equivalent to
$$f(x)=g(x)-g(x)\int_{1}^{x}\frac{dt}{tg(t)}.\tag{3}$$
Hence, if $f$ solves $(1)$, then, differentiating $(3)$, one gets
$$
f'(x)=g'(x)-g'(x)\int_{1}^{x}\frac{dt}{tg(t)}-g(x)\frac1{xg(x)}.
$$
Using $(3)$ to identify the integral in the RHS, one gets
$$
f'(x)=g'(x)+g'(x)\frac{f(x)-g(x)}{g(x)}-\frac1{x}=\frac{g'(x)}{g(x)}f(x)-\frac1x.
$$
Identifying the function $g'/g$, this shows that every solution of $(1)$ solves
$$
f'(x)=\frac{1-x^2}{x}f(x)-\frac1x.
$$
On the other hand, $f$ solves $(2)$ if and only if $f(1)=1$ and
$$
f'(x)=-xf(x)-\int_1^xf(t)dt=-xf(x)+\frac{f(x)-1}x=\frac{1-x^2}{x}f(x)-\frac1x.
$$
Thus, $(1)\implies(2)$.
A: Here is how you advance. First equate the two equations

$$ 1-x\int_{1}^{x}f(t)dt=xe^{(1-x^{2})/2}-xe^{-x^{2}/2}\int_{1}^{x}t^{-2}e^{t^{2}/2}dt \longrightarrow (*).$$

then differentiate both sides w.r.t. $x$ and you will need the product rule for differentiation and Leibnize rule

$$ {\mathrm{d}\over \mathrm{d}x} \left( \int_{f_1(x)}^{f_2(x)} g(t) \,\mathrm{d}t \right )= g[f_2(x)] {f_2'(x)} - g[f_1(x)] {f_1'(x)} . $$

Note: To get rid of the integral which appears after differentiation on the left hand side of the equation $(*)$ you need to use the second equation which you have been given as

$$ \int_{1}^{x}f(t)dt = \frac{1-f(x)}{x} .$$ 

