2

I am trying to solve a coordinate transformation problem which can be reduced to determining six parameters x1, x2...x6 in terms of two variable (phi and theta) satisfying the eleven equations (all might not be independent) having few replacements. I tried to use the function "Reduce", but not getting any output at all. Will appreciate any help. Thanks

Reduce[x1*x4 + x2*x5 + x3*x6 == 0 && 
        x1*Sin[theta]*Cos[phi] + x2*Sin[theta]*Sin[phi] + 
          x3*Cos[phi] == 0 && 
        x4*Sin[theta]*Cos[phi] + x5*Sin[theta]*Sin[phi] + 
          x6*Cos[phi] == 0 && x1*x1 + x2*x2 + x3*x3 == 1 && 
        x4*x4 + x5*x5 + x6*x6 == 1  && 
        x1 /. {theta -> 0, phi -> 0} == 1 && 
        x2 /. {theta -> 0, phi -> 0} == 0 && 
       x3 /. {theta -> 0, phi -> 0} == 0 && 
      x4 /. {theta -> 0, phi -> 0} == 0 && 
     x5 /. {theta -> 0, phi -> 0} == 1 && x6 /. {theta -> 0, 
    phi -> 0} == 0, {x1, x2, x3, x4, x5, x6}]
user49535
  • 1,225
  • 6
  • 9
  • Your question is unclear to me. How about theta = 0; phi = 0; Reduce[ x1*x4 + x2*x5 + x3*x6 == 0 && x1*Sin[theta]*Cos[phi] + x2*Sin[theta]*Sin[phi] + x3*Cos[phi] == 0 && x4*Sin[theta]*Cos[phi] + x5*Sin[theta]*Sin[phi] + x6*Cos[phi] == 0 && x1*x1 + x2*x2 + x3*x3 == 1 && x4*x4 + x5*x5 + x6*x6 == 1, {x1, x2, x3, x4, x5, x6}]? – user64494 Feb 11 '21 at 13:07
  • No. I want them in terms of theta and phi. Setting them equal to zero would become a special case. However, with them to be zero, x1=x5=1 and x2=x3=x4=x6=0. – user49535 Feb 11 '21 at 13:10

1 Answers1

2

If I correctly understand it,

sol=Reduce[x1*x4 + x2*x5 + x3*x6 == 0 &&  x1*Sin[theta]*Cos[phi] + x2*Sin[theta]*Sin[phi] + 
x3*Cos[phi] == 0 &&  x4*Sin[theta]*Cos[phi] + x5*Sin[theta]*Sin[phi] + x6*Cos[phi] == 0 && 
x1*x1 + x2*x2 + x3*x3 == 1 && x4*x4 + x5*x5 + x6*x6 == 1, {x1, x2, x3, x4, x5, x6}]

does the job. It takes some time and the output is too long to be citted here.

Addition. If I correctly understand your point, then the output of (23 is found by trials)

Table[sol[[j]] /. {phi -> 0, theta -> 0}, {j, 1, 23}]

{False, False, False, False, False, False, False, False, False, (x1 == -1 || x1 == 1) && x2 == 0 && x3 == 0 && x4 == 0 && (x5 == -1 || x5 == 1) && x6 == 0, (x2 == -Sqrt[1 - x1^2] || x2 == Sqrt[1 - x1^2]) && x3 == 0 && (x4 == -Sqrt[1 - x1^2] || x4 == Sqrt[1 - x1^2]) && -1 + x1^2 != 0 && x5 == (x1 x2 x4)/(-1 + x1^2) && x6 == 0, False, False, False, False, False, False, False, False, False, False, False, False}

shows the tenth solution is it. That solution can be displayed by

sol[[10]]

Sin[theta] == 0 && (x1 == -1 || x1 == 1) && x2 == 0 && x3 == 0 && x4 == 0 && (x5 == -1 || x5 == 1) && x6 == 0 && Cos[phi] != 0

Addition 2.The following answers the latest explanation of her/his question by OP.

sol = Solve[x1[phi, theta]*x4[phi, theta] + x2[phi, theta]*x5[phi, theta] + 
 x3[phi, theta]*x6[phi, theta] == 0 &&  x1[phi, theta]*Sin[theta]*Cos[phi] + 
 x2[phi, theta]*Sin[theta]*Sin[phi] + x3[phi, theta]*Cos[phi] == 
0 && x4[phi, theta]*Sin[theta]*Cos[phi] + 
 x5[phi, theta]*Sin[theta]*Sin[phi] + x6[phi, theta]*Cos[phi] == 
0 && x1[phi, theta]*x1[phi, theta] + 
 x2[phi, theta]*x2[phi, theta] + x3[phi, theta]*x3[phi, theta] == 
1 && x4[phi, theta]*x4[phi, theta] + 
 x5[phi, theta]*x5[phi, theta] + x6[phi, theta]*x6[phi, theta] == 
1 , {x1[phi, theta], x2[phi, theta], x3[phi, theta],x4[phi, theta], x5[phi, theta], x6[phi, theta]}]

This produces a very long output, fo example,

LeafCount[First[sol]]

8031

and a warning.

user64494
  • 26,149
  • 4
  • 27
  • 56
  • Yes, I also get the o/p with this set of equations. But with large number of solutions. If the remaining six Replacements are included, there will be one solution left. That is what I want. – user49535 Feb 11 '21 at 13:32
  • Then continue %/.{phi -> 0, theta -> 0} and this results in ((x1 == -1 || x1 == 1) && x2 == 0 && x3 == 0 && x4 == 0 && (x5 == -1 || x5 == 1) && x6 == 0) || ((x2 == -Sqrt[1 - x1^2] || x2 == Sqrt[1 - x1^2]) && x3 == 0 && (x4 == -Sqrt[1 - x1^2] || x4 == Sqrt[1 - x1^2]) && -1 + x1^2 != 0 && x5 == (x1 x2 x4)/(-1 + x1^2) && x6 == 0). – user64494 Feb 11 '21 at 13:38
  • not clear. no terms involving phi theta not possible. – user49535 Feb 11 '21 at 15:09
  • Then follow that. Sorry, I'm busy now. – user64494 Feb 11 '21 at 15:43
  • 1
    I hope I get your point at last. – user64494 Feb 11 '21 at 17:47
  • Thanks. Yes, more or less it is what I want. However, not able to understand why the solution comes with a condition that Sin[theta] is zero. I want the variables x1,...x6 to be evaluated in terms of theta and phi. Then choose one among possible solutions which reduce x1=1, x2=0 etc. for phi and theta to be 0. Will appreciate any suggestion on this. – user49535 Feb 12 '21 at 07:19
  • managed to get the answer with a paper and pen, faster than Mathematica !! x1=Cos[theta]Cos[phi], x2=Sin[phi]Cos[theta], x3=-Sin[theta], x4=-Sin[phi], x5=Cos[phi], x6=0. Thanks Everyone.. – user49535 Feb 12 '21 at 09:32