MathGroup Archive 1999

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

Search the Archive

Re: Manipulating differential equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18583] Re: [mg18552] Manipulating differential equations
  • From: "Carl K.Woll" <carlw at fermi.phys.washington.edu>
  • Date: Tue, 13 Jul 1999 01:01:22 -0400
  • Organization: Department of Physics
  • References: <199907100618.CAA02980@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Martin,

Here are two ideas.

1. Use pure functions:

dg1/.c->(Exp[-a #]&)

  2
 a     a g
---- - ----
 a x    a x
E      E


2. Define c to be your test function, evaluate dg1, and then clear c. A nice
way to do this is to use Block:

Block[{c},
    c[x_]:=Exp[-a x];
    dg1]

  2
 a     a g
---- - ----
 a x    a x
E      E


As for what goes wrong with your attempt, look at the FullForm of c'[x].

FullForm[c'[x]]

Derivative[1][c][x]

As you can see, c[x] does not appear in the FullForm of c'[x]. Hence, when
you apply your replacement rule, nothing happens to c'[x].

Carl Woll
Dept of Physics
U of Washington

Martin Heimann wrote:

> Dear colleagues,
>
> I would like to insert test functions into an expression that contains
> differentials:
>
> dg1 = c''[x] + g c'[x]
>
> I would like e.g. to replace c[x] by Exp[-a x]:
>
> dg1/.c[x]->Exp[-a x]
>
> but this doesn't work; one has to put substitution rules for each of the
> derivatives explicitly. Is there a more elegant way to achieve this?
>
> Cheers,
> Martin Heimann
> ------------------------------------------------------------------
> Max-Planck-Institut fuer Biogeochemie
> Postfach 100164, D-07701 Jena, Germany
> (Street Address: Tatzendpromenade 1a)
>
> Tel.:  +49-3641-64-3773/3701,  Fax.: +49-3641-64-3710
> Email: martin.heimann at bgc-jena.mpg.de



  • Prev by Date: Re: RE: ExpIntegralEi
  • Next by Date: Concurrent Curve Fitting... II
  • Previous by thread: Manipulating differential equations
  • Next by thread: Re: Manipulating differential equations