Prev: Changing uitable data
Next: Euclidean distance
From: Walter Roberson on 25 May 2010 17:22 Roger Stafford wrote: > - - - - - - - Walter, this morning I continued to have trouble showing > that a phi and beta solution could always be found, given any delta, > psi, and omega, but finally I stumbled onto a counterexample! If you > set delta = 20 degrees, omega = 240 degrees, and psi = 175 degrees, then > no matter what phi and beta are, the argument, x, of acosd above never > climbs above about .65, so that no solution is possible. Continuing this out of curiousity, knowing that it wasn't of use to the original poster: Solving for phi and beta, Maple finds 37 solutions, _one_ of which has beta as a free parameter. That full expression is rather long unless you do sub-expression elimination. I include the simplified version below, for no good reason :) The expression does generate a complex number for the specific case you indicated; it appears to involve roughly -Pi/2*I . The other 36 solutions appeared to involve +/- Pi*I and are all complex numbers for your sample angles. Note that the below is coded for radians. T := simplify(solve(1 = sin(delta)*sin(phi)*cos(beta) - sin(delta)*cos(phi)*sin(beta)*cos(psi) + cos(delta)*cos(phi)*cos(beta)*cos(omega) + cos(delta)*sin(phi)*sin(beta)*cos(psi)*cos(omega) + cos(delta)*sin(beta)*sin(psi)*sin(omega), [phi, beta])); codegeneration[optimize](T); t1 = cos(delta), t2 = t1^2; t3 = cos(omega); t4 = t3^2; t5 = t4*t2; t6 = cos(psi); t7 = t6^2; t11 = RootOf(1 - 4*cos(delta)*sin(beta)*sin(psi)*sin(omega) + cos(beta)^4 - 6*cos(delta)^2*cos(psi)^2 + cos(delta)^4 + 8*cos(delta)^2*cos(beta)^2*cos(omega)^2 - 8*cos(delta)^2*cos(beta)^2*cos(psi)^2*cos(omega)^2 + 4*cos(delta)^2*cos(beta)^4*cos(psi)^2*cos(omega)^2 - 2*cos(delta)^4*cos(beta)^4*cos(psi)^2*cos(omega)^2 - 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(omega)^2 - 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(psi)^2 + 2*cos(delta)^4*cos(psi)^2*cos(omega)^2 + 6*cos(delta)^2 - 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega) - 6*cos(delta)^2*cos(beta)^2 - 2*cos(delta)^2*cos(beta)^4*cos(omega)^2 + 2*cos(delta)^4*cos(beta)^2*cos(omega)^2 + cos(delta)^4*cos(beta)^4*cos(omega)^4 - 2*cos(beta)^2 - 2*cos(delta)^4*cos(beta)^2*cos(omega)^4 + 8*cos(delta)^2*cos(beta)^2*cos(psi)^2 - 2*cos(delta)^2*cos(beta)^4*cos(psi)^2 + 2*cos(delta)^4*cos(beta)^2*cos(psi)^2 - 2*cos(delta)^4*cos(beta)^2*cos(psi)^4 + cos(delta)^4*cos(beta)^4*cos(psi)^4 - 2*cos(delta)^4*cos(psi)^2 + cos(delta)^4*cos(psi)^4 + (cos(beta)^4 + cos(psi)^4 + 4*cos(delta)^2*cos(beta)^2*cos(psi)^2*cos(omega)^2 - 4*cos(delta)^2*cos(beta)^4*cos(psi)^2*cos(omega)^2 + 4*cos(delta)^4*cos(beta)^4*cos(psi)^2*cos(omega)^2 + 2*cos(delta)^2*cos(beta)^4*cos(omega)^2 - 2*cos(delta)^4*cos(beta)^4*cos(omega)^2 + cos(delta)^4*cos(beta)^4*cos(omega)^4 - 4*cos(delta)^2*cos(beta)^2*cos(psi)^2 + 4*cos(delta)^2*cos(beta)^4*cos(psi)^2 + 2*cos(delta)^4*cos(beta)^2*cos(psi)^2 - 2*cos(delta)^4*cos(beta)^2*cos(psi)^4 + cos(delta)^4*cos(beta)^4*cos(psi)^4 + cos(delta)^4*cos(psi)^4 + 2*cos(beta)^2*cos(psi)^2 - 2*cos(beta)^2*cos(psi)^4 - 2*cos(beta)^4*cos(psi)^2 + cos(beta)^4*cos(psi)^4 - 2*cos(delta)^2*cos(psi)^4 + 4*cos(delta)^2*cos(beta)^2*cos(psi)^4 - 2*cos(delta)^2*cos(beta)^4*cos(psi)^4 - 2*cos(delta)^4*cos(beta)^4*cos(psi)^2 + 2*cos(delta)^2*cos(psi)^4*cos(omega)^2 - 2*cos(delta)^4*cos(psi)^4*cos(omega)^2 + cos(delta)^4*cos(psi)^4*cos(omega)^4 - 2*cos(delta)^2*cos(beta)^4 + cos(delta)^4*cos(beta)^4 - 4*cos(delta)^2*cos(beta)^2*cos(psi)^4*cos(omega)^2 + 2*cos(delta)^2*cos(beta)^4*cos(psi)^4*cos(omega)^2 - 4*cos(delta)^4*cos(beta)^2*cos(psi)^2*cos(omega)^2 + 2*cos(delta)^4*cos(beta)^2*cos(psi)^2*cos(omega)^4 + 4*cos(delta)^4*cos(beta)^2*cos(psi)^4*cos(omega)^2 - 2*cos(delta)^4*cos(beta)^2*cos(psi)^4*cos(omega)^4 - 2*cos(delta)^4*cos(beta)^4*cos(psi)^2*cos(omega)^4 - 2*cos(delta)^4*cos(beta)^4*cos(psi)^4*cos(omega)^2 + cos(delta)^4*cos(beta)^4*cos(psi)^4*cos(omega)^4)*_Z^4 + (8*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)^3*sin(psi)*cos(beta)^2*cos(omega)^2 + 4*cos(psi)^3*sin(delta)*sin(beta) - 4*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)*sin(psi)*cos(beta)^4 - 8*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^2 - 4*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)*sin(psi) + 8*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)*sin(psi) *cos(beta)^2 + 4*cos(psi)*sin(delta)*cos(delta)*sin(psi)*sin(omega)*cos(beta)^4 - 4*cos(psi)^3*sin(delta)*sin(beta)*cos(beta)^2 - 4*cos(psi)*sin(omega)*sin(delta)*cos(delta)^3*sin(psi)*cos(beta)^4 + 4*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^4 + 4*cos(psi)*sin(delta)*sin(beta)*cos(beta)^2 + 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^2 + 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^4*cos(omega)^2 - 4*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2 - 4*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)^3*sin(psi)*cos(omega)^2 + 4*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega) - 4*cos(psi)^3* sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2*cos(omega)^2 + 4*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2*cos(omega)^2 - 4*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2 - 4*cos(psi)*sin(delta)*cos(delta)*sin(psi)*sin(omega)*cos(beta)^2 + 4*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2 - 4*cos(psi)^3*sin(omega)*sin(delta)*cos(delta)^3*sin(psi)*cos(beta)^4*cos(omega)^2 + 4*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2*cos(omega)^2 - 4*cos(psi)*sin(omega)*sin(delta)*cos(delta)^3*sin(psi)*cos(beta)^2*cos(omega)^2)*_Z^3 + (6*cos(psi)^2 - 2*cos(beta)^4 - 4*cos(delta)^2*cos(beta)^2*cos(omega)^2 + 8*cos(delta)^2*cos(beta)^2*cos(psi)^2*cos(omega)^2 - 4*cos(delta)^2*cos(beta)^4*cos(psi)^2*cos(omega)^2 + 4*cos(delta)^4*cos(beta)^4*cos(psi)^2*cos(omega)^2 - 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(psi)^2*cos(omega)^2 + 12*cos(delta)*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(psi)^2 + 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(omega)^2 - 12* cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(psi)^2 + 8*cos(delta)^4*cos(psi)^2*cos(omega)^2 - 2*cos(delta)^4*cos(psi)^2*cos(omega)^4 + 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2*cos(psi)^2*cos(omega)^2 + 2*cos(delta)^4*cos(beta)^4*cos(omega)^2 - 2*cos(delta)^4*cos(beta)^4*cos(omega)^4 + 2*cos(beta)^2 + 2*cos(delta)^4*cos(beta)^2*cos(omega)^4 - 4*cos(delta)^2*cos(beta)^2*cos(psi)^2 + 4*cos(delta)^2*cos(beta)^4*cos(psi)^2 + 12*cos(delta)^4*cos(beta)^2*cos(psi)^2 - 12*cos( delta)^4*cos(beta)^2*cos(psi)^4 + 6*cos(delta)^4*cos(beta)^4*cos(psi)^4 - 6*cos(delta)^4*cos(psi)^2 + 6*cos(delta)^4*cos(psi)^4 - 8*cos(beta)^2*cos(psi)^2 + 2*cos(beta)^4* cos(psi)^2 - 6*cos(delta)^2*cos(psi)^4 + 12*cos(delta)^2*cos(beta)^2*cos(psi)^4 - 6*cos(delta)^2*cos(beta)^4*cos(psi)^4 - 6*cos(delta)^4*cos(beta)^4*cos(psi)^2 + 4*cos(delta)^2*cos(psi)^4*cos(omega)^2 - 6*cos(delta)^4*cos(psi)^4*cos(omega)^2 + 12*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(psi)^2 - 4*cos(delta)*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2 - 2*cos(delta)^4*cos(beta)^2 + 2*cos(delta)^2*cos(beta)^4 - 4*cos(delta)^2*cos(omega)^2*cos(psi)^2 - 8*cos(delta)^2*cos(beta)^2*cos(psi)^4*cos(omega)^2 + 4*cos(delta)^2*cos(beta)^4*cos(psi)^4*cos(omega)^2 - 12*cos(delta)^4*cos(beta)^2*cos(psi)^2*cos(omega)^2 + 12*cos(delta)^4*cos(beta)^2*cos(psi)^4*cos(omega)^2 + 2*cos(delta)^4*cos(beta)^4*cos(psi)^2*cos(omega)^4 - 6*cos(delta)^4*cos(beta)^4*cos(psi)^4*cos(omega)^2 + 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2 - 12*cos(delta)*sin(beta)*sin(psi)*sin(omega)*cos(psi)^2)*_Z^2 + ( - 12*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2 - 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega) - 4*cos(psi)*sin(delta)*cos(delta)*sin(psi)*sin(omega)*cos(beta)^4 - 8*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2*cos(omega)^2 + 8*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2*cos(omega)^2 + 16*cos(psi)*sin(delta)*cos(delta)*sin(psi)*sin(omega)*cos(beta)^2 + 12*cos(psi)^3*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2 + 4*cos(psi)*sin(delta)*sin(beta) - 8*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2 + 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(omega)^2 + 4*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^4 + 4*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2*cos(beta)^2*cos(omega)^2 + 4*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega) - 4*cos(psi)*sin(delta)*sin(beta)*cos(beta)^2 + 12*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2 - 12*cos(psi)*sin(delta)*sin(beta)*cos(delta)^2*cos(omega)^2 - 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^4*cos(omega)^2 - 12*cos(psi)*sin(delta)*cos(delta)*sin(psi)*sin(omega) + 4*cos(psi)*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^2 - 8*cos(psi)^3*sin(delta)*cos(delta)^3*sin(psi)*sin(omega)*cos(beta)^2)*_Z + 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(omega)^2 + 4*cos(delta)^3*sin(beta)*sin(psi)*sin(omega)*cos(psi)^2 + 4*cos(delta)*sin(beta)*sin(psi)*sin(omega)*cos(beta)^2 - 6*cos(delta)^2*cos(omega)^2 + 4*cos(delta)^2*cos(omega)^2*cos(psi)^2 - 2*cos(omega)^2*cos(delta)^4 + cos(omega)^4*cos(delta)^4); t12 = t11^2; t13 = t7*t12; t14 = cos(beta); t15 = t14^2; t19 = t11*t1*t6; t20 = sin(delta); t21 = sin(psi); t22 = t21*t20; t23 = sin(omega); t31 = t2*t12; t34 = t4*t7; t36 = t7*t15; t38 = 1 + 2*t7*t5 - t7*t2 + t13 - t15*t13 + t15*t12 - 2*t23*t22*t19 + 2*t15*t23*t22*t19 - t4*t15*t31 - t34*t31 + t36*t31; t39 = sin(beta); t44 = t15*t2; t57 = - 2*t23*t21*t39*t1 - 2*t34*t44 + t2 - t5 - t15 - t7*t31 + t4*t36*t31 + t4*t44 + t7*t44 - t15*t31 + 2*t39*t11*t20*t6; t63 = t21*t6; t64 = t1*t23; t68 = t11*t20; t77 = arctan( - 1/2/( - t6*t39 + t64*t63 - t15*t64*t63 - t15*t68 - t7*t68 + t36*t68)/t1/t3*(t38 + t57), t11); |