You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wolfram has most likely changed their website layout since the last time this was updated as I am receiving the following error for even the simplest integrands:
sage: integrate(x**2,x,algorithm='mathematica_free')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-24-8d4613b1d0e0> in <module>()
----> 1 integrate(x**Integer(2),x,algorithm='mathematica_free')
sage-8.4/local/lib/python2.7/site-packages/sage/misc/functional.pyc in integral(x, *args, **kwds)
751 """
752 if hasattr(x, 'integral'):
--> 753 return x.integral(*args, **kwds)
754 else:
755 from sage.symbolic.ring import SR
sage-8.4/local/lib/python2.7/site-packages/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.integral (build/cythonized/sage/symbolic/expression.cpp:69368)()
12399 R = ring.SR
12400 return R(integral(f, v, a, b, **kwds))
> 12401 return integral(self, *args, **kwds)
12402
12403 integrate = integral
sage-8.4/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.pyc in integrate(expression, v, a, b, algorithm, hold)
814 if not integrator:
815 raise ValueError("Unknown algorithm: %s" % algorithm)
--> 816 return integrator(expression, v, a, b)
817 if a is None:
818 return indefinite_integral(expression, v, hold=hold)
sage-8.4/local/lib/python2.7/site-packages/sage/symbolic/integration/external.pyc in mma_free_integrator(expression, v, a, b)
95 params = urlencode({'expr': expression._mathematica_init_(), 'random': 'false'})
96 page = urlopen("http://integrals.wolfram.com/home.jsp", params).read()
---> 97 page = page[page.index('"inputForm"'):page.index('"outputForm"')]
98 page = re.sub(r"\s", "", page)
99 mexpr = re.match(r".*Integrate.*==</em><br/>(.*)</p>", page).groups()[0]
ValueError: substring not found
There seems to be a dedicated API available at https://products.wolframalpha.com/api/, but it requires login. Alternatively, the new site returns the output in JSON format, so maybe parsing it directly could be viable.
Wolfram has most likely changed their website layout since the last time this was updated as I am receiving the following error for even the simplest integrands:
There seems to be a dedicated API available at https://products.wolframalpha.com/api/, but it requires login. Alternatively, the new site returns the output in JSON format, so maybe parsing it directly could be viable.
CC: @slel @seblabbe
Component: interfaces: optional
Issue created by migration from https://trac.sagemath.org/ticket/27046
The text was updated successfully, but these errors were encountered: