How To Solve An Integral Equation Our professor posted an integral equation for us to solve. It is
$$f(x) = a - \int^x_b (x-t)f(t)dt$$
Where $a$ and $b$ are constants. This was in the context of using Leibnitz's rule, so I attempted to take the derivative.
$$f'(x) = -\int_b^xf(t)dt$$
If $F'(x) = f(x)$ then
$$F''(x) = F(b)-F(x)$$
Therefore it follows that
$$F(x)=A\sin(x+\phi) + F(b)$$
$$f(x) = A\cos(x+\phi)$$
However, when I subbed $f(x)$ back into the integral equation to verify it, (also attempting to solve for $A$ and $\phi$ in terms of a and b) it wasn't true. Can anyone help?
 A: For the case of $b=0$ a simple use of the Laplace transform can be made. 
Using the Laplace transform, with notation $f(t) \doteqdot f(s)$, then
\begin{align}
t &\doteqdot \frac{1}{s^2} \\
1 &\doteqdot \frac{1}{s} \\
\int_{0}^{t} (t-u) \, f(u) &\doteqdot \mathcal{L}(t \, f(t)) = \frac{f(s)}{s^2}
\end{align}
and
$$ f(t) = a - \int_{0}^{t} (t-u) \, f(u) \, du$$
becomes
\begin{align}
f(s) &= \frac{a}{s} - \frac{f(s)}{s^2} \\
f(s) &= \frac{a \, s}{s^2 + 1}.
\end{align}
Inverting this result yields
$$f(t) = a \, \cos(t).$$
For general $b$ value then it is better to use a differential approach. The equation in question can be see as
$$f(t) = a - \int_{b}^{t} \int_{b}^{u} f(y) \, dy \, du$$
and leads to the condition $f(b) = a$ and first derivative being
$$f'(t) = - \int_{b}^{t} f(y) \, dy.$$
In a similar manor this provides $f'(b) = 0$ and another derivative yields
$$f'' + f = 0.$$
It is now evident that $f(t) = A \, \cos(t) + B \, \sin(t)$ with
\begin{align}
f(t) &= A \, \cos(t) + B \, \sin(t) \\
f(b) &= a = A \, \cos(b) + B \, \sin(b) \\
f'(b) &= 0 = - A \, \sin(b) + B \, \cos(b).
\end{align}
Solving for $A$ and $B$ provide $A = a \, \cos(b)$ and $B = a \, \sin(b)$ for which the solution becomes
$$f(t) = a \, \cos(t-b).$$
