Skip navigation links

Package com.singularsys.extensions.djep

Classes to performs differentiation of equations.

See: Description

Package com.singularsys.extensions.djep Description

Classes to performs differentiation of equations.

The main class is DJep which is an extension of the main Jep class but with an additional method DJep.differentiate(Node,String) to perform the differentiation of an expression.

Typically the result of differentiation should be simplified to remove occurrences of redundant expressions (for example the derivative of x^2.0 is 2.0*x^1.0*1.0 which is simplified to 2.0*x). This can be done using the clean(Node) method.

The actual differentiation is carried out by the DifferentiationVisitor class, which repeatedly applies of the chain, product and quotient rules as well as rules for individual functions.

For each function a rule is used to specify how to differentiate it. These are added using the addDiffRule(DiffRulesI) method. For example the derivative of sin is specified using

    addDiffRule(new MacroDiffRules(Jep,"sin","cos(x)"))

There are various classes of differentiation rule which all implement DiffRulesI and have different behaviours.

Variables can also be differentiated, and the derivative of y with respect to x will be represented by the PartialDerivative dy/dx. To allow this the DVariable class is used to represent a variable and DVariableTable and DVariableFactory are used to control the look up of variables and the creation of new variables.

Sub packages

com.singularsys.extensions.djep.diffRules
Classes defining how to perform differentiation of given functions.
Since:
Jep 3.5 / Extensions 2.0
See Also:
DJep documentation
Skip navigation links

Copyright © 2018 Singular Systems http://www.singularsys.com/jep