problem with ndsolve
- To: mathgroup at smc.vnet.net
- Subject: [mg32886] problem with ndsolve
- From: sahni mayank <sahnimayank at yahoo.com>
- Date: Mon, 18 Feb 2002 05:22:06 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
hi all i've been using ndsolve for some time and i'm facing a problem involving coupling of 2 sets of differential equations.the example below illustrates my problem and i'm also attaching a copy of my program along with this mail [attachments are not permitted in this group, contact the author to receive it - moderator]: sol1 = NDSolve[{ y1'[t] == 0.5*k2 + k4*y2[t]*y3[t] - k10*y1[t]*y4[t], y2'[t] == k1 + k3 + k5*y1[t]*y1[t] - k4*y2[t]*y3[t], y3'[t] == k9*y3[t]*y1[t] - k4*y2[t]*y3[t] - k8*y1[t]*y3[t] and i specify the initial conditions,the working precision etc which are: StartingStepSize -> 0.000000000000000000001, AccuracyGoal -> 13, PrecisionGoal -> 13, WorkingPrecision -> 16, MaxSteps -> 100000000000000000000] the program gives me a good output in terms of the graphs i plot which are smooth and without fluctuations but as soon as i incorporate the 2nd set of differential equations for eg: sol1 = NDSolve[{ y1'[t] == 0.5*k2 + k4*y2[t]*y3[t] - k10*y1[t]*y4[t], y2'[t] == k1 + k3 + k5*y1[t]*y1[t] - k4*y2[t]*y3[t], y3'[t] == k9*y3[t]*y1[t] - k4*y2[t]*y3[t] - k8*y1[t]*y3[t] s1'[t] == 0.5*k2 + k4*s2[t]*y3[t] - k10*s1t]*y4[t], s2'[t] == k1 + k3 + k5*s1[t]*y1[t] - k4*s2[t]*y3[t], s3'[t] == k9*s3[t]*y1[t] - k4*s2[t]*y3[t] - k8*s1[t]*y3[t] and solve the equations giving the earlier working precison etc the program doesn;t give me a result and if i decrease these parameters(lower precison and steps) the graphs for eg y1[t] or y3[t] show a wide fluctuation. only the differential equations in S are dependent on Y. is there any way to work around this problem so that when i evaluate the differential equations of y and s simultaneously i get smooth plots which will make sense.is there any other function(instead of NDSOLVE) which is more effective is solving stiff differential equations. Mayank.