Step 1: Split the integral.
We need $\displaystyle\int_0^{\pi/2}\big(f(x)+f''(x)\big)\cos x\,dx$. We will work on the $f''$ part with integration by parts.
Step 2: Integrate $f''\cos x$ by parts.
Take $u=\cos x$ and $dv=f''(x)\,dx$, so $v=f'(x)$:
\[ \int_0^{\pi/2} f''\cos x\,dx=\big[f'\cos x\big]_0^{\pi/2}+\int_0^{\pi/2} f'\sin x\,dx. \]
Step 3: Use $f'(0)=0$.
The boundary term is $0-f'(0)=0$. So this part equals $\displaystyle\int_0^{\pi/2} f'\sin x\,dx$.
Step 4: Integrate by parts again.
Take $u=\sin x$, $dv=f'\,dx$, so $v=f$:
\[ \int_0^{\pi/2} f'\sin x\,dx=\big[f\sin x\big]_0^{\pi/2}-\int_0^{\pi/2} f\cos x\,dx=f\!\left(\tfrac{\pi}{2}\right)-\int_0^{\pi/2} f\cos x\,dx. \]
Step 5: Add back the $f\cos x$ part.
The full integral is $\displaystyle\int_0^{\pi/2} f\cos x\,dx+\left(f\!\left(\tfrac{\pi}{2}\right)-\int_0^{\pi/2} f\cos x\,dx\right)$.
Step 6: Cancel.
The two integral pieces cancel, leaving $f\!\left(\tfrac{\pi}{2}\right)$.
\[ \boxed{f\!\left(\tfrac{\pi}{2}\right)} \]