MathParser.org-mXparser icon indicating copy to clipboard operation
MathParser.org-mXparser copied to clipboard

return derivative's result as string

Open dyako-baram opened this issue 2 years ago • 0 comments

end goal:

i want to be able to do derivative until I get a single number for example: fx= x^3 + x^2 - 3x -3 fx'=3x^2 +2x-3 fx''=6x-2 fx'''=6

question:

  • MathParser.org-mXparser version: v.5.2.1
  • Framework: .net, .net core, .net standard

How do I achieve what I want to do?

here is a pseudo-code for what I mean:

Expression ex = new Expression("der(x^3 + x^2 - 3x -3 ,x)");
string result=ex.GetDerivativeAsString(); // 3x^2 +2x-3

or

Expression ex = new Expression("der(x^3 + x^2 - 3x -3 ,x)");
string[] resultArray= ex.GetDerivativesAsStringArray();// ["x^3 + x^2 - 3x -3 ","3x^2 +2x-3","6x-2","6"]

dyako-baram avatar May 03 '23 11:05 dyako-baram