#8950: new function for sage.calculus.desolve module
------------------------------+---------------------------------------------
   Reporter:  uri             |       Owner:  burcin      
       Type:  enhancement     |      Status:  new         
   Priority:  minor           |   Milestone:              
  Component:  calculus        |    Keywords:  desolve     
     Author:  Oriol Castejon  |    Upstream:  N/A         
   Reviewer:                  |      Merged:  desolvers.py
Work_issues:                  |  
------------------------------+---------------------------------------------
 I've done a new function, named desolve_numerical, that solves a system of
 first order differential equations numerically. It seems to be quite more
 efficient than the function desolve_system_rk4, included in the same
 module. It can be seen in the following example (Lotka-Volterra
 Equations):

 sage: x,y,t=var('x,y,t') [[BR]]sage: des=[x*(1-y),-y*(1-x)][[BR]]sage:
 ics=[1,0.5] [[BR]]sage: times=srange(0,10.1,0.1)

 With the new function we get:

 sage: timeit('desolve_numerical(des,ics,times,(x,y))') [[BR]]125 loops,
 best of 3: '''5.81 ms per loop'''

 while with desolve_system_rk4 the result is:

 sage: timeit('desolve_system_rk4(des,[x,y],ics=[0,1,0.5],ivar=t)') [[BR]]5
 loops, best of 3: '''558 ms per loop'''

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8950>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to