On 9/13/11 3:56 PM, Rob Beezer wrote:
Chronicle of Higher Ed blog post comparing CAS on one particular
problem:
http://chronicle.com/blognetwork/castingoutnines/2011/09/13/math-monday-taking-the-fundamental-theorem-challenge/
A couple of comments:
1. Mathematica can do this:
In[5]:= Integrate[Exp[-t^3], {t, 0, x}]
Out[5]= Gamma[4/3] - ((x^3)^(2/3) Gamma[1/3, x^3])/(3 x^2)
In[6]:= % // D[#, x] &
Out[6]= E^-x^3 - (2 Gamma[1/3, x^3])/(3 (x^3)^(1/3)) + (
2 (x^3)^(2/3) Gamma[1/3, x^3])/(3 x^3)
In[7]:= % // FullSimplify
Out[7]= E^-x^3
2. Sympy can do this, even if it can't do the integral:
sage: import sympy
sage: a=sympy.sympify(exp(-t^3))
sage: a.integrate((t,0,x))
Integral(exp(-t**3), (t, 0, x))
sage: a.integrate((t,0,x)).diff(x)
exp(-x**3)
3. That is a really weird error for Sage:
sage: var('t,x')
sage: assume(x>0)
sage: integrate(e^(-t^3),(t,0,x))
1/6*(I*sqrt(3) - 1)*(gamma(1/3) - gamma(1/3, x^3))
sage: integrate(e^(-t^3),(t,0,x)).diff(x)
-1/2*(I*sqrt(3) - 1)*x^2*D[1](gamma)(1/3, x^3)
Note that this derivative apparently has a derivative of the gamma
function, with respect to the second input, evaluated at 1/3 and x^3.
Then when we try to simplify the above, we get the error:
/Users/grout/sage/local/lib/python2.6/site-packages/sage/symbolic/expression_conversions.pyc
in derivative(self, ex, operator)
493 if (not all(is_SymbolicVariable(v) for v in args) or
494 len(args) != len(set(args))):
--> 495 raise NotImplementedError, "arguments must be
distinct variables"
496
497 f = operator.function()
NotImplementedError: arguments must be distinct variables
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sage-edu" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-edu?hl=en.