How to find this integration using Leibniz rule Given 
$\displaystyle u(x)=x-\int_0^x(x-t)(u(t))\mathrm dt$
Here is my attempt - taking derivative both sides w.r.t. $x$ we find 
$$\frac{\mathrm du}{\mathrm dx}=1-\frac{\mathrm d}{\mathrm dx}\left(\int_0^x(x-t)u(t)\mathrm dt\right)$$ which is equal to $\frac{\mathrm du}{\mathrm dx}=1$ then $u=x+c$ but this is incorrect. Please solve it.
Thank you
 A: I guess you only replaced t with x while taking derivative but there is x term in integral $u(x)= x- x \int_{0}^{x}u(t)dt + \int_{0}^{x} t u(t) dt$ take two derivative then you will get second order homegenous linear equation and general solution will be linear combination of two independent solution. So by taking derivative you introduce two unknown constant. So, You should pick proper value for those constant.You can feed general solution into original equation and try to guess the constant
A: We have  $\displaystyle u(x)=x-x\int_0^xu(t)dt+\int_0^x t u(t)dt.$
Therefore, $\displaystyle u'(x)=1-x u(x)-\int_0^xu(t)dt-x u(x),$ and $u(0)=0$.
Hence, $\displaystyle u'+2x u=1-\int_0^xu(t)dt.$
Thus, $\displaystyle u''+2xu'+3u=0,$ and $u'(0)=1, u(0)=0.$  
It is not easy to solve this problem :(!
A: $$u(x)=x-\int _0^x(x-t) u(t)dt$$
Taking Laplace Transfrom on both sides of the equation:
$$\mathcal{L}_x[u(x)](s)=\frac{1}{s^2}-\frac{\mathcal{L}_x[u(x)](s)}{s^2}$$
solving for: $\mathcal{L}_x[u(x)](s)$
We have:
$$\mathcal{L}_x[u(x)](s)=\frac{1}{s^2+1}$$
inverse:
$$u(x)=\mathcal{L}_s^{-1}\left[\frac{1}{1+s^2}\right](x)=\sin (x)$$
EDITED:
Note: The integral 

$$\int _0^x(x-t) u(t)dt$$

is the convolution of the functions $x$ and $u(t)$ and we used the fact: The same example:

$$ \mathcal{L}(f*g) = \mathcal{L}(f)\mathcal{L}(g). $$

A similar example on YouTube:
A: Compare this with this Taylor identity for twice differentiable functions
$$
u(x)=u(0)+u'(0)x+\int_0^xu''(t)(x-t)dt
$$
to identify $u(0)=0$, $u'(0)=1$, $u''(0)=-u(x)$.
