modelparameters.sympy.sandbox package¶
Submodules¶
modelparameters.sympy.sandbox.indexed_integrals module¶
- class modelparameters.sympy.sandbox.indexed_integrals.IndexedIntegral(function, *limits, **assumptions)[source]¶
Bases:
Integral
Experimental class to test integration by indexed variables.
Usage is analogue to
Integral
, it simply adds awareness of integration over indices.Contraction of non-identical index symbols referring to the same
IndexedBase
is not yet supported.Examples
>>> from .indexed_integrals import IndexedIntegral >>> from .. import IndexedBase, symbols >>> A = IndexedBase('A') >>> i, j = symbols('i j', integer=True) >>> ii = IndexedIntegral(A[i], A[i]) >>> ii Integral(_A[i], _A[i]) >>> ii.doit() A[i]**2/2
If the indices are different, indexed objects are considered to be different variables:
>>> i2 = IndexedIntegral(A[j], A[i]) >>> i2 Integral(A[j], _A[i]) >>> i2.doit() A[i]*A[j]
- default_assumptions = {}¶
- doit()[source]¶
Perform the integration using any hints given.
Examples
>>> from .. import Integral >>> from ..abc import x, i >>> Integral(x**i, (i, 1, 3)).doit() Piecewise((2, Eq(log(x), 0)), (x**3/log(x) - x/log(x), True))
See also
sympy.integrals.trigonometry.trigintegrate
,sympy.integrals.risch.heurisch
,sympy.integrals.rationaltools.ratint
as_sum
Approximate the integral using a sum
- is_commutative¶
Module contents¶
Sandbox module of SymPy.
This module contains experimental code, use at your own risk!
There is no warranty that this code will still be located here in future versions of SymPy.