Solving an ODE with an integral Let $x$ be a twice differentiable equation. Suppose that the function $x$ satisfies the following integral equation:
$x(t)$ + $\displaystyle\int_{0}^{t} \frac{x(s)}{s + 1}\ ds= t+2$
Find the function $x$.
I tried finding the integral above by using integration by parts and differentiating $x(s)$ twice but it got really out of hand.
EDIT: Got it thanks to comments. 

Differentiating $\displaystyle\int_{0}^{t} \frac{x(s)}{s + 1}\ ds$ with respect to $t$:
$ \displaystyle\frac{d}{dt}\ (\displaystyle\int_{0}^{t} \frac{x(s)}{s + 1}\ ds) =$ $(\displaystyle\frac{x(t)}{t+1})' - (\displaystyle\frac{x(0)}{0+1})'$ = $\displaystyle\frac{x(t)}{t+1}$
Differentiating $x(t)$ + $\displaystyle\int_{0}^{t} \frac{x(s)}{s + 1}\ ds= t+2$ with respect to $t$:
$x'(t) + \displaystyle\frac{x(t)}{t+1} = 1$
Multiplying by $t + 1$ throughout:
$(t +1)x'(t) + x(t) = t+1$
Solving the linear 1st-order ODE:
$(t+1)x(t) = \displaystyle\frac{t^2}{2} + t + C$
$x(t) = \displaystyle\frac{t^2}{2(t+1)} + \displaystyle\frac{t}{t+1} + \displaystyle\frac{C}{t+1}$
