MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

ndsolve of coupled equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116471] ndsolve of coupled equation
  • From: tarun dutta <tarunduttaz at gmail.com>
  • Date: Wed, 16 Feb 2011 04:36:55 -0500 (EST)

n = 5;
p = 5/1000;
q = 1/10;
c[i_][t] = a[i][t];
d[i_][t] = b[i][t];

eqn = Join[
   Table[{c[i]'[t] == ((1/2)*i (i - 1) - q*i)*c[i][t] -
       p*(Sqrt[i]*
           c[i - 1][t]*(Sum[Sqrt[i]*d[i - 1][t]*d[i][t], {i, 0, n}]) +
           Sqrt[i + 1]*
           c[i + 1][
            t]*(Sum[Sqrt[i + 1]*d[i - 1][t]*d[i][t], {i, 0, n}])),
     d[i]'[t] == ((1/2)*i (i - 1) - q*i)*d[i][t] -
       p*(Sqrt[i]*
           d[i - 1][t]*(Sum[Sqrt[i]*c[i - 1][t]*c[i][t], {i, 0, n}]) +
           Sqrt[i + 1]*
           d[i + 1][
            t]*(Sum[
             Sqrt[i + 1]*c[i - 1][t]*c[i][t], {i, 0, n}]))}, {i, 0,
     n}], Sum[(c[i]^2)[t], {i, 0, n}] == 1,
   Sum[(d[i]^2)[t], {i, 0, n}] ==
    1, {c[0][0] == 0.004567 == d[0][0]}, {Table[
     c[i][0] == 0.0000000034, {i, 1, 5}],
    Table[d[i][0] == 0.0000000034, {i, 1, 5}]}];
vars1 = Table[c[i][t], {i, 0, 5}];
vars2 = Table[d[i][t], {i, 0, 5}];
vars = Join[vars1, vars2];
sol = NDSolve[eqn, vars, {t, 1/10}]

it shows some error as NDSolve::deqn..
give some explanation..
regards,
tarun



  • Prev by Date: Re: How to do quickest
  • Next by Date: Solids of revolution
  • Previous by thread: Re: NInegrate Bug
  • Next by thread: Re: ndsolve of coupled equation