RE: Programming an algebraic experiment

• To: mathgroup at smc.vnet.net
• Subject: [mg34718] RE: [mg34687] Programming an algebraic experiment
• From: "DrBob" <majort at cox-internet.com>
• Date: Sun, 2 Jun 2002 01:14:57 -0400 (EDT)
• Reply-to: <drbob at bigfoot.com>
• Sender: owner-wri-mathgroup at wolfram.com

```Once you've cleaned up the notation, the following lines yield:

Remove["Global`*"]
defns = Flatten[Table[Unique["s"] -> Unique["x"] + I Unique["y"], {i, 1,
4}]];
polarDefns = (# -> Unique["r"]Exp[I Unique["t"]]) & /@ defns[[All, 1]];
vec=(the cleaned up list of quantities);
vec2=ComplexExpand[vec /. polarDefns]

{r1^2 + r2^2 + r3^2 + r4^2,
-r1^2 + r2^2 - r3^2 + r4^2,
r2*r3*Cos[t2 - t3] + r1*r4*Cos[t1 - t4],
r2*r3*Sin[t2 - t3] - r1*r4*Sin[t1 - t4],
-r1^2 + r2^2 + r3^2 - r4^2,
r1^2 + r2^2 - r3^2 - r4^2,
r2*r3*Cos[t2 - t3] - r1*r4*Cos[t1 - t4],
r2*r3*Sin[t2 - t3] + r1*r4*Sin[t1 - t4],
r1*r3*Cos[t1 - t3] + r2*r4*Cos[t2 - t4],
-(r1*r3*Sin[t1 - t3]) + r2*r4*Sin[t2 - t4],
r1*r2*Cos[t1 - t2] + r3*r4*Cos[t3 - t4],
-(r1*r2*Sin[t1 - t2]) - r3*r4*Sin[t3 - t4],
r1*r3*Sin[t1 - t3] - r2*r4*Sin[t2 - t4],
-(r1*r3*Sin[t1 - t3]) - r2*r4*Sin[t2 - t4],
r1*r2*Sin[t1 - t2] - r3*r4*Sin[t3 - t4],
r1*r2*Cos[t1 - t2] - r3*r4*Cos[t3 - t4]}

Now then, what does it MEAN for y1+y2 = r1 Cos[t1] + r2 Cos[t2] to be a
combination of those elements?  It might mean this:

coeff = Unique["q"] & /@ Range[Length[vec2]]
First[Solve[coeff.vec2 == r1 Cos[t1] + r2 Cos[t2], coeff]] // InputForm

{q1 -> -((q6*(r1^2 + r2^2 - r3^2 - r4^2))/
(r1^2 + r2^2 + r3^2 + r4^2)) -
(q5*(-r1^2 + r2^2 + r3^2 - r4^2))/
(r1^2 + r2^2 + r3^2 + r4^2) -
(q2*(-r1^2 + r2^2 - r3^2 + r4^2))/
(r1^2 + r2^2 + r3^2 + r4^2) -
(-(r1*Cos[t1]) - r2*Cos[t2])/
(r1^2 + r2^2 + r3^2 + r4^2) -
(q7*(r2*r3*Cos[t2 - t3] -
r1*r4*Cos[t1 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q3*(r2*r3*Cos[t2 - t3] +
r1*r4*Cos[t1 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q9*(r1*r3*Cos[t1 - t3] +
r2*r4*Cos[t2 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q16*(r1*r2*Cos[t1 - t2] -
r3*r4*Cos[t3 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q11*(r1*r2*Cos[t1 - t2] +
r3*r4*Cos[t3 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q4*(r2*r3*Sin[t2 - t3] -
r1*r4*Sin[t1 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q8*(r2*r3*Sin[t2 - t3] +
r1*r4*Sin[t1 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q14*(-(r1*r3*Sin[t1 - t3]) -
r2*r4*Sin[t2 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q13*(r1*r3*Sin[t1 - t3] -
r2*r4*Sin[t2 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q10*(-(r1*r3*Sin[t1 - t3]) +
r2*r4*Sin[t2 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q12*(-(r1*r2*Sin[t1 - t2]) -
r3*r4*Sin[t3 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^2) -
(q15*(r1*r2*Sin[t1 - t2] -
r3*r4*Sin[t3 - t4]))/(r1^2 + r2^2 +
r3^2 + r4^

But how useful is that?

Bobby Treat

-----Original Message-----
From: DrBob [mailto:majort at cox-internet.com]
To: mathgroup at smc.vnet.net
Subject: [mg34718] RE: [mg34687] Programming an algebraic experiment

First of all, spend a half hour putting that in Mathematica notation, as
you should have done in the first place... using Re[], Im[], and
Conjugate[] rather than real (), imag(), and conj().  Clarify whether
abs(s1)^2 means Abs[s1^2] or Abs[s1]^2.  (I suppose it doesn't matter.)

Then make a change of variables using a rule like

polarDefns={s1 -> E^(I*\[Theta]1)*r1, s2 -> E^(I*\[Theta]2)*r2,
s3 -> E^(I*\[Theta]3)*r3, s4 -> E^(I*\[Theta]4)*r4}

That is, if

vec = {
Abs[s1^2] + Abs[s2^2] + Abs[s3^2] + Abs[s4^2 ],
-Abs[s1^2] + Abs[s2^2] - Abs[s3^2] + Abs[s4^2],
Re[s2*conj[s3] + s1 conj[s4] ],
Im[ s2*conj[s3] - s1*conj[s4]],
- Abs(s1)^2 + Abs(s2)^2 + Abs(s3)^2 - Abs(s4)^2,
Abs(s1)^2 + Abs(s2)^2 - Abs(s3)^2 - Abs(s4)^2,
real( s2*conj(s3) - s1*conj(s4) ),
imag( s2*conj(s3) + s1*conj(s4) ),
real( s2*conj(s4) + s1*conj(s3) ),
imag( s2*conj(s4) - s1*conj(s3) ),
real( s1*conj(s2) + s3*conj(s4) ),
imag( conj(s1)*s2 + conj(s3)*s4 ),
imag( conj(s2)*s4 + s1*conj(s3) ),
imag( conj(s2)*s4 - s1*conj(s3) ),
imag( s1*conj(s2) - s3*conj(s4) ),
real( s1*conj(s2) - s3*conj(s4) )
};

(this has been partially tamed) then after you've fixed all the
notation, form

polarVec=vec/.polarDefns

to put it all in polar coordinates.  That will simplify things a lot,
eliminating Conjugate, Re, and Im at the cost of introducing Sin and
Cos.

Then... what do you want?  y1 + y2 to be a linear combination of the
elements of that vector?  Well, in a sense, that's entirely trivial.  y1
+ y2, being real, is in the linear span of ANY single non-zero real
number, so if any of the elements (they're all real) are non-zero you're
in bidness.  (Most of them are non-zero if the si are not zero.)

Until you make the question clear, though, it can't have a meaningful

Bobby Treat

-----Original Message-----
From: riefler at iwt.uni-bremen.de [mailto:riefler at iwt.uni-bremen.de]
To: mathgroup at smc.vnet.net
Subject: [mg34718] [mg34687] Programming an algebraic experiment

Hi

Given 4 complex numbers S1, S2, S3 and S4 with Si = xi + i*yi,
i=1,2,3,4.

These 4 numbers are the basis for the following 16 eqn.s:

S11 = 1/2 * ( abs(S1)^2 + abs(S2)^2 + abs(S3)^2 + abs(S4)^2 );
S12 = 1/2 * ( - abs(S1)^2 + abs(S2)^2 - abs(S3)^2 + abs(S4)^2 );
S13 = real( S2*conj(S3) + S1*conj(S4) );
S14 = imag( S2*conj(S3) - S1*conj(S4) );
S21 = 1/2 * ( - abs(S1)^2 + abs(S2)^2 + abs(S3)^2 - abs(S4)^2  );
S22 = 1/2 * (  abs(S1)^2 + abs(S2)^2 - abs(S3)^2 - abs(S4)^2 );
S23 = real( S2*conj(S3) - S1*conj(S4) );
S24 = imag( S2*conj(S3) + S1*conj(S4) );
S31 = real( S2*conj(S4) + S1*conj(S3) );
S32 = imag( S2*conj(S4) - S1*conj(S3) );
S33 = real( S1*conj(S2) + S3*conj(S4) );
S34 = imag( conj(S1)*S2 + conj(S3)*S4 );
S41 = imag( conj(S2)*S4 + S1*conj(S3) );
S42 = imag( conj(S2)*S4 - S1*conj(S3) );
S43 = imag( S1*conj(S2) - S3*conj(S4) );
S44 = real( S1*conj(S2) - S3*conj(S4) );

"abs" stands for the absolute value and "conj" for the complex
conjugate value of the Si.

Now my aim is to find any combination - independent how long - with
and between these Sii to get the following result:

K=y1+y2

Now my question to you is:
How can I instruct Mathematica that it will look for an answer?

I want to see Mathematica that it is carried out as much as possible
combinations, simplify these combinations algeabraically and then
compare the simplified solution with K.

Thank you

Norbert

```

• Prev by Date: RE: Programming an algebraic experiment
• Next by Date: Re: eliminate some characters inside a file
• Previous by thread: RE: Programming an algebraic experiment
• Next by thread: Re: Re: Pb Limit ArcTan to : - Infinity