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 remove imaginary parts

  1. Jun 20, 2011 #1
    Hi all,

    I have this expression containing complex numbers and I wanted the expression to be displayed with real parts only. How can i do this?

    For instance, the original expression is,

    eqn = (16.0001+3.16141*10^-21 i)-(0.00860351-1.16927*10^-18 i) Ao[1]+(0.00537811-4.47536*10^-19 i) Ao[2]+(0.00220452-3.26709*10^-19 i) Ao[3]+(0.000739715-4.06632*10^-19 i) Ao[4]+(0.00013763-7.3495*10^-20 i) Ao[5]+(0.0000531553-2.41817*10^-20 i) Ao[6]+(0.0000215401-7.71228*10^-21 i) Ao[7]+(8.33787*10^-6-2.34411*10^-21 i) Ao[8]+(3.04878*10^-6-6.62795*10^-22 i) Ao[9]+(1.05209*10^-6-1.65167*10^-22 i) Ao[10]+(3.41169*10^-7-3.05161*10^-23 i) Ao[11]+(1.03042*10^-7-4.88271*10^-25 i) Ao[12]+(2.84435*10^-8+1.99951*10^-24 i) Ao[13]+(1.97033*10^-9-1.78568*10^-25 i) Ao[14]-(1.27252*10^-9-2.32126*10^-24 i) Ao[15]+(1.48923*10^-9+1.28512*10^-24 i) Ao[16]+(2.6173*10^-9+5.15919*10^-24 i) Ao[17]-(0.00140526-1.73272*10^-18 i) Bo[1]-(0.00102695-5.8933*10^-20 i) Bo[2]-(0.00120414-4.97092*10^-19 i) Bo[3]-(0.000925213+9.831*10^-19 i) Bo[4]-(0.000299566+1.36884*10^-21 i) Bo[5]-(0.000114259-2.87861*10^-22 i) Bo[6]-(0.0000407664-5.94754*10^-22 i) Bo[7]-(0.0000136803-4.09024*10^-22 i) Bo[8]-(4.28978*10^-6-2.03871*10^-22 i) Bo[9]-(1.23214*10^-6-8.23679*10^-23 i) Bo[10]-(3.08143*10^-7-2.67666*10^-23 i) Bo[11]-(5.67061*10^-8-5.63015*10^-24 i) Bo[12]-(1.24165*10^-9+3.89669*10^-25 i) Bo[13]+(1.79991*10^-9-2.12938*10^-24 i) Bo[14]+(2.8092*10^-9-5.68199*10^-24 i) Bo[15]+(6.17782*10^-9-8.51869*10^-24 i) Bo[16]+(4.60098*10^-9+5.81194*10^-24 i) Bo[17].

    I have tried to various methods but still failed including Re[eqn] etc etc etc.

    Please let me know and thank you in advance.
  2. jcsd
  3. Jun 20, 2011 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Did you try to FullSimplify that? You might need to tell FullSimplify that the Ao's and Bo's are real. (They are real, right?)

    You could probably tell Mathematica to reduce the precision.

    You could repeat the derivation in a way that doesn't use complex numbers.

    You could use one of the formulas for computing the real part of a number.

    You could tell it to replace i with 0.

    You could find a way to do whatever you wanted to do next that doesn't require the coefficients to be real.
  4. Jun 20, 2011 #3
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for remove imaginary parts
Mathematica Mathematica Real Part