Ben Woodruff wrote: > > On Dec 24, 8:13 am, Jason Grout <[email protected]> wrote: > Thanks for the reply. Here are some concerns. > >> 1. Give the assumption it wants. It mentions this in the error message >> (right above the question). > > Students in first semester calculus will not appreciate having to add > the "assume" command. It will turn them away, especially since the > assumption seem obvious (since they encounter this right after > learning how to optimize and draw functions). >
I agree. >> 2. Use nintegrate, which uses numerical integration techniques. >> >> sage: (sec(x)*tan(x)).nintegrate(x,0,pi/3) >> (0.99999999999999956, 5.3650863533076041e-12, 21, 0) >> >> ***NOTE FOR DEVELOPERS*** Why is nintegrate/nintegral not in the >> top-level commands??? >> > > I would love to see nintegrate be a top-level command. If it were at > the top level, then i would tell my students, "Any time you encounter > an error with the integrate command, just add an "n" to the front of > it and hit enter again." > > Is it simple to make nintegrate a top-level command? I would still > like to see Sage be able to utilize Maxima to integrate trig functions > without adding redundant assumptions, but having nintegrate as a top > level command would greatly help students. Having to switch from > integrate(f,x,a,b) to f.nintegrate(x,a,b) is not a simple obvious > switch for beginning students. > You can do it with: sage: nintegrate=sage.calculus.calculus.nintegrate sage: nintegrate(cos(x), x, 0, pi/2) (0.99999999999999989, 1.110223024625157e-14, 21, 0) I once wrote a patch to add nintegrate/nintegral to sage/devel/sage/misc/functional.py, which just mimicked the integral/integrate commands already in that file. I can't find it with a cursory search on trac, but I think that would be what is really needed here. > Thanks for the feedback. Should this thread be moved to the developer > group to add nintegrate as a top-level command? I've added the issue here: http://trac.sagemath.org/sage_trac/ticket/7763 Thanks, Jason -- 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-support URL: http://www.sagemath.org
