Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

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


  • 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?