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.Substitution

Description

 
Synopsis

Documentation

integrate Source #

Arguments

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

Integration algorithms to try after substitution.

-> Text

Symbol for the variable.

-> Expression

Expression to integrate.

-> Maybe Expression

Integral, if derived.

Integrates by substitution.

Specifically, if for

\[ \int f(g(x)) h(x) \, dx\]

it is the case that \(\frac{dg(x)}{dx} = h(x)\), then compute \(\int f(v) \, dv\) and substitute with \(v=g(x)\).

>>> import Symtegration.Integration.Trigonometric qualified as Trigonometric
>>> toHaskell <$> simplify <$> integrate [Trigonometric.integrate] "x" (sin ("a" * "x" + 1))
Just "(-1) * 1 / a * cos (1 + a * x)"