A $c\in \left(0, \frac{\pi}{2}\right)$ such that $f'(c)+\int_0^c f\left(x\right)dx=f\left(\frac{\pi}{2}\right)$

Let $g(x) =\int_{0}^{x}f(t)\,dt$ and then we are supposed to show that $$g''(c) +g(c) =g' \left(\frac{\pi} {2} \right)$$ for some $c\in(0,\pi/2)$ given $g(0)=0$.

Consider $$F(x) =g(x) \cos x-g'(x) \sin x$$ so that $$F'(x) =-(g(x)+g' '(x)) \sin x$$ Now $$F(0)=0,F\left(\frac{\pi} {2} \right)=-g'\left(\frac{\pi} {2} \right)$$ and hence $$\dfrac{F\left(\dfrac{\pi} {2} \right)-F(0)}{\cos\left(\dfrac{\pi} {2} \right)-\cos 0}=-\frac{F'(c)}{\sin c} $$ for some $c\in(0,\pi/2)$ by Cauchy Mean Value Theorem. This gives us $$g'\left(\frac{\pi} {2} \right)=g(c)+g''(c)$$ as desired. You don't need $f\in C^{1} $ but just that $f$ is differentiable on $(0,\pi/2)$.