On Thu, Oct 11, 2012 at 7:28 AM, Doaa El-Sakout <[email protected]> wrote: > Dear David, > I would like to plot x(t) against t similar for y and z > and after that plot [x,y,z] in phase space > So I want know the solution first for the system > before plot the result. > Thanks > Doaa
Your system is similar to one used to model a Zombie attack (which is in turn borrowed from an infection model). The sage code is here: http://wdjoyner.org/zombies/love-war-zombies.sage The commands I think you want are towards the bottom. Slides going into more detail is here: http://wdjoyner.org/zombies/love-war-zombies_slides.pdf There is even a video:-) http://www.mosaic-web.org/go/MCAST/videos/MCAST-2011-04-22/lib/playback.html > > > On 11 October 2012 10:55, David Joyner <[email protected]> wrote: >> >> On Thu, Oct 11, 2012 at 3:20 AM, Doaa El-Sakout <[email protected]> wrote: >> > Hi everyone, >> > I try to solve a system of ODE by sage as follows >> > >> > x,y,sigma,r,z,b,t=var('x,y,sigma,r,z,b,t') >> > sigma=10 >> > b=8/3 >> > r=10 >> > x= function('x',t) >> > y= function('y',t) >> > z= function('z',t) >> > d1=(diff(x,t)-sigma*(y-x)==0) >> > d2=(diff(y,t)-r*x+y+x*z==0) >> > d3=(diff(z,t)-x*y+b*z==0) >> >> This makes it non-linear. Did you intend to type that? >> >> > sol=desolve_system([d1,d2,d3],[x,y,z],ics=[0,1,0],ivar=t);show(sol) >> > >> > But I got the following error >> > >> > TypeError: unable to make sense of Maxima expression >> > >> > 'x(t)=ilt((?g3817-10*laplace(x(t)*z(t),t,?g3817)+1)/(?g3817^2+11*?g3817-90),?g3817,t)' >> > in Sage >> > >> > >> > >> > Any suggestion >> > Doaa >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "sage-support" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > Visit this group at http://groups.google.com/group/sage-support?hl=en. >> > >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-support" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> Visit this group at http://groups.google.com/group/sage-support?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
