equations library

The equations package helps you with:

  • solving polynomial equations and inequalities;
  • solve nonlinear equations;
  • solve linear systems of equations.

In addition, you can also find utilities to work with:

  • real and complex matrices;
  • complex numbers;
  • integral evaluation;
  • data interpolation.

Classes

AdaptiveQuadrature
The "Adaptive quadrature" is a technique for approximating the value of a definite integral that automatically adjusts the step size based on the local behavior of the function being integrated.
Algebraic
An abstract class that represents an algebraic equation, also known as a polynomial equation, which has a single variable and a maximum degree.
AlgebraicInequalityAllRealNumbers
A solution of an Algebraic inequality that includes all real numbers.
AlgebraicInequalityGreaterThan
A solution of an Algebraic inequality that is greater than value.
AlgebraicInequalityInterval
A solution of an Algebraic inequality that is an interval between start and end values.
AlgebraicInequalitySmallerThan
A solution of an Algebraic inequality that is smaller than value.
AlgebraicInequalitySolution
A solution of an Algebraic inequality.
Bisection
Implements the bisection method to find a root of a given equation.
Brent
Implements Brent's method to find the roots of a given equation.
CholeskySolver
Solves a system of linear equations using the Cholesky decomposition method.
Chords
Implements the 'chords' method to find the roots of a given equation.
Complex
A Dart representation of a complex number in the form a + bi where a is the real part and bi is the imaginary (or complex) part.
ComplexMatrix
A simple Dart implementation of an m x n matrix whose data type is Complex.
Constant
Concrete implementation of Algebraic that represents a constant value a. It can be either a real or complex number, such as:
Cubic
Concrete implementation of Algebraic that represents a third degree polynomial equation in the form ax^3 + bx^2 + cx + d = 0.
ExpressionParser
Parses mathematical expressions with real numbers and the x variable (if any). The only allowed variable name is x: any other type of value isn't recognized. Some expressions examples are:
Fraction
Dart representation of a fraction having both numerator and denominator as integers. If the denominator is zero, a FractionException object is thrown.
GaussianElimination
Solves a system of linear equations using the Gaussian elimination algorithm, also known as row reduction.
GaussSeidelSolver
Solves a system of linear equations using the Gauss-Seidel iterative method.
GenericAlgebraic
Concrete implementation of Algebraic that approximates all roots of a polynomial of any degree.
Interpolation
An abstract class that represents an interpolation strategy, used to find new data points based on a given discrete set of data points (called nodes). The available interpolation algorithms are:
InterpolationNode
A point in the cartesian coordinate system used by Interpolation types to represent interpolation nodes. This class simply represents the x and y coordinates of a point on a cartesian plane.
IntervalsIntegration
This class is extended by classes whose algorithms divide the integration bounds into smaller intervals to compute the result. There are currently three subclasses of IntervalsIntegration:
JacobiSolver
Solves a system of linear equations using the Jacobi iterative method. The given input matrix, representing the system of linear equations, must be square.
Linear
Concrete implementation of Algebraic that represents a first degree polynomial equation in the form ax + b = 0.
LinearInterpolation
Linear interpolation is a curve fitting method that uses linear polynomials to construct new data points within the range of a discrete set of known data points.
LUSolver
Solves a system of linear equations using the LU decomposition method.
Matrix<T>
A matrix with rowCount rows and columnCount columns. This abstract type allows the implementation of different types of matrices, each with their own specific methods and types. This library implements:
MidpointRule
The midpoint rule is a numerical integration technique for approximating definite integrals using Riemann sums. Given a definite integral in the form ∫[a,b] f(x) dx, the midpoint rule approximates it as:
MixedFraction
Dart representation of a 'mixed fraction', which is made up by the whole part and a proper fraction. A proper fraction is a fraction in which the relation numerator <= denominator is true.
Newton
Implements Newton's method (also known as the Newton-Raphson method) to find the roots of a given equation.
NewtonInterpolation
Newton interpolation (also known as Newton's divided difference interpolation) is a polynomial interpolation method that constructs an interpolation polynomial for a given set of data points using divided differences.
NonLinear
An abstract class that represents a nonlinear equation, which can be solved with a particular root-finding algorithm. No complex numbers are allowed.
NumericalIntegration
When it comes to analysis, the term numerical integration indicates a group of algorithms for calculating the numerical value of a definite integral on an interval.
PolarComplex
A wrapper class, returned by a Complex object, that represents a complex number in polar coordinates.
PolynomialInterpolation
Polynomial interpolation using Lagrange's interpolation formula to find the unique polynomial of degree n-1 that passes through n given data points.
PolynomialLongDivision
Implements the polynomial long division algorithm, which divides one polynomial by another polynomial.
Quadratic
Concrete implementation of Algebraic that represents a second degree polynomial equation in the form ax^2 + bx + c = 0.
Quartic
Concrete implementation of Algebraic that represents a fourth degree polynomial equation in the form ax^4 + bx^3 + cx^2 + dx + e = 0.
Rational
Dart representation of a rational number.
RealMatrix
A Dart implementation of an MxM matrix whose data type is double.
RegulaFalsi
Implements the regula falsi method (also known as the "false position method") to find the roots of a given equation.
Riddler
Implements Riddler's method (also known as the Ridders' method) to find the roots of a given equation.
Secant
Implements the secant method to find the roots of a given equation. It is similar to Newton's method but does not require the computation of derivatives.
SimpsonRule
Simpson's Rule is a numerical integration technique that approximates the value of a definite integral using quadratic polynomials. Given a definite integral in the form ∫[a,b] f(x) dx, Simpson's rule approximates it as:
SORSolver
Solves a system of linear equations using the Successive Over-Relaxation (SOR) iterative method.
SplineInterpolation
Performs spline interpolation given a set of control points. The algorithm can compute a "monotone cubic spline" or a "linear spline" based on the properties of the control points.
Steffensen
Implements Steffensen's method to find the roots of a given equation.
SylvesterMatrix
The Sylvester matrix is used to compute the discriminant of a polynomial of any degree.
SystemSolver
An abstract class that represents a system of equations, which can be solved using various algorithms that manipulate the data of a matrix and a vector.
TrapezoidalRule
The trapezoidal rule is a numerical integration technique for approximating definite integrals using linear interpolation. Given a definite integral in the form ∫[a,b] f(x) dx, the trapezoidal rule approximates it as:

Enums

AlgebraicInequalityType
The kind of Algebraic inequality to solve.

Extensions

ExpressionParserX on String
Extension method for ExpressionParser on String types.
FractionNum on num
Extension method that adds Fraction functionalities to num.
FractionString on String
Extension method that adds Fraction functionalities to String.
MixedFractionNum on num
Extension method that adds MixedFraction functionalities to num.
MixedFractionString on String
Extension method that adds MixedFraction functionalities to String.

Typedefs

AlgebraicDivision = ({Algebraic quotient, Algebraic remainder})
A record type that holds the quotient and the remainder of a division between two polynomials. When you use operator/ on two Algebraic objects, this type is returned. The quotient represents the result of the division, while the remainder represents what's left after the division.

Exceptions / Errors

AlgebraicException
Exception object thrown by Algebraic.
ComplexException
Exception object thrown by Complex.
EquationException
Base class for exception objects in the equations package.
ExpressionParserException
Exception object thrown by ExpressionParser.
FractionException
Exception object thrown by a Fraction object.
InterpolationException
Exception object thrown by Interpolation.
MatrixException
Exception object thrown by Matrix.
MixedFractionException
Exception object thrown by a MixedFraction object.
NonlinearException
Exception object thrown by NonLinear.
PolynomialLongDivisionException
Exception object thrown by PolynomialLongDivision.
SystemSolverException
Exception object thrown by SystemSolver.