"it is `pi/2` ", some bug occured.

**Yes**, it can. The function f is contionuous on ` [0, pi ]` and is differentiable on `(0, pi )`, which are all the requirements for the Mean Value Theorem.

Therefore there is at least one point c on `(0, pi)` such that

`f'(c) = (f(pi)-f(0))/(pi-0) = (0-0)/pi = 0.`

Let's find all these points:

f'(c) = cos(c) = 0.

`c = pi/2 + k*pi` where k is integer, there is only one such point on` (0, pi)`, it is .