Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Manipulating differential equations

  • To: mathgroup at
  • Subject: [mg18617] Re: [mg18552] Manipulating differential equations
  • From: "Wolf, Hartmut" <hwolf at>
  • Date: Tue, 13 Jul 1999 01:01:37 -0400
  • Organization: debis Systemhaus
  • References: <>
  • Sender: owner-wri-mathgroup at

Hello Martin,

Martin Heimann schrieb:
> 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?
you have to substitute the _function_ :

In[16]:= dg1 = c''[x] + g c'[x]//FullForm

In[17]:= dg1/. c->(Exp[-a #]&) 

(of course you normally don't define dg1 wrapped in FullForm)

Alternatively you could also localize the function c[x] to Exp[-a x]:

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

---your's hw

  • Prev by Date: Re: Not Plotting Vertical Assymptotes
  • Next by Date: Re: Manipulating differential equations
  • Previous by thread: Re: Manipulating differential equations
  • Next by thread: Re: Manipulating differential equations