Package tools.integration
Class StageOne
Object
StageOne
public class StageOne
extends Object
The
StageOne
class attempts to integrate a function using a method very similar to Stage One of the integration procedure used in SIN. Firstly,
the program performs simplifications and slight modifications to the integrand. The integrand is simplified using MiscTools.minimalSimplify(GeneralFunction)
.
If the integral is an instance of PartialDerivative
and Transformation.respectTo
is the same as the variable that is being integrated with
respect to, the program returns UnitaryFunction.operand
. Otherwise it executes the PartialDerivative
. If the integrand is a Sum
, then the
integral is distributed to each term in the Sum
and returned as a Sum
of Integral
s. The final simplification expands Sum
s to
integer Constant
powers. After these steps, a standard "derivative divides" integration technique is used. The programs check if the integrand is of the form
C*op(u(x))*u'(x)
. If the integrand matches this form, the program returns C*OP(u(x))
, where OP
is the integral of op(x) dx
.-
Method Summary
Modifier and Type Method Description static GeneralFunction
derivativeDivides(GeneralFunction integrand, String variableString)
Performs the "derivative divides" method of integration and returns the integral if the method succeeded
-
Method Details
-
derivativeDivides
public static GeneralFunction derivativeDivides(GeneralFunction integrand, String variableString) throws IntegrationFailedExceptionPerforms the "derivative divides" method of integration and returns the integral if the method succeeded- Parameters:
integrand
- TheGeneralFunction
that is being integratedvariableString
- TheVariable.varID
that the integrand is integrated with respect to- Returns:
- The integral of the function, if one is found
- Throws:
IntegrationFailedException
- if the integration did not succeed
-