On Mon, Jul 29, 2013 at 3:20 AM, Stefan Krastanov
<[email protected]> wrote:
> It is because the integral can not be solved symbolically by sympy so it has
> to be evaluated numerically _for each point t that is plotted_.
>
> first plot: evaluate the integral symbolically (slow), calculate the value
> of the result at each t (fast as it is only arithmetics)
>
> last plot: try to evaluate the integral symbolically (slow and useless as it
> fails), fallback to numeric integrations at each t (slow because numeric
> integration needs a lot of sampling)

Can we modify the numerical integration routine so that it can give a
list of points more efficiently? It seems like there would be a lot of
duplicate sampling happening. Or maybe we just need to memoize the
sampling of the integrand.

Aaron Meurer

>
>
> On 29 July 2013 08:45, <[email protected]> wrote:
>>>
>>> Ok, i see this isn't implemented yet. But could you give me a hint why
>>> while the last plot the kernel is busy all the time ?
>>
>>
>>
>> import sympy
>> from sympy.plotting import plot
>> from sympy.abc import t,tau
>>
>> u_t = 2 * DiracDelta(t)
>> g_t = 0.5 * ( Heaviside(t)-Heaviside(t-2) )
>>
>> plot( integrate( u_t.subs(t,tau)*g_t.subs(t,t-tau), (tau,-10, 10)),
>> (t,-10,10))
>> plot( integrate( u_t.subs(t,tau)*u_t.subs(t,t-tau), (tau,-10, 10)),
>> (t,-10,10))
>> plot( integrate( g_t.subs(t,tau)*g_t.subs(t,t-tau), (tau,-10, 10)),
>> (t,-10,10))
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sympy" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/sympy.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to