Safe Haskell | None |
---|---|
Language | Haskell2010 |
Derivative
Documentation
derivPol :: PolF2 -> PolF2 -> PolF2 Source #
(derivPol p v) is the derivative of the polynomial p with respect to the variable v. It's important to note that deriv only works if it applies to polynomials without exponents greater than 1. In practice, deriv will only be used with the polynomials that have been previously embeded in the quotient group described above. For example,
>>>
[x1,x2,x3,x4] = (map var ["x1","x2","x3","x4"]) :: [PolF2]
>>>
derivPol x1 x1
1>>>
derivPol (1+x1+x2+x1*x2) x1
x2+1>>>
derivPol (x1*x2+x1+x3*x4+1) x1
x2+1