[sage-support] Re: Integration issue

2012-05-17 Thread kcrisman
> > >>> > Yes, it does. Our assumptions go through Maxima, and apparently assuming > a variable is complex does the job. > > sage: a = integrate(x*cos(x^3),(x,0,0.5)).n() > sage: assume(x,'complex') > sage: b = integrate(x*cos(x^3),(x,0,0.5)).n() > sage: assumptions() > [x is complex] > Actuall

[sage-support] Re: Integration issue

2012-05-17 Thread kcrisman
On Thursday, May 17, 2012 1:52:38 AM UTC-4, ketchers wrote: > > > > > I don't know how to get sage to understand "domain : complex" so I tried > with assume and here is what happened. Does it make sense? > > >> Yes, it does. Our assumptions go through Maxima, and apparently assuming a variabl

[sage-support] Re: Integration issue

2012-05-16 Thread ketchers
I don't know how to get sage to understand "domain : complex" so I tried with assume and here is what happened. Does it make sense? On Sunday, May 13, 2012

[sage-support] Re: Integration issue

2012-05-15 Thread Jason Grout
On 5/15/12 9:42 PM, Jason Grout wrote: Anyway, I'm not going to do anything about it in the near future, so I'll note my wish that the above had a deprecation warning and go back to grading. At the very least, we should maybe print out a message saying that we are going to assume that the hor

[sage-support] Re: Integration issue

2012-05-15 Thread Jason Grout
On 5/15/12 9:35 PM, kcrisman wrote: On Tuesday, May 15, 2012 10:27:17 PM UTC-4, Jason Grout wrote: On 5/15/12 9:17 PM, Keshav Kini wrote: > plot(x^2, (0, 1)) I definitely think that should give a deprecation warning (I think I've been advocating for that to give a deprecation

[sage-support] Re: Integration issue

2012-05-15 Thread kcrisman
On Tuesday, May 15, 2012 10:27:17 PM UTC-4, Jason Grout wrote: > > On 5/15/12 9:17 PM, Keshav Kini wrote: > > plot(x^2, (0, 1)) > > I definitely think that should give a deprecation warning (I think I've > been advocating for that to give a deprecation warning for a long time). > For exampl

[sage-support] Re: Integration issue

2012-05-15 Thread Jason Grout
On 5/15/12 9:17 PM, Keshav Kini wrote: plot(x^2, (0, 1)) I definitely think that should give a deprecation warning (I think I've been advocating for that to give a deprecation warning for a long time). For example, I think this is confusing: plot(x^2+y-x^2,(0,1)) Jason -- To post to this

[sage-support] Re: Integration issue

2012-05-15 Thread Keshav Kini
Jason Grout writes: > On 5/15/12 8:33 PM, Keshav Kini wrote: >> And maybe that's why plot3d(), unlike plot(), does >> seem to generate the deprecation warning. > > Sorry---what plot command doesn't generate a deprecation warning? For example: sage: plot(x^2, (0, 1)) sage: -Keshav

[sage-support] Re: Integration issue

2012-05-15 Thread Jason Grout
On 5/15/12 8:33 PM, Keshav Kini wrote: And maybe that's why plot3d(), unlike plot(), does seem to generate the deprecation warning. Sorry---what plot command doesn't generate a deprecation warning? Thanks, Jason -- To post to this group, send email to sage-support@googlegroups.com To unsubs

[sage-support] Re: Integration issue

2012-05-15 Thread Keshav Kini
kcrisman writes: > On Tuesday, May 15, 2012 2:36:34 AM UTC-4, Keshav Kini wrote: > Why does numerical_integral() not trigger the deprecation warning? > > The same reason that plot and integral don't, because we're not "calling" them > in the same way. It makes sense to integrate symbolic expr

[sage-support] Re: Integration issue

2012-05-15 Thread kcrisman
> > (%i3) domain:complex; > > > > (%o3) complex > > (%i4) integrate(x*cos(x^3),x,0,1/2); > > > > (%o4) > > gamma_incomplete(2/3,%i/8)/6+gamma_incomplete(2/3,-%i/8)/6-gamma(2/3)/3 > > Hmm. I get a different result. I am using the current Git version. > > Great, I didn't realize some code

[sage-support] Re: Integration issue

2012-05-15 Thread Robert Dodier
On 2012-05-15, kcrisman wrote: > (%i3) domain:complex; > > (%o3) complex > (%i4) integrate(x*cos(x^3),x,0,1/2); > > (%o4) > gamma_incomplete(2/3,%i/8)/6+gamma_incomplete(2/3,-%i/8)/6-gamma(2/3)/3 Hmm. I get a different result. I am using the current Git version. domain : complex; integrate (x*

[sage-support] Re: Integration issue

2012-05-15 Thread kcrisman
On Tuesday, May 15, 2012 2:36:34 AM UTC-4, Keshav Kini wrote: > > John H Palmieri writes: > > This works for me: > > > > sage: numerical_integral(x*cos(x^3), 0, 0.5) > > (0.1247560409610376, 1.3850702913602309e-15) > > Interesting... > > > sage: numerical_integral(x*cos(x^3), 0

[sage-support] Re: Integration issue

2012-05-15 Thread kcrisman
> > It may be "branch cut strangeness", but if so it is very strange. The > > integrand is clearly well-behaved, and the integral, > > while in terms of the incomplete gamma function, seems to be off the > usual > > branch cut (negative real axis). > > Try domain:complex before calling inte

[sage-support] Re: Integration issue

2012-05-14 Thread Keshav Kini
John H Palmieri writes: > This works for me: > > sage: numerical_integral(x*cos(x^3), 0, 0.5) > (0.1247560409610376, 1.3850702913602309e-15) Interesting... sage: numerical_integral(x*cos(x^3), 0, 0.5) (0.1247560409610376, 1.3850702913602309e-15) sage: (x*cos(x^3))(0) /op

[sage-support] Re: Integration issue

2012-05-14 Thread Robert Dodier
On 2012-05-14, JamesHDavenport wrote: > It may be "branch cut strangeness", but if so it is very strange. The > integrand is clearly well-behaved, and the integral, > while in terms of the incomplete gamma function, seems to be off the usual > branch cut (negative real axis). Try domain:comple

[sage-support] Re: Integration issue

2012-05-14 Thread JamesHDavenport
It may be "branch cut strangeness", but if so it is very strange. The integrand is clearly well-behaved, and the integral, while in terms of the incomplete gamma function, seems to be off the usual branch cut (negative real axis). On Monday, 14 May 2012 15:35:01 UTC+1, Robert Dodier wrote: > > O

[sage-support] Re: Integration issue

2012-05-14 Thread John H Palmieri
On Sunday, May 13, 2012 8:46:41 PM UTC-7, ketchers wrote: > > Sage returns negative value for the integral of a positive function > x*cos(x^3) on (0,0.5), if I use abs(cos(x^3))*x, then it gets it correct? > > This works for me: sage: numerical_integral(x*cos(x^3), 0, 0.5) (0.124756040961

[sage-support] Re: Integration issue

2012-05-14 Thread Robert Dodier
On 2012-05-14, kcrisman wrote: > This is now http://trac.sagemath.org/sage_trac/ticket/12947. We've had > some issues with incomplete gamma functions translating properly in the > past, and/or errors in Maxima, but I didn't have time to either look into > that or whether there was another tic

[sage-support] Re: Integration issue

2012-05-14 Thread kcrisman
This is now http://trac.sagemath.org/sage_trac/ticket/12947. We've had some issues with incomplete gamma functions translating properly in the past, and/or errors in Maxima, but I didn't have time to either look into that or whether there was another ticket open for this, apologies if there is