josdejong / mathjs

An extensive math library for JavaScript and Node.js
https://mathjs.org
Apache License 2.0
14.4k stars 1.24k forks source link

Implementing Integral #788

Closed ericman314 closed 3 years ago

ericman314 commented 7 years ago

To go along with the recent additions of simplify and derivative in version 3.9.0, it would be very good to begin implementing integral as well. This issue will discuss ideas on how to do this and how we would like to improve this function over time.

ericman314 commented 7 years ago

Here are some ideas to get us started:

  1. Use a lookup-table and pattern matching like we do in simplify
  2. Implement the insanely complicated Risch Algorithm
  3. Quietly forward all calls to integral to Wolfram|Alpha
josdejong commented 7 years ago

I think we should indeed start with your option (1): a relatively simple pattern matching solution.

Option (3) can definitely be interesting! I think this should be a clearly separate set of functions or a separate module which adds the API of wolfram into math.js. Maybe we could integrate the wolfram-alpha library or create an example demonstrating how you can extend math.js with the wolfram api.

cshaa commented 3 years ago

Let's continue the discussion in #1015