Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread William Stein
On Tue, Jun 7, 2016 at 4:12 AM, Ralf Stephan wrote: > In an SMC terminal session: > > ~$ sage > ┌┐ > │ SageMath Version 6.10, Release Date: 2015-12-18│ > │ Enhanced for SageMathCloud.

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Peter Luschny
> > > on SMC terminal > > $ sage-develop > > > > gives you 7.3.beta2 > > Now how can I use this kernel in my yupyter notebook? > Ahh, it's there also! Is this new? Anyway thanks for this hint! > This was perhaps not a good idea. It's been long since I got so many ugly error messages. /pro

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Peter Luschny
> on SMC terminal > $ sage-develop > > gives you 7.3.beta2 Now how can I use this kernel in my yupyter notebook? Ahh, it's there also! Is this new? Anyway thanks for this hint! Peter -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscri

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Dima Pasechnik
on SMC terminal $ sage-develop gives you 7.3.beta2 On Tuesday, June 7, 2016 at 9:12:19 AM UTC+1, Ralf Stephan wrote: > > In an SMC terminal session: > > ~$ sage > ┌┐ > │ SageMath Version 6.10, Release Date: 2015-12-18

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Ralf Stephan
In an SMC terminal session: ~$ sage ┌┐ │ SageMath Version 6.10, Release Date: 2015-12-18│ │ Enhanced for SageMathCloud.│ └

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-07 Thread Peter Luschny
> Your Sage is too old, this Pynac bug (existing for years) was fixed > months ago and should be in 7.2. Thanks Ralf! As I said I work on SMC. So I have to wait until William updates the cloud. Peter -- You received this message because you are subscribed to the Google Groups "sage-support" g

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-06 Thread Ralf Stephan
On Friday, June 3, 2016 at 9:45:02 AM UTC+2, Peter Luschny wrote: > > plot([tanh(exp(i*t)).real(), > (exp(exp(i*t))/cosh(exp(i*t))-1).real()],t,0,2*pi) > The two functions are identical, the plot shows different functions. > Your Sage is too old, this Pynac bug (existing for years) was fixed mo

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-03 Thread kcrisman
> > > > Thanks Robert, yes, I suspected the numerical integration > prematurely. A plot clearly shows that the culprit are the > real parts of the hyperbolic functions. > > plot([tanh(exp(i*t)).real(), > (exp(exp(i*t))/cosh(exp(i*t))-1).real()],t,0,2*pi) > The two functions are identical, the

Re: [sage-support] Re: Possible bug in numerical integration

2016-06-03 Thread Peter Luschny
> With Maxima built from recent source (approximately Maxima 5.38), > I get results that agree with what you expected Thanks Robert, yes, I suspected the numerical integration prematurely. A plot clearly shows that the culprit are the real parts of the hyperbolic functions. plot([tanh(exp(i*t)).r

[sage-support] Re: Possible bug in numerical integration

2016-06-02 Thread Robert Dodier
On 2016-05-31, Peter Luschny wrote: > def T(v): > def f(t): return (tanh(exp(i*t))/exp(i*t*v)).real() > c = integral_numerical(f(t), 0, 2*pi)[0] > return (c*gamma(v+1)/(2*pi)).n() > > print [round(T(n)) for n in range(10)] > > Sage returned: [0, 1, 0, -1, 0, 8, 0, -136, 0, 3968] > I

[sage-support] Re: Possible bug in numerical integration

2016-05-31 Thread Peter Luschny
Further investigation shows that things work with the integrand defined as: def f(t): return exp(x*exp(i*t)-v*i*t)*(exp(exp(i*t))/cosh(exp(i*t))-1) So the source of the trouble seems to be related to the identity (exp(exp(I*t))/cosh(exp(I*t))-1) = tanh(exp(I*t)) Peter -- You received thi