Question: how to pick up the Real or Image part of complex numbers from a array together?

The topic maybe not so rigor.


For example,here are four complex numbers.

B ={3/13 - (2 I)/13, 3/2 - (5 I)/2, -(7/2) - 13 I, 1 - 3 I}

List B can be easily manipulate like this in mathematica,


In[31]:= Re[A]
Out[31]= {3/13,3/2,-(7/2),1}
In[32]:= Im[A]
Out[32]= {-(2/13),-(5/2),-13,-3}

and in maple,I creat the array like this:

n := (a, b, c, d)

a,b,c,d are the four elements corresponding  to List B above.


then Re(A) is OK,that's Matrix(1, 4, {(1, 1) = 3/13, (1, 2) = 3/2, (1, 3) = 2, (1, 4) = 1}),ie [3/13,3/2,2,1]

But Im(A),comes out error:Error, invalid input: `simpl/Im` expects its 1st argument, x, to be of type {boolean, algebraic}, but received Array(1..4, {(1) = 3/13-(2/13)*I, (2) = 3/2-(5/2)*I, (3) = 2-(3/2)*I, (4) = 1-3*I})

Though Im(A) can be express like this:(A-Re(A))/I

So is there some other methods in maple?

Further more,argument and absolute value should alse be considered.


How to solve  this equation?

When x,y is Real,solve({(x+1+I*(y-3))/(5+3*I) = 1+I}, [x, y])

actually I'm confused by the result it come out [[x = -I*y+1+11*I, y = y]]

It can be solved by the definition of the equality of two complex numbers.

and x=1,y=11.Hence (2+8*I)/(5+3*I)=1+I



Please Wait...