sage 9.0: numerical_integral of unit_step()

18 views
Skip to first unread message

mendes

unread,
Jan 21, 2020, 8:00:41 AM1/21/20
to sage-support
Dear all,

In previous versions of Sage I was able to do very quickly some   numerical integrations  involving  unit_step(t) function . 

But, in  the last updates (8.9 and 9.0) ,  it takes 6 times longer to do  the numerical integral of  convolution with unit_step(),  than to do the same operation with a gaussian function.

It does not seem to be o.k., comparing the simplicity of unit_step()  with the gaussian $e^{-t^2}$.

#Compare:

var('x,t')
f= e^(-(t-1)^2)
g= sin(t)
fg= lambda t: numerical_integral(f(t=x)*g(t=t-x),0,t,params=[0])[0]
plot(fg,t,0,3)


#with:

var('x,t')
f= unit_step(t-1)
g= sin(t)
fg= lambda t: numerical_integral(f(t=x)*g(t=t-x),0,t,params=[0])[0]
plot(fg,t,0,3)
    

Thanks for your attention.

Dima Pasechnik

unread,
Jan 21, 2020, 5:14:28 PM1/21/20
to sage-support
yes, in my tests it's even worse than 6 times slower.

Open a trac ticket?

>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/20eca99f-2e3f-4dfe-b258-d2fc7d28b0e5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages