What is the solution for $u(x)=x+\int_0^x (t-x)u(t)dt$ So I am studying for the GRE right now and came across the problem from one of the UCLA's workshops online. 
The problem is stated as,
Which of the following is the solution of
$u(x)=x+\int_0^x (t-x)u(t)dt$
(a) $\sin(x)$
(b) $x\cos(x)$
(c) $\ln(1+x)$
(d) $xe^{-x}$
(e) $xe^x$
The answer is (a). My intial appraoch was to take derivatives of both sides, apply FTC and then solve the DE. But my problem is that I am not sure how to take the derivative of the integral since it contains an $x$ term in it. Can someone work out the problem, or offer a hint? Thanks in advanced.
 A: You are on the right track. Recall that if
$$g(x) = \int_{a(x)}^{b(x)} f(x,t)dt$$ then we have
$$\dfrac{dg}{dx} = \int_{a(x)}^{b(x)} \dfrac{\partial f(x,t)}{\partial x}dt + f(x,a(x)) \dfrac{da(x)}{dx} - f(x,b(x)) \dfrac{db(x)}{dx}$$
Hope you can finish it off now.

In your problem, we get that$$u'(x) = 1 + \int_0^x (-u(t)) dt + (x-x) \times u(x) \times  1 - (0-x) \times u(0) \times 0$$This gives us$$u'(x) = 1 - \int_0^x u(t) dt$$Differentiate again to get$$u''(x) = -u(x)$$Hence,$$u(x) = a \cos(x) + b \sin(x)$$Now we will figure out $a$ and $b$. We have $u'(x) = 1 - \int_0^x u(t) dt$. Hence,\begin{align}-a \sin(x) + b \cos(x) & = 1 - (a \sin(t) - b \cos(t))_0^x\\& = 1 - ((a \sin(x) - b \cos(x)) - (0-b))\\& = 1 - (a \sin(x) - b \cos(x) + b)\\& = (1-b) - a \sin(x) + b \cos(x)\end{align}This gives us $b=1$. Hence, $u(x) = a \cos(x) + \sin(x)$. Now plug this into the original equation to determine $a$.

A: Hint : 
$$\int_0^x (t-x)u(t)\text{d}t = \int_0^x tu(t)\text{d}t-\int_0^x xu(t)\text{d}t= \int_0^x tu(t)\text{d}t-x\int_0^x u(t)\text{d}t $$
and then differentiate.
A: Another way : 
$$ u(x) = x - \int_0^x (x-t)u(t) \ dt $$
By convolution theorem we can write : 
$$ u(x) = x - u(x)*x $$
By taking Laplace transform of both sides 
$$ U(s)= \frac{1}{s^2} - \frac{U(s)}{s^2} \Rightarrow U(s) = \frac{1}{s^2 + 1} $$
$$ \Rightarrow u(x) = \mathscr{L}^{-1} \left \{ \frac{1}{s^2 + 1} \right\} = \sin x $$
Note that : $$  \mathscr{L} \left\{ (f*g)(x) \right\}  = \mathscr{L} \{ f(x) \} \mathscr{L} \{g(x) \} $$ 
$$ (f*g)(x) = \int_0^x f(x)g(x-t) \ dt $$
