Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuse this with Mathjs? #1

Open
peq42 opened this issue Jul 3, 2018 · 10 comments
Open

Fuse this with Mathjs? #1

peq42 opened this issue Jul 3, 2018 · 10 comments

Comments

@peq42
Copy link

peq42 commented Jul 3, 2018

Why not make this extension a part of mathjs(since integrals are really important/used nowadays)?

@JasonShin
Copy link

+1

@peq42
Copy link
Author

peq42 commented Jan 27, 2019

@joelhoover So, its been over a year this extension has been made. Are there any expectations for when will it be part of the default lib?

Integrals are REALLY important....

@harrysarson
Copy link

@elpeleq42 This library contains some really nice work on evaluating integrals symbolicly, however evaluating integrals is "REALLY" hard - much harder than differentiation for example - and more work is needed for mathjs is able to make integral evaluation part of the default library.

Efforts like this library represent steps in that direction but we are all working on these projects in our spare time. If you want to help contribute then that would be very much appreciated (coding a solution to issue #1 would be a decent place to start).

In the meantime there are many tools for symbolic integration and you will have to make to with one of them 🙂

@BenjaminLeonhardt
Copy link

Hi everybody. the last comment on this topic is more than a year ago. I want to ask what is the current status for that.
I'm writing at the moment a graphic calculator in JS and HTML it would be awesome to have that feature on my page.

The next thing is that i got problems to integrade the beta of the mathjs-simple-integral on my page. Because math.import(require('mathjs-simple-integral')); does not work in a browser. That only works in node.js...

Is there a workaround or some trick to get that work?

@m93a
Copy link

m93a commented Jul 19, 2020

@BenjaminLeonhardt You can check the commit history of this repo to see that, indeed not much happened here in past two years. If you want to use mathjs-simple-integral with the current version of mathjs, I recommend that you check out PR #4.

Also, most web applications nowadays use modules. You can use require(...) in your code and then package it into a single javascript file using webpack or similar software.

@BenjaminLeonhardt
Copy link

@m93a Thank you for your fast response. I got mathjs-simple-integral now up an running :)

But I saw a problem with mathjs-simple-integral an mathJS version >7. In my project mathjs-simple-integral is only running with mathJS <7 so it is now running with 6.6.5.

I can reproduce the problem all time. I think at verision 7 is a breaking change. The error that I get says: "Error: Cannot import "factory": already exists" and it points an line 60981 in the file math.js

@m93a
Copy link

m93a commented Jul 21, 2020

Have you tried using the version from PR #4? @JThobbyist claims their PR works with mathjs v7. If you're unable to get the PR working with mathjs v7, I recommend that you ask in the PR's comment section, since JT is probably the one most experienced person when it comes to running mathjs-simple-integral with mathjs v7 😉️

@JThobbyist
Copy link

@BenjaminLeonhardt there’s probably an elegant way to switch the integral.js file in the mathjs-simple-integral package in your node_modules directory, but the fastest way to use the integral.js file that I patched for mathjs 7+ is to just put the actual integral.js file in the same folder as your project and use it as described in the example in the PR. If you do it the fast way, make sure to include the [[]] brackets as shown in the example, because that’s part of the format that mathjs expects.

Mathjs did make breaking changes somewhere in version 6: it’s been a minute since I looked at the code, but I remember they changed the way that they import modules (something with factory functions), and so my patch was just a wrapper to format this into the new format that mathjs now expects.

@ghost
Copy link

ghost commented Jun 25, 2022

@BenjaminLeonhardt there’s probably an elegant way to switch the integral.js file in the mathjs-simple-integral package in your node_modules directory, but the fastest way to use the integral.js file that I patched for mathjs 7+ is to just put the actual integral.js file in the same folder as your project and use it as described in the example in the PR. If you do it the fast way, make sure to include the [[]] brackets as shown in the example, because that’s part of the format that mathjs expects.

Mathjs did make breaking changes somewhere in version 6: it’s been a minute since I looked at the code, but I remember they changed the way that they import modules (something with factory functions), and so my patch was just a wrapper to format this into the new format that mathjs now expects.

I know it’s been two years (lol), but if you still have it, could you send the working version here? Thanks in advance.

@JThobbyist
Copy link

@supernova350 see my fork, it works with mathjs 7+ last time I checked.

JThobbyist@c86a693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants