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

Complex mathematica tutorial?

  1. Dec 9, 2007 #1
    so i was kind of wondering if anyone knows of any mathematica tuorials for how to operate with complex numbers (i know how to do it by hand but solving a set of 5 equations all complex just seems suicidal :D )

    so any help d be appreciated
  2. jcsd
  3. Dec 9, 2007 #2


    User Avatar
    Science Advisor
    Homework Helper

    What about

    a^2 + b^2 == -2,
    b - 3 c == \[ImaginaryI],
    2 c - 3 a == 1 + \[ImaginaryI],
    d + 4 == Sqrt[e],
    e + a == -3},
    {a, b, c, d, e}

    just as you would solve a normal set of equations?
  4. Dec 9, 2007 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    There's really nothing special at all about using complex numbers in Mathematica.

    - Warren
  5. Dec 10, 2007 #4


    User Avatar
    Science Advisor
    Homework Helper

    By the way, if the equations are linear, there is nothing suicidal about it. Just write them in matrix form and row-reduce :smile: (the joy of every student)

    Oh, and before I forget, you make the imaginary i in Mathematica by typing I (capital i) or [Escape]ii[Escape]
    Last edited: Dec 10, 2007
  6. Dec 10, 2007 #5
    hmm yeah i wish they were linear

    well only problem i really got is that i dont know how to conjugate Exp[ i x] or to make shown as Cosx + i Sinx

    P.S equations were:
    a1 - a2 + b1 - b2

    -(20/197) Sqrt[2555] (a2 - b2) Sqrt[-1 + x] +
    20/197 Sqrt[2555] (a1 - b1) Sqrt[x]

    -a3 exp[20/197 \[ImaginaryI] Sqrt[2555] Sqrt[-2 + x]] +
    b2 exp[-(20/197) \[ImaginaryI] Sqrt[2555] Sqrt[-1 + x]] +
    a2 exp[20/197 \[ImaginaryI] Sqrt[2555] Sqrt[-1 + x]]

    -(20/197) Sqrt[2555] a3 Sqrt[-2 + x]
    exp[20/197 \[ImaginaryI] Sqrt[2555] Sqrt[-2 + x]] +
    20/197 Sqrt[2555]
    Sqrt[-1 +
    x] (a2 exp[20/197 \[ImaginaryI] Sqrt[2555] Sqrt[-1 + x]] -
    b2 exp[20/197 \[ImaginaryI] Sqrt[2555] Sqrt[-1 + x]])

    (dunno latex so sry for the uglyness)
    Last edited: Dec 10, 2007
  7. Dec 10, 2007 #6
    you can use ExpToTrig[...] to convert the exponentials to trigonometric functions.

    I think there is a conjugation function somewhere...
  8. Dec 10, 2007 #7


    User Avatar
    Science Advisor
    Homework Helper

    You'd never guess it... it's called Conjugate[...]
    i.e. Conjugate[4 + 3I] gives 4 - 3I
  9. Dec 10, 2007 #8
    The mathematica help is pretty good, just do a search in the mathematica help browser for whatever you're trying to do, there is probably a function already designed for it.
  10. Dec 11, 2007 #9
    i think i actually managed it :D did the trig thingy and then used Conjugate (that one was silly obvious /blush)
    and i got a result

    thank you :)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for Complex mathematica tutorial
Mathematica Complex output from a real integral
Mathematica Storing Mathematica output
Mathematica Mathematica to MATLAB
Mathematica Cannot do the integral of the Hyper-geometric function?