Consider a continuous and differentiable function $f(x)$ such that $$f(x)=x+\int_0^{\frac {\pi}{2}} \sin (x+y)f(y) dy$$ where $x, y$ are independent variables. Find $f(x)$
My try:
Differentiating both sides of given equation with respect to $x$ we get $$f'(x)=1+\int_0^{\frac {\pi}{2}} \cos(x+y) f(y) dy$$
Now we get $$f'(\frac {\pi}{2} +x)=1-\int_0^{\frac {\pi}{2}} \sin (x+y) f(y) dy$$
Hence we get $$f'(\frac {\pi}{2}+x)=1-f(x)-x$$
But am not able continue further from here. Any help would be greatly appreciated.
From $$f'(x)=1+\int_0^{\frac {\pi}{2}} \cos(x+y) f(y)\,dy$$
we see that $f'$ is also differentiable and that
$$f''(x) = -\int_0^{\frac {\pi}{2}} \sin(x+y) f(y) dy = -f(x) + x$$
We obtain the simple differential equation
$$f''(x) + f(x) = x$$
giving $f(x) = A\sin x + B\cos x + x$ for some constants $A,B \in \mathbb{R}$.