Identify concavity of functions (#907)