If we examine the expression $(1/2)(1 + 1/cos(x))$, we can rewrite it as:
$(1/2)[(cos(x) + 1)/cos(x)] [1 - cos(x)]/[1 - cos(x)] = (1/2)[1 - (cos(x))^2] / [cos(x)(1 - cos(x))]$;
or $(1/2)[(sin(x))^2] / [cos(x)(1 - cos(x))]$;
or $(1/2)[sin(x)/cos(x)][sin(x)/(1 - cos(x))]$;
or $(1/2)[tan(x) / tan(x/2)]$.
which gives us the functional equation $f(x) = (1/2)[tan(x) / tan(x/2)] \cdot f(x/2)$. Now let us take $f(x) = Ktan(x)$ for any real $K$ (note that it is differentiable at $x = 0$ and defined over $(-\pi/2, \pi/2)$). Substitution of this function into our FE yields:
$Ktan(x) = (1/2)[tan(x) / tan(x/2)](Ktan(x/2)]$;
or $K = K/2$;
or $K = 0$.
Hence, the solution is $f(x) = 0 \cdot tan(x)$, or simply the constant function $\fbox{f(x) = 0}$.