This question arose from plotting some functions in MATLAB and GeoGebra. Assume we have a function of the form
$f(x)=A \sin(P_n(x))+d \qquad \text{or}\qquad f(x)=A \cos(P_n(x))+d$
where
$P_n(x) = \sum_{i=0}^n a_i x^i,\quad a_i \in \mathbb{R}.$
How do we show that if $f''(x)=0$, then $f(x)=A/2+d$?