Ask Your Question

strangelove1661's profile - activity

2016-07-24 15:38:01 +0200 received badge  Notable Question (source)
2015-05-12 22:54:14 +0200 received badge  Popular Question (source)
2014-11-04 00:52:38 +0200 commented answer solving a system of DEs numerically and plotting the solution

Thanks for the help.

2014-11-04 00:52:26 +0200 received badge  Scholar (source)
2014-11-03 21:32:05 +0200 asked a question solving a system of DEs numerically and plotting the solution

Hi everyone. I want to hand Sage a system of nonlinear DEs with initial values, and I'd like a plot of the solutions. Is there a best way to do this? For example, to solve this system: ds/dt=-si, di/st=si-2i, dr/dt=2i, s(0)=1, i(0)= 0.00000127, r(0)=0, I did this in Sage:

sage: (s,i,r)=var('s,i,r')

sage: des=[-1si, si-2i, i]

sage: desolve_system_rk4(des, [s,i,r], ics=[0, 1, 0.00000127, 0], ivar=t, end_points=20)

Sage gave me a list of points, but I couldn't figure out a way to plot s, i, and r using the points it gave me. Thanks!