MathGroup Archive 1999

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

Search the Archive

Re: Can someone explain this?


Hi Benjamin

Sin[x]/Cos[x] is simplified to Tan[x] whenever it occurs in an
expression. You can prevent this by wrapping it with HoldForm:

In[1]:=
x y Tan[x] + Tan[y]     /. Tan[z_]->HoldForm[Sin[z]/Cos[z]]

Out[1]= 
x y Sin[x] / Cos[x] + Sin[y] / Cos[y]

The expression Sin[x] / Cos[x] is then kept because it is in the
Hold status. You can release all holds in an expression with
ReleaseHold:

In[2]:= % // ReleaseHold
Out[2] = x y Tan[x] + Tan[y]

Yourse sincerely
  Bruno


  • Prev by Date: Re: DSolve Bessels
  • Next by Date: Re: DSolve Bessels
  • Previous by thread: RE: Can someone explain this?
  • Next by thread: Re: Can someone explain this?