Services & Resources / Wolfram Forums
MathGroup Archive
*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 why Mathematica is doing this?

  • To: mathgroup at
  • Subject: [mg19140] Re: [mg19113] Can someone explain why Mathematica is doing this?
  • From: "David Park" <djmp at>
  • Date: Thu, 5 Aug 1999 23:58:43 -0400
  • Sender: owner-wri-mathgroup at


Mathematica does automatically make the simplification, undoing the substitution.

You could wrap Sin[x] and Cos[x] in HoldForm which would prevent the simplification,
then use ReleaseHold when you want to fully evaluate. Or you could use sin[x]/cos[x]
and then substitute the real names when you want to fully evaluate.

David Park
djmp at

>I'm running Mathematica v3.0.1.1x (or something like that) on a Macintosh.  I want
>to replace Tan[something] with Sin[something]/Cos[something].  The obvious
>substitution (see below) didn't work.  Other substitutions work fine, but
>this one just sits there.  Perhaps (it has just occured to me) Mathematica is
>making the substitution, but then "simplifying" Sin/Cos->Tan.  However, I
>want to make other substitutions (to check some algebra that I'm doing by
>hand).  How can I make Mathematica do this?
>Thanks in advnace,
>In[7]:=Tan[x]/.Tan[z_]->z Sin[z]
>Out[7]=x Sin[x]
>Out[8]=Cos[x] Sin[x]
>  Benjamin Lotto                 *
>  Department of Mathematics      *  e-mail:  belotto at
>  Vassar College, Box 349        *  phone:  914-437-7180
>  124 Raymond Avenue             *  fax:  914-437-7065
>  Poughkeepsie, NY 12604-0349    *
>      WWW:  <>

  • Prev by Date: RE: Re: Packed Arrays in version 4
  • Next by Date: RE: Mathematica References for Efficient Programming?
  • Previous by thread: Can someone explain why Mathematica is doing this?
  • Next by thread: DSolve Bessels