Re: NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg43094] Re: NDSolve
- From: "Steffen" <nnnx at gmx.de>
- Date: Tue, 12 Aug 2003 04:43:07 -0400 (EDT)
- Organization: University of Karlsruhe, Germany
- References: <bgfsic$lm3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"sean kim" <shawn_s_kim at yahoo.com> schrieb im Newsbeitrag news:bgfsic$lm3$1 at smc.vnet.net... > apears the problem is of two fold. > > first you have to decide on the coefficient values. ie. k's and M > > then you have to change the = sign used to define the intitial > conditions to == sign, > > as follows. > > you refer to the values of the k's but you haven't given any. i have > chosen random values for them but the choices of the coefficients are > such that the system doesn't seem too exiciting. > > (*below clears the variables*) > In[1]:= > ClearAll["Global`*"] > > (* below defines a new systems according to the k's *) > In[2]:= > eqns = { y1'[x] == -k1 y1[x] y2[x] + km1 y3[x], > y2'[x] == -k1 y1[x] y2[x] + km1 y3[x], > y3'[x] == k1 y1[x] y2[x] + km2 y4[x] M - (km1 + k2 M) y3[x], > y4'[x] == -km2 M y4[x] + k2 M y3[x]} /. {k1 -> 0.001, km1 -> > 0.01, > km2 -> 10, k2 -> 10, km2 -> 100, M -> 10}; > > ic = {y1[0] == 10^13, y2[0] == 10^16, y3[0] == 0, y4[0] == 0} ; > > solns = NDSolve[ > Join[{eqns, ic}], {y1[x] , y2[x] , y3 [x], y4[x]} , {x , 0 , > 50 10^-6}]; > > (*below plots them*) > Plot[Evaluate[y1[x] /. solns], {x, 0, 50 10^-6}]; > Plot[Evaluate[y2[x] /. solns], {x, 0, 50 10^-6}]; > Plot[Evaluate[y3[x] /. solns], {x, 0, 50 10^-6}]; > Plot[Evaluate[y4[x] /. solns], {x, 0, 50 10^-6}]; > > with proper k's you will get better solutions. > > good luck > > sean from UCIrvine > > > > ===== > when riding a dead horse, some dismount. > > while others... > > write memoirs on the subject of riding a dead horse. > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > Hi Sean, I also tried this method, but it doesn´t work! It gave me "The first argument must have both an equation and an initial condition". By the way: The equation system is only part of a bigger system. I first wanted to decide the "easy" one. Here are all the missing constants: k1 = 10^-11, km1 = 10^7, k2 = 10^-11, km2 = 2 10^-17, k3 = 8.25 10^5, k4 = 2.6 10^10, M = 6 10^16. Steffen