differentiate from.first principles equation