Solving $\int_{0}^{x}(x-t)y(t)dt = 2x+\int_{0}^{x}y(t)dt$ Solve:
$$
\int_{0}^{x}(x-t)y(t)dt = 2x + \int_{0}^{x}y(t)dt
$$

The farthest I got is to:
$$
\int_{0}^{x}(x-t)y(t)dt-\int_{0}^{x}y(t)dt = 2x
$$
Combining the integrals we get:
$$
\int_{0}^{x}y(t)(x-t-1)dt = 2x
$$
And here I’m pretty stuck.
Can someone please give me a hint?
Thanks.
 A: $$\int_{0}^{x}(x-t)y(t)dt = 2x+\int_{0}^{x}y(t)dt~~~(1)$$
$$\implies x \int_{0}^{x} y(t) dt-\int_{0}^{x} t y(t) dt=2x+\int_{0}^{x} y(t) dt$$
D.w.t.t. $x$ using Lebnitz
$$\int_{0}^{x}  y(t) dt+ x y(x)-xy(x)=2+y(x)$$
$$\implies \int_{0}^{x} y(t) dt=2+y(x) \implies y(0)=-2~~~~(2)$$
Again D.w.r.t. $x$
$$y(x)=y'(x) \implies y=C e^{x} \implies y(x)=-2e^{x}$$
A: Hint : Differentiate
$$\int_{0}^{x}(x-t)y(t)dt = 2x + \int_{0}^{x}y(t)dt$$
w.r.t. $x$. You get
$$ \int_0^x y(t) dt = 2 + y(x)$$
Defining $Y : x \mapsto \int_0^x y(t) dt$, this can be rewritten as
$$Y'(x) -Y(x) + 2 = 0$$
You can conclude by yourself !
A: Hint: This is quite easy if you split LHS as $x\int_o^{x}y(t)dt-\int_0^{x}ty(t)dt$ and differentiate the equation twice w.r.t. $x$.
Assuming only existence of the integrals involved you can say that $y(x)=-2e^{x}$ almost everywhere.
A: Let $y(x)$ be a solution of the integral equation:
$$\tag{IE} \int_{0}^{x}(x-t)\ y(t)\ \text{d}t = 2x + \int_{0}^{x} y(t)\ \text{d} t\; ;$$
hence, by definition of solution, $y \in C^0(I)$ (where $I\subseteq \mathbb{R}$ is a suitable neighbourhood of $0$) and both sides of (IE) are differentiable w.r.t. $x \in I$.
Therefore we can differentiate the equation to get:
$$\int_{0}^{x} y(t)\ \text{d}t = 2 + y(x) $$
or:
$$\tag{A} y(x) = \int_0^x y(t)\ \text{d} t - 2\; ;$$
from (A) we infer that $y(x)$ is differentiable w.r.t. $x\in I$, thus we can differentiate another time to get:
$$y^\prime (x) = y(x)\; ,$$
which is a first order ODE. If we plug $x=0$ in (A) we obtain:
$$y(0) = -2\; ,$$
therefore a solution of your (IE) also solves (locally) the first order linear Cauchy problem:
$$\tag{CP} \begin{cases} y^\prime (x) = y(x) \\ y(0) = -2 \end{cases}\; .$$
On the other hand, if we retrace the steps, we can prove that the maximal (or any local) solution of (CP) also solves (IE); therefore (IE) and (CP) are equivalent and we can solve (CP)  in order to get the solution of (IE).
Thus the unique solution of (IE) is obviously:
$$y(x) = -2\ e^x\; .$$

Let me remark that you can also assume lesser regularity on the solution $y(x)$ without changing the argument. In fact, even if you assume the weaker notion of solution, i.e. $y \in L^1(I)$, previous reasoning applies to reduce (IE) to (CP).
