If $\displaystyle f:[a,b]\rightarrow R$ be a continuous on $\displaystyle [a,b]$ and differentiable on $\displaystyle (a,b),$then prove or disprove that there is some $\displaystyle c\in(a,b)$ such that

$\displaystyle
\int_a^{b}f(x)dx=f(a)(b-a)+f'(c)\frac{(b-a)^2}{2}
$

In such questions one is required to assume some function for which conditions for Rolle's or LMVT are satisfied.What I want to know is how does one find such functions