Документация к Math.NET Symbolics


Polynomial.collectTermsMonomial

1: 
val coefficientMonomial: symbol : Expression -> _arg1 : Expression ->  Expression * Expression
CompiledName: CollectMonomialTerms

Описание

Собирает коэффициенты монома для переменной (symbol). Результат - кортеж из двух элементов. Первый - часть без заданного символа. Второй - сам символ.


Пример

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
let expr = "5*x*y*z" |> Infix.parseOrUndefined

expr
|> Infix.format
|> printfn "%s"

let x = symbol "x"

Polynomial.collectTermsMonomial x expr
|> fun (x,y) -> Infix.format x, Infix.format y
|> printfn "%A"

Вывод

1: 
2: 
5*x*y*z
("5*y*z", "x")