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

Word Integrate not working as expected #82

Open
patkub opened this issue Oct 19, 2020 · 6 comments
Open

Word Integrate not working as expected #82

patkub opened this issue Oct 19, 2020 · 6 comments
Labels

Comments

@patkub
Copy link

patkub commented Oct 19, 2020

The phrase "integrate e^{x+2} from 1 to 6" works fine on wolframalpha.com, but not with the bot
https://www.wolframalpha.com/input/?i=integrate+e%5E%7Bx%2B2%7D+from+1+to+6

=wolf integrate e^{x+2} from 1 to 6

MathBot BOT Today at 10:00 PM
Wolfram|Alpha didn't send a result back.
Maybe your query was malformed?

If we remove the word integrate, the following phrase assumes integration and gives a proper result:

=wolf e^{x+2} from 1 to 6
@MoralCode
Copy link

If we remove the word integrate, the following phrase assumes integration and gives a proper result:

It seems to me like this may not be the case as the integration calculated by the command =wolf e^{x+2} from 1 to 6 is calculating arc length rather than area under the curve
Screenshot_20201020_055455

@MoralCode
Copy link

MoralCode commented Oct 20, 2020

Considering this seems to work on slightly less complicated queries (see screenshot, it seems to me like this could be either:
a) wolfram alpha limiting the maximum time to compute calculations provided via their API (i've seen this behavior/error before on the web with some more complicated queries before, dont specifically remember the formula that caused it tho), or
b) maybe mathbot is timing out too soon and telling the user that no result was returned when it hasn't given wolfram alpha time to compute it yet
Screenshot_20201020_132510

I have also tested a few variations on the syntax and it seems like all the variations I have tried fail with the "more complicated" formula, but do fine with the simpler one:
Screenshot_20201020_133246
Screenshot_20201020_132959
Screenshot_20201020_133051

@MoralCode
Copy link

in support of this theory it seems like the query =wolf solve 1-e^{-(x - 0.833)^1.847 } for x, which the web version of wolfram alpha calculates part of the way, but some part of it is exceeding the time limit.
Screenshot_20201025_164216

Trying this with mathbot doesn't return any answer at all, even the part that was successfully calculated.
Screenshot_20201025_164154

@DXsmiley
Copy link
Owner

Thanks for investigating! I've checked the Wolfram|Alpha API and it has a section about handing timeouts more gracefully, so it should be possible to fix this.

@DXsmiley
Copy link
Owner

DXsmiley commented Jan 4, 2021

I've managed to get =wolf e^{x+2} from 1 to 6 working by simply passing an argument to W|A to increase the allowed computation time, and I've pushed the change to production.

Giving solve 1-e^{-(x - 0.833)^1.847 } for x to the W|A API just produces an error, however. I'll keep looking into it.

@DXsmiley DXsmiley added the bug label Jan 4, 2021
@MoralCode
Copy link

MoralCode commented Jan 4, 2021

not sure if this makes anything more user friendly, but maybe the error message could also be edited to suggest that the error could be due to computation time rather than a malformed query (maybe by changing it to something like "Wolfram|Alpha didn't send a result back in time. Maybe your query was malformed or your query exceeded the allowed computation time. Executing this query on Wolfram alpha may help resolve the problem" (where the hyperlinked text would link to W|A's website with the users query already populated)

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

No branches or pull requests

3 participants