On Thu, Nov 28, 2013 at 4:37 AM, Jose Guzman <[email protected]> wrote:
> Hi everybody,
>
> I want to solve the following ODE:
>
> dp/dt = (1-p)/tau - u*p*delta(t-tOn)
>
> In principle, desolve_odeint should be able to do it. However, in sage
>
> sage: import numpy as np
> sage: from sage.calculus.desolvers import desolve_odeint
>
> sage: p = var('p')
> sage: t = var('t')
> sage: tau = 2
> sage: u = 0.8
>
> sage: myode(t) = (1-p)/tau - u*p*dirac_delta(t)
>
> sage: tlist = np.arange(0,10,0.01)
>
> sage: desolve_odeint(des = myode, ics = [0,1], times = tlist, dvars =[p])

desolve_odeint is a numerical routine and delta is not a function, so
I don't see how you can solve it this way.

Does this entry in the ref manual help?
http://sage.math.washington.edu/tmp/sage-2.8.12.alpha0/doc/ref/node125.html


>
> The error is that expression does not support indexing. Then,  how can I
> define the array of vectors that contain the independent variable in sage?
>
> Thanks in advance
>
> Jose
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to