Identify concavity of functions (#907)

Identify concavity of functions (#907)