Solve $y = 2 + \int^x_2 [t - ty(t) \,\, dt]$ While working on some differential equation problems, I got one of the following problems: 
$$y = 2 + \int^x_2 [t - ty(t) \,\, dt]$$
I have no idea what an integral equation is however, the hint give was "Use an initial condition obtained from the integral equation".
I don't fully understand the hint because if I try to evaluate the integral then I have the following:
\begin{align}
y &= 2 + \int^x_2 [t - t\cdot y(t) \,\, dt] \\
y &= 2 + \int^x_2 t \,\, dt - \int^x_2 t\cdot y(t) \,\, dt \\
y &= 2 + \left[\frac{t^2}{2}\right]^x_2 - \underbrace{\int^x_2 t\cdot y(t) \,\, dt}_{\text{Problematic}}
\end{align}
How do I actually go about solving this problem? Further hints would be greatly appreciated.
P.S. I have one or two ideas


*

*Assume $y(t)$ is a constant - I tried working this out, it doesn't look promising

*Use the Fundamental Theorem of Calclus Part 1 


$$\implies \frac{dy}{dt} = \frac{dy}{dt}\cdot 2 + \frac{dy}{dt} \int^x_2 [t - t\cdot y(t) \,\, dt]$$
 A: $y$ is a function of $x$ and not $t$ so from your first equation you have
$$\begin{cases} \cfrac{dy}{dx}=x-xy(x)\\ y(2)=2\end{cases}$$
so$$\begin{cases} \cfrac{dy}{1-y}=xdx\\ y(2)=2\end{cases}$$
You should be able to finish.
A: Having $y$ differentiable, one have that $y'(x) = (1-y(x))x$. So $y'(x)/(y(x)-1) = -x$, integrating from both sides one obtain $\ln(y(x)-1) = -x^2/2+c$. So 
$$
y(x) = 1+e^{\frac{-x^2}{2}+c}
$$
where $c=2$.
A: $$y = 2 + \int^x_2 [t - ty(t) \,\, dt]$$ will be a function of $x$ after the integration. Differentiating both sides, we will get$$ \frac{dy}{dx}=x-xy(x)$$(This is Newton-leibnitz rule). Also you have $y(2)=2$
A: Repeating almost what other participants said, the fundamental theorem of calculus gives $$\frac {d}{dx}\Big(\int^x_2 [t - ty(t)] \,\, dt\Big)=x-x y(x)$$ So, starting from $$y(x) = 2 + \int^x_2 [t - ty(t)] \,\, dt$$ and differentiating both sides leads to $$y'(x)=x -xy(x)$$ the initial condition being $y(2)=2$. The differential equation is separable and, as given in other answers, the solution is $$y(x)=1+e^{2-\frac{x^2}{2}}$$
