Let a > 1 and f,g: [-a,a] $\rightarrow$ R be twice differentiable functions such that for some c with 0 < c < 1 < a,
f(x) = 0 only for x=-a, 0, a
f$'$(x) = 0 = g(x) only x = -1, 0, 1
g$'$(x) = 0 only for x = -c, c
Then which relation between f and g is possible:$$ f = g' \ or \ f' = g \ or \ f = -g' $$
With Rolle we get
$f'(1)=f'(-1)=0$ and $g'(c)=g'(-c)=0.$
Hence $f = g'$ or $ f = -g'$ is not possible.