symtegration-0.4.0: Library for symbolic integration of mathematical expressions.
CopyrightCopyright 2025 Yoo Chung
LicenseApache-2.0
Maintainerdev@chungyc.org
Safe HaskellNone
LanguageGHC2021

Symtegration.Integration.Term

Description

 
Synopsis

Documentation

integrate Source #

Arguments

:: [Text -> Expression -> Maybe Expression]

Functions for directly integrating the non-constant factor.

-> Text

The variable being integrated over.

-> Expression

The expression being integrated.

-> Maybe Expression

The integral, if successful.

Integrate a single term, separating out the constant factor and applying direct integration methods to the non-constant factor.

>>> import Symtegration.Integration.Trigonometric qualified as T
>>> let f = "a" * sin "x"
>>> T.integrate "x" f
Nothing
>>> let g = integrate [T.integrate] "x" f
>>> toHaskell . simplify <$> g
Just "(-1) * a * cos x"

Assumes the expression has had algebraic ring ordering applied.