For function [tex]f(x)=a\cos b\theta [/tex] we have that [tex]f(0) =4,\ f( \frac{\pi}{2} )=-4,\ f(\pi)=4[/tex]. This means that period of cosine function is π. Then from the formula for period [tex]T= \frac{2\pi}{b} [/tex] you obtain that [tex]\pi= \frac{2\pi}{b} [/tex] and b=2.
So, the function is [tex]f(x)=a\cos 2\theta[/tex]. If f(0)=4, then [tex]a\cos0=4[/tex] and, respectively, a=4.
Answer: [tex]f(x)=4\cos 2\theta[/tex].