Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to do it in Mathematica

  1. Aug 12, 2009 #1
    If I want to simplify an extremely large algebraic expression which equals zero to a simple neat equation -- how do I do that in Mathematica (or symbolic package of Matlab). Giving you an example of the equation below:

    (c1 (-1 + E^(I dx kx)) (-1 + v4))
    --------------------------------------------------------
    (-1 - 6 c1 c2 v1 + 6 c1 c2 v1 Cos[dx kx])

    (c1 (-1 + E^(I dx kx)) (-1 + v4))
    + -------------------------------------------------------
    (1 + 6 c1 c2 v1 - 6 c1 c2 v1 Cos[dx kx])

    (4 c1 c2 (-1 + v4) (-1 + Cos[dx kx]))
    - ----------------------------------------------------------- = 0
    (-1 - 6 c1 c2 v1 + 6 c1 c2 v1 Cos[dx kx])


    In fact my equation is much more larger than this. Thank you
     
  2. jcsd
  3. Aug 12, 2009 #2
    If you wish to reduce and expression (in this case, just the left side of the equation) to a simpler form, use either

    Simplify[expression]

    or

    FullSimplify[expression]


    These use algorithms to try to reduce the given expression to the simplest terms. You can there after set it equal to zero.
     
  4. Aug 12, 2009 #3

    Dale

    Staff: Mentor

    I would recommend to simplify the equation as a whole rather than just the expression on the left. If you simplify the expression then c1 will remain, but if you simplify the equation as a whole c1 will drop out. Also, be sure to provide any assumptions (such as c1>0, etc.) to Simplify or FullSimplify.
     
  5. Aug 13, 2009 #4
    In mathematica FullSimplify[expression] is valid but is FullSimplify[expression=0] a valid expression or will it work as we expect (like what you explained). I tried but it didnot give any improvement... it simply showed the expression on left and zero on the right of the equal. Is there any special clue that I am missing.
     
  6. Aug 13, 2009 #5

    Dale

    Staff: Mentor

    Use the logical equals instead of the set equal. I.e. FullSimplify[expression==0] Also, as I suggested earlier be sure to include any assumptions.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook