Re: Can someone explain this?
- To: mathgroup at smc.vnet.net
- Subject: [mg19161] Re: [mg19106] Can someone explain this?
- From: Richard Gass <gass at physics.uc.edu>
- Date: Thu, 5 Aug 1999 23:59:04 -0400
- Sender: owner-wri-mathgroup at wolfram.com
You wrote: >Using Mathematica 3.0.1.1x on a PowerMac 9600/233 under system 8.5.1, I >get the >following. No matter what variation I try, I can't get Mathematica to replace >Tan[x] with Sin[x]/Cos[x]. (Ultimately I'd like to do this with more >complicated expressions.) > >In[1]:= Tan[x]/.Tan[z_]->Sin[z] > >Out[1]= Sin[x] > >In[2]:= Tan[x]/.Tan[z_]->z Sin[z] > >Out[2]= x Sin[x] > >In[3]:= Tan[x]/.Tan[z_]->Sin[z]Cos[z] > >Out[3]= Cos[x] Sin[x] > >In[4]:= Tan[x]/.Tan[z_]->Sin[z]/Cos[z] > >Out[4]= Tan[x] Try this Tan[x] /. Tan[x] -> HoldForm[Sin[x]/Cos[x]] The problem is that the kernel evaluates Sin[x]/Cos[x] as Tan[x]. Richard Gass Department of Physics University of Cincinnati Cincinnati, OH 45221 phone- 513-556-0519 E-Mail gass at physics.uc.edu