com.phasmidsoftware.number.expression.algebraic
Members list
Type members
Classlikes
The Equation trait represents a mathematical equation that may have multiple solutions or branches. It provides methods for determining the number of branches and for solving the equation on a specified branch. This type of equation is typically of the form P(x) = 0 where P(x) is a monic polynomial in x and where the coefficients Pi (i.e., the ith coefficient of P) are Rational numbers.
The Equation trait represents a mathematical equation that may have multiple solutions or branches. It provides methods for determining the number of branches and for solving the equation on a specified branch. This type of equation is typically of the form P(x) = 0 where P(x) is a monic polynomial in x and where the coefficients Pi (i.e., the ith coefficient of P) are Rational numbers.
Attributes
- Supertypes
- Known subtypes
-
class LinearEquationclass QuadraticEquation
Represents a linear equation of the form x + r = 0 where r is a rational number. The slope of the line representing the equation is one, therefore the intercepts are: x = -r when y = 0 (the solution/root); and y = r when x = 0. This class provides various operations and transformations specific to linear equations.
Represents a linear equation of the form x + r = 0 where r is a rational number. The slope of the line representing the equation is one, therefore the intercepts are: x = -r when y = 0 (the solution/root); and y = r when x = 0. This class provides various operations and transformations specific to linear equations.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Equationtrait Renderabletrait Branched[Expression]class Objecttrait Matchableclass AnyShow all
The Quadratic object provides commonly used quadratic equations and utility methods related to them.
The Quadratic object provides commonly used quadratic equations and utility methods related to them.
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
QuadraticEquation.type
Represents a (monic) equation of the form x² + p*x + q = 0, where p and q are rational coefficients. A graph of this equation appears as follows: an upright parabola (where p and q are both positive and (½p)⋏2 > q):
Represents a (monic) equation of the form x² + p*x + q = 0, where p and q are rational coefficients. A graph of this equation appears as follows: an upright parabola (where p and q are both positive and (½p)⋏2 > q):
x | x
x | x
x | x
x > ½p < x
-------------x----------+---|-------x------------------ v
x | x q
- - - - - - - - - - - - x - + - - - - - - - - - - - - - ⋏
|
The roots of the equation (if such exist) are at -w ± √(w∧2-q) where w = ½p For more information regarding quadratic equations, see: https://en.wikipedia.org/wiki/Quadratic_equation
Value parameters
- p
-
the coefficient of the linear term (
x). - q
-
the constant term of the equation.
Attributes
- Constructor
-
Creates an instance of the equation with coefficients
pandq. - Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Equationtrait Renderabletrait Branched[Expression]class Objecttrait Matchableclass AnyShow all