       Re: Manipulating differential equations

• To: mathgroup at smc.vnet.net
• Subject: [mg18609] Re: [mg18552] Manipulating differential equations
• From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
• Date: Tue, 13 Jul 1999 01:01:33 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Here is one possible way.

In:=
dg1 = c''[x] + g c'[x];

In:=
Block[{c = Function[x, Exp[-a x]]}, dg1]
Out=
2
a     a g
---- - ----
a x    a x
E      E

In:=
Block[{c = Function[x, Sin[a x]]}, dg1]
Out=
2
a g Cos[a x] - a  Sin[a x]

In:=
dg1
Out=
g c'[x] + c''[x]
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp

----------
>From: Martin Heimann <martin.heimann at bgc-jena.mpg.de>
>To: mathgroup at smc.vnet.net
>Subject: [mg18609] [mg18552] Manipulating differential equations
>Date: Sat, Jul 10, 1999, 3:18 PM
>

> 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