Given $f$ is twice differentiable, $f(x)+f''(x)=2\cos x$ and $f(0)=f'(0)=0$, prove $$f'(x)\sin x = f(x) \cos x + \sin^2 x$$ and $$f'(x) \cos x + f(x) \sin x = x + \sin x \cos x.$$
I've tried having LHS be $g(x)$ in a blind attempt to simplify the question, but to no avail. I've been taught Rolle's Theorem, Mean Value Theorem and Intermediate Value Theorem, and I can't seem to find a way to apply these theorems. Please advise on what I should do. Thank you!