Replacing result with earlier variable definition

• To: mathgroup at smc.vnet.net
• Subject: [mg115532] Replacing result with earlier variable definition
• From: Rakesh Dhote <rakesh.dhote at gmail.com>
• Date: Thu, 13 Jan 2011 03:30:26 -0500 (EST)

```Hi,

I am facing the following difficulty.
I define "PE" in terms of "e" and perform some operations. I want to
define the results in terms of "e" again.
Please let me know, how to do it?

Here is the dummy code for understanding:
==================================================
In[1]:= Needs["VectorAnalysis`"]
In[2]:= e=(D[u[x,y,t],x]-D[v[x,y,t],y])/Sqrt[2]
Out[2]= (-(v^(0,1,0))[x,y,t]+(u^(1,0,0))[x,y,t])/Sqrt[2]
In[3]:= PE=a1/2*e^4
Out[3]= 1/8 a1 (-(v^(0,1,0))[x,y,t]+(u^(1,0,0))[x,y,t])^4
In[4]:= H = D[PE,D[u[x,y,t],x]]
Out[4]= 1/2 a1 (-(v^(0,1,0))[x,y,t]+(u^(1,0,0))[x,y,t])^3

In[5]:= Replace[H,(D[u[x,y,t],x]-D[v[x,y,t],y])/Sqrt[2]->e] (* To
convert H in terms of e *)
Out[5]= 1/2 a1 (-(v^(0,1,0))[x,y,t]+(u^(1,0,0))[x,y,t])^3

Now I would like to convert "H" in the terms of "e", which I defined
earlier.
I tried with Replace command, but didn't work. Please share your
expertize.
==================================================
Thanks a lot for your tips.

Thanks,
RD

```

• Prev by Date: Re: Rudimentary Export Question
• Next by Date: Re: Curl and Div problems