Page 1 of 1
Crazy math
Posted: Fri May 02, 2008 3:41 pm
by eman7613
So im working on some math code, namely complex numbers, and im writing compateTo, simple method right? wrong!
i > -i, this is true. and for any number a > b, a^2 > b^2, right? only makes sense, so i^2 > -i^2. BUT WAIT! this converts to, -1 > 1, which is not true! >.< evil complex numbers! does anyone know a lot about math who can explain this to me?
Posted: Fri May 02, 2008 5:43 pm
by Behrendt
I think i > -i is wrong. What if i is a negative number?
Posted: Fri May 02, 2008 5:51 pm
by remus
Behhrendt, i think he's talking about i as in the square root of minus one rather than just a variable.
http://en.wikipedia.org/wiki/Complex_number
Posted: Sat May 03, 2008 2:07 am
by oodmb
well, how are you representing your complex numbers?
(a+bi)^c ?
if that's how your doing it, comparing two complex numbers, or a complex number to a regular number is sort of meaningless, because these complex numbers are basically vectors on the complex plane, and you can't really compare two vectors. what you could do is compare there absolute values, or compare one component of the "vector" < a, b >.
if you are doing (a+bi)^c, you might want to do the math with the exponent first to produce just (a+bi).
in the case that a=0, b=1, and c=2, you'd have (0+1i)^2=i^2=(0+i)(0+i)=(-1+0i)^1
in the case of -i, you have a=0, b=-1, and c=1 so that -i=(0+-i)^1
in the case of i, you have a=0, b=1, and c=1 so that i=(0+i)^1
if the absolute value is compared, they are both equal, if only the a component is compared, then they are equal, if the b component is compared, you would have i>-i.
the reason complex numbers are represented this way is because i is not a real number, it's imaginary, it needs its own "number" line to represent it's magnitudes.
on a complete side note, the graph of the parametric function
x=real(i^t)
y=imaginary(i^t)
is a circle
Posted: Sat May 03, 2008 4:08 am
by Kram1032
for any number a > b, a^2 > b^2, right?
Wrong...
-0.5 > -2 , 0.25 !> 4 !

Maybe, it's true for the absolute values......
|-2| > |-0.5| , 4 > 0.25
though, then you can't differ between negative and positive values anymore...
|-2| = |2| , 4 = 4
Oh, and the absolute value of a complex number x+yi = sqrt(x²+y²) which also eliminates any complex values.
The only numbers which remain are in "R{+,0}"
Posted: Sat May 03, 2008 8:04 am
by Stinkie
Wow! It's party time in here! Shall I pass the E?
Posted: Sat May 03, 2008 8:14 am
by Kram1032
well the natural exponent will be needed for the complex numbers as well

so will do the trig functions....
Posted: Sat May 03, 2008 8:20 am
by Stinkie
Sweet Lord! And I thought
I was a nerd!
Oh well. As long as you math geeks are having fun, right?

Posted: Sat May 03, 2008 8:50 am
by Kram1032
Ok... asking TI-92:
Code: Select all
(a + b i) ^ (c + d i) = cos (ln (a² + b²) d /2 - (2 arctan (a/b) - abs (b) / b pi) c / 2) e ^ (ln (a² + b²) c / 2 + arctan (a / b) d - abs (b) / b d pi / 2) + sin (ln ( a² + b²) d / 2 - (2 arctan (a / b) - abs (b) / b pi) c / 2) e ^(ln (a² + b²) c / 2 + arctan (a / b) d - abs (b) / b d pi / 2) i
or also...
Code: Select all
e ^ (i (ln (a² + b²) d / 2 - (2 arctan (a / b) - abs (b) / b pi) c / 2)) e ^ (ln (a² + b²) c / 2 + arctan (a / b) d - abs (b) / b d pi /2)
Ok, hopefully I didn't make any mistake while typing^^
Posted: Sat May 03, 2008 5:31 pm
by oodmb
how'd you make squared stuff into postscript ?
Posted: Sun May 04, 2008 12:39 am
by Kram1032
AltGr + 2 on this keyboard...
As well as ³

Posted: Sun May 04, 2008 4:22 pm
by eman7613
ive got arbitray percision code for almost every math functions for complex numbers complete, im just trying to figure out the proper way to compare/ order complex numbers.
The problem with takeing the modulous is that compelx numbers changes order in a way that i dont think is okay. for exmaple: -2i, and 3. -2i's modulous would become 4, making it greater than 3, yet sqrt(-2) should remain less than three in ordering (at least i think so...).
Another problem is that i'm working with arbitrayer percision, id be waitying a long time for comparisons due to thee needed math since they are stored in a+bi format. I cant realy change it to another format, since storing it in polar form is costly for calculations & i loose a lot of accuracy, and exponential form has the same problems as polar, except maybe even more confusing to compare size of.
i cant seem to find any information of this outside of my own work, and my dad's old books are hard to read!
Posted: Sun May 04, 2008 6:35 pm
by OnoSendai
I don't think there is just one way to order the complex numbers.
Posted: Mon May 05, 2008 6:11 am
by Kram1032
Actually, complex numbers are said to be unorderable. Or better say, two dimensional orderable. You can't order them at a line - except if you take the absolute values
