Re: NDSolve
- To: mathgroup at smc.vnet.net
- Subject: [mg42912] Re: [mg42880] NDSolve
- From: sean kim <shawn_s_kim at yahoo.com>
- Date: Sat, 2 Aug 2003 04:12:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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