def differentiate(self, n=1):
        """
        n-th derivative, default 1.
        """
        ak = self.coefficients()
        a_, b_ = self.domain()
        for _ in range(n):
            ak = self.differentiator(ak)
        return self.from_coeff((2./(b_-a_))**n*ak, domain=self.domain())
def differentiate ( self , n = 1 ) : ak = self . coefficients ( ) a_ , b_ = self . domain ( ) for _ in range ( n ) : ak = self . differentiator ( ak ) return self . from_coeff ( ( 2. / ( b_ - a_ ) ) ** n * ak , domain = self . domain ( ) )
n-th derivative, default 1.