(Newbie) Replace without Evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg9610] (Newbie) Replace without Evaluation
- From: Halldor Bjornsson <hbjorn at po-box.mcgill.ca>
- Date: Fri, 14 Nov 1997 21:39:52 -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, Halldor