Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*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 1996

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

Search the Archive

Are two expressions equal?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5058] Are two expressions equal?
  • From: jeremy_gorman at smtp.svl.trw.com (Jeremy Gorman)
  • Date: Wed, 23 Oct 1996 01:38:16 -0400
  • Organization: TRW ASG Sunnyvale (formerly ESL)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Folks,

How can I check to see if these expressions are equal?
----------------------------
In[25]:=
q1 == q2
Out[25]=
          phi   psi      theta      phi   psi      theta
x (-2 Cos[--- + ---] Cos[-----] Sin[--- - ---] Sin[-----] + 
           2     2         2         2     2         2
 
            phi   psi      theta      phi   psi      theta
      2 Cos[--- - ---] Cos[-----] Sin[--- + ---] Sin[-----]) + 
             2     2         2         2     2         2
 
             phi   psi      phi   psi      theta      theta
   y (-2 Cos[--- - ---] Cos[--- + ---] Cos[-----] Sin[-----] - 
              2     2        2     2         2          2
 
            theta      phi   psi      phi   psi      theta
      2 Cos[-----] Sin[--- - ---] Sin[--- + ---] Sin[-----]) + 
              2         2     2        2     2         2
 
          phi   psi 2     theta 2       theta 2     phi   psi 2
   z (Cos[--- + ---]  Cos[-----]  + Cos[-----]  Sin[--- + ---]  + 
           2     2          2             2          2     2
 
          phi   psi 2     theta 2       phi   psi 2     theta 2
      Cos[--- - ---]  Sin[-----]  + Sin[--- - ---]  Sin[-----] ) == 
           2     2          2            2     2          2
 
  z Cos[psi] Cos[theta] + y (-(Sin[phi] Sin[psi]) + 
 
      Cos[phi] Cos[psi] Sin[theta]) + 
 
   x (Cos[phi] Sin[psi] + Cos[psi] Sin[phi] Sin[theta])
-------------------------------
I've tried 
Expand[q1]==Expand[q2]
but Mma 2.2.2 still returns an expresion with == in it.
I could go through comparing subexpressions, but there are a few
more of these which I'd like to compare, and I'm hoping for a 
more general approach.

Thanks in advance
Jeremy

/*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/
Jeremy Gorman                                  "Just a Comment"
Most of my opinions are my own (especially if expressed here) !
/*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/ /*\ \*/


  • Prev by Date: Re: Why no solution to 3 eqns. in 3 unk. ?
  • Next by Date: Legend
  • Previous by thread: Re: error message
  • Next by thread: Re: Are two expressions equal?