SolveTools
RationalCoefficients
find the rational coefficients of a linear combination
Calling Sequence
Parameters
Description
Examples
RationalCoefficients(expr, elems)
expr
-
expression; what to attempt to express as a linear combination of elems
elems
list of expressions; elements to use in the linear combination construction
The RationalCoefficients command attempts to solve the equation
−_X1⁢elems1−_X2⁢elems2−...+expr=0
with respect to _X1, _X2, ... in rational numbers. If the RationalCoefficients command is successful, a list of rational numbers such that expr is a linear combination of elems with these rational numbers as coefficients is returned; otherwise, the value FAIL is returned.
This function is part of the SolveTools package, and so it can be used in the form RationalCoefficients(..) only after executing the command with(SolveTools). However, it can always be accessed through the long form of the command by using SolveTools[RationalCoefficients](..).
with⁡SolveTools:
RationalCoefficients⁡2⁢a+3⁢b,4⁢a−b,5⁢a+3⁢b
−932,58
RationalCoefficients⁡2⁢a2+3⁢b,a,b
FAIL
RationalCoefficients⁡a,a,2⁢a
1,0
RationalCoefficients⁡12⁢a,a,2⁢a
12,0
RationalCoefficients⁡12⁢a,a2,2⁢a
0,14
See Also
Download Help Document