MathGroup Archive 1999

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

Search the Archive

Re: Can someone explain this?

  • To: mathgroup at
  • Subject: [mg19161] Re: [mg19106] Can someone explain this?
  • From: Richard Gass <gass at>
  • Date: Thu, 5 Aug 1999 23:59:04 -0400
  • Sender: owner-wri-mathgroup at

You wrote:
>Using Mathematica 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

  • Prev by Date: Re: Re: equaltity of lists
  • Next by Date: RE: Can someone explain this?
  • Previous by thread: Can someone explain this?
  • Next by thread: RE: Can someone explain this?