Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: DSolve with recursively defined equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53786] Re: [mg53760] DSolve with recursively defined equations
  • From: DrBob <drbob at bigfoot.com>
  • Date: Thu, 27 Jan 2005 05:41:26 -0500 (EST)
  • References: <200501260937.EAA00254@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

The problem is that the expressions nn'[0, d] and nn'[i, d] don't make any sense.

Try this instead:

Clear[nn, eq, in, eqns, funcs];
iCount = 2;
eq[0] = D[nn[0, d], d] == -r nn[0, d];
eq[i_] := D[nn[i, d], d] == r(nn[i - 1, d] - nn[i, d]);
in[0] = nn[0, 0] == 1;
in[i_] := nn[i, 0] == 0;
eqns = Flatten[Table[{eq[i], in[i]}, {i, 0, iCount}]]
funcs = Table[nn[i, d], {i, 0, iCount}]
DSolve[eqns, funcs, d]

{{nn[0, d] -> E^((-d)*r),
    nn[1, d] -> (d*r)/E^(d*r),
    nn[2, d] -> ((1/2)*d^2*r^2)/
      E^(d*r)}}

Bobby

On Wed, 26 Jan 2005 04:37:21 -0500 (EST), <pdickof at sasktel.net> wrote:

> DSolve can handle this....
> eq[0] = n0'[d] == -r n0[d];
> eq[1] = n1'[d] == r(n0[d]  - n1[d]);
> eq[2] = n2'[d] == r(n1[d]  - n2[d]);
> in[0] = n0[0] == 1;
> in[1] = n1[0] == 0;
> in[2] = n2[0] == 0;
> eqns = Flatten[Table[{eq[i], in[i]}, {i, 0, 2}]];
> funcs = {n0[d], n1[d], n2[d]};
> DSolve[eqns, funcs, d]
>
> ...but when I try to generalize to the following ...
> Remove[nn, eq, in, eqns, funcs];
> iCount=2;
> eq[0] = nn'[0, d] == -r nn[0, d];
> eq[i_] := nn'[i, d] == r(nn[i - 1, d]  - nn[i, d]);
> in[0] = nn[0, 0] == 1;
> in[i_] := nn[i, 0] == 0;
> eqns = Flatten[Table[{eq[i], in[i]}, {i, 0, iCount}]];
> funcs = Table[nn[i, d], {i, 0, iCount}];
> DSolve[eqns, funcs, d]
>
> ...I get the message
> DSolve::bvnul: For some branches of the general solution, \
> the given boundary conditions lead to an empty solution.
>
> I don't understand the difference. Is it possible to generalize as
> above? Is it possible to obtain a general solution for the ith
> equation? What are the relevant sections in the documentation?
> Thanks in advance.....
>
> Peter Dickof
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Re: symbolic complex expressions
  • Next by Date: Re: Re: simplifying inside sum, Mathematica 5.1
  • Previous by thread: DSolve with recursively defined equations
  • Next by thread: Re: DSolve with recursively defined equations