| Copyright | Copyright 2024 Yoo Chung |
|---|---|
| License | Apache-2.0 |
| Maintainer | dev@chungyc.org |
| Safe Haskell | Safe-Inferred |
| Language | GHC2021 |
Symtegration.Integration.Powers
Description
Synopsis
- integrate :: Text -> Expression -> Maybe Expression
Documentation
integrate :: Text -> Expression -> Maybe Expression Source #
Integrates powers of a variable. In other words, expressions of the form \(x^c\), where \(c\) is a constant.
>>>toHaskell . simplify <$> integrate "x" "x"Just "1 / 2 * x ** 2">>>toHaskell . simplify <$> integrate "x" ("x" ** (1/2))Just "(2 * x ** (3 / 2)) / 3">>>toHaskell . simplify <$> integrate "x" ("x" ** (-1))Just "log x"