Calculate higher derivatives

Calculate higher derivatives