Questions tagged [mathdotnet-symbolics]

Math.NET Symbolics is a basic open source computer algebra library for .Net and Mono written in F#.

12 questions
6
votes
0 answers

Get REAL and IMAG from complex number in parsed equation

I am evaluating Math.NET Symbolics for use in our application where we want a simple math parser for the user to calculate custom equations from our measurement data. Our data is in the form of Complex numbers. To test I use the following…
4
votes
0 answers

How to analitacally solve system containing ">" in Math.Net Symbolics?

I need to evaluate what simplifies to: using System; using System.Collections.Generic; using MathNet.Symbolics; namespace GtEq { static class Program { private static void Main(string[] args) { var eq = Infix.ParseOrThrow("a…
DuckQueen
  • 772
  • 10
  • 62
  • 134
3
votes
1 answer

Parse Tanh in Math.NET Symbolics

Does the MathNet.Symbolics.Infix parser have a way of identifying more complicated trig functions such as tanh? I have tried the following in F# but it is not recognised (I get an undefined expression). When I replace 'tanh' with 'cos' it works just…
2
votes
1 answer

Math.net Powers of Trigonometric Functions in C#

How do I get powers of a trig function in Math.net? Expr x = Expr.Variable("x"); Expr g = (2 * x).Sinh().Pow(2); g.ToString() gives the output: (sinh(2*x))^2 What I want is sinh^2(2*x) How do I do that? Edit: As per Christoph's comment below this…
Paul Matthews
  • 2,164
  • 5
  • 20
  • 29
2
votes
0 answers

Factorising with MathNet.Symbolics in c#

I am trying to factorise: 5x+10 -> 5(x+2) Everything I have tried either fails miserably or just returns "10+5*x", or worse. public void Factorising() { var expr = "5*x+10"; var parsing = Infix.ParseOrThrow(expr); var…
kizzer
  • 150
  • 7
2
votes
1 answer

How do I calculate the sqrt in MathNet.Symbolics

I'm using the MathNet.Symbolics library to simplyfy expressions like this : string f = Infix.Print(Infix.ParseOrThrow("A+5*2")) This works as expected (f = A+10) but trying to get the root of a number is a lot harder than I expected. For example…
user4543491
2
votes
1 answer

How to set double precision in MathNet.Symbolics Evaluate function?

I have a Dictionary values and values precision is important for me. I have a string Formula that Infix can Parse. I wonder how to do something like this: var expr = Infix.ParseOrThrow(m.Formula); var result =…
DuckQueen
  • 772
  • 10
  • 62
  • 134
1
vote
0 answers

Is it possible to parse min and max functions?

As per title, is it possible to parse and evaluate the min and max functions? As example: Expression e = Infix.ParseOrThrow("min(L,B)"); It throws:
Michele mpp Marostica
  • 2,445
  • 4
  • 29
  • 45
1
vote
2 answers

MathNet.Symbolics Algebraic.Expand in descending order?

With MathNet.Symbolics library, I try to print a polynomial with a descending power order: using mse = MathNet.Symbolics.Expression; using MathNet.Symbolics; public void Symbolics() { var x1 = 2; var y2 = 3; var x2 = 4; //…
kizzer
  • 150
  • 7
1
vote
0 answers

In Math.NET Symbolics, ArcCos function with SymbolicExpression

I'm doing part of my A-Level college project in VB.NET and am using the Math.NET Symbolics package. I have MathNet.Symbolics.SymbolicExpresssion imported as Expr. I have variables defined as type Expr (SymbolicExpression) and I want to conduct an…
Cheesecake
  • 35
  • 1
  • 5
1
vote
0 answers

Implicit multiplication with Math.NET Infixes

Is there a way to force Infix.ParseOrThrow and related functions from the Math.NET Symbolics library to allow equations such as "4x + 3" instead of requiring the input to be "4*x + 3"?
user7706068
1
vote
1 answer

Where is MathML in MathNet.Symbolics for c#?

Here it is for F#; Here it is in UnitTests. So it shall be at least in F# distribution thus in .net dll. And yet it does not show itself in Assembly Explorer How to use MathNet.Symbolics MathML classes in CSharp?
DuckQueen
  • 772
  • 10
  • 62
  • 134