$f$ is having maxima at $\frac12$ show that $f\circ f$ is having minima at $\frac12$. $f:[0,1]\to [0,1]$
$f(0)=0=f(1)$
$f$ is having local maxima at $x=\frac12$.
Show that $f\circ f(x)$  is having local minima at $x=\frac12$.
Using chain rule I was only able to find that $(f\circ f)'(\frac12)=0$
Now it is sure that at $x=\frac12$ we have either maxima or minima. How to show that $f\circ f(x)$ at $x=\frac12$ is a point of minima?
 A: Assume $f$ is differentiable in [0,1].
For a local extremum: $\\  (f\circ f)'(x)= f'[f(x)] \times f'(x) = 0$.
$f'(x) = 0$, at $x = 1/2$, since $f(x),$ has  local maximum, it follows that  $f[f(x)]$ has a local extremum.
Consider the 2nd derivative of $f[f(x)]$ at this point.
($\star ) \ (f\circ f)''(x) = \\  f''[f(x))] \times [ f'(x) ]^2 \\ + f'[f(x)]\times f''(x)$
At $x = 1/2$ the first term on the right hand side is zero. 
If $f''(1/2)$ is $ < 0$, the sign of $f'[f(1/2)] $ determines the nature of the extremum, assuming $f'[f(1/2)] \neq 0$. 
Let's look at Neretin's suggestion:
$y = x(1-x)$ is differentiable with $y(0)=0$ and $y(1)=0$, and a maximum at $x = 1/2$, easily seen by rewriting 
$y = x(1-x) = - (x -1/2)^2  + 1/4$. 
This is a parabola opening downward with max $= 1/4$, at the point $x= 1/2$.
Derivatives : 
$1) y'(x= 1/2) = 0,$ 
$2) y''(x = 1/2) = -2 .$
The second derivative of the function $f[f(x)]$ in the interval is given by ($\star$) .
At $x= 1/2$ : 
$$(f\circ f)''(1/2)] = \\ f'[f(1/2)]\times f''(1/2),$$
where $f''(1/2)  < 0$.
For our example $\\ f(1/2) = 1/4,$ the maximum, so
$$f'[f(1/2)] = f'(1/4) = \\ 1 - 2(1/4) = 1/2, $$
hence  $f''[f(x = 1/2)]  < 0$, 
I.e. a MAXIMUM  (!)
