MathGroup Archive 1997

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

Search the Archive

Q: How to replace...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9695] Q: How to replace...
  • From: Halldor Bjornsson <hbjorn1 at po-box.mcgill.ca>
  • Date: Fri, 21 Nov 1997 01:31:33 -0500
  • Organization: McGill University
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
This is probably an elementary question:

I am manipulating differential equations, and am having trouble with
getting Mathematica to stop evaluating everything fully.

A trivial example of my problem is the following:

In[1]: = z[x_]=Exp[2 x];

In[2]:= dz=D[z[x],x]
Out[2]= 2 Exp[2x]

If I want to write this as  "dz=2 z[x]" and do

dz /. {Exp[2] -> z[x]}

I will still get  2 Exp[2x] out since z[x] is evaluated after the
replacement.  Delayed replacement  (" :>" does not seem to help.

Anyone know how to replace without evaluation ?
 
Thanks for your help
Halldor



  • Prev by Date: Interpolatingfunction
  • Next by Date: Re: Book recommendation for Mathematica (fwd)
  • Previous by thread: Re: Interpolatingfunction
  • Next by thread: Re: Book recommendation for Mathematica (fwd)