"Izaak " <izaakd@vt.edu> wrote in message <k83f7k$gbm$1@newscl01ah.mathworks.com>...
>..... I need to solve for two other angles (beta and alpha), using theta from 0 to 360. I then need to use these angles to solve for the angular velocity and angular acceleration. It will solve for the right beta and alpha, however, when I add the equations for angular velocity, it says no explicit solution can be found. What I have so far (note that I'm only using 30deg right now, not the range of 0 to 360 needed):
>
> for i = (pi/6)
> syms alpha beta wbc wab
> [solutions_alpha, solutions_beta, solutions_wbc, solutions_wac] =...
> solve(0.2*sin(beta) == 0.19 + 0.08*cos(i)  0.24*cos(alpha),...
> 0.2*cos(beta) == 0.07 + 0.08*sin(i) + 0.24*sin(alpha),...
> wbc*0.2*cos(beta) == 1.2*sin(i) +wab*0.24*sin(alpha),...
> wbc*0.2*sin(beta) + wab*0.24*cos(alpha) == 1.2*cos(i),'PrincipalValue', true)
> end
        
There are always two solutions with angles ranging from pi to pi radians for your first two equations. I think the symbolic answer would be fairly complicated. As the next best thing, here is the solution as matlab code in terms of general parameter values.
Let a = 0.2, b = 0.24, p = 0.19+0.08*cos(i), and q = 0.07+0.08*sin(i). Then your equations can be expressed in terms of general a, b, p, and q parameters as:
a*sin(beta)+b*cos(alpha) = p
a*cos(beta)b*sin(alpha) = q
The two solutions for alpha and beta are given by the matlab code:
t1 = sqrt(4*a^2*b^2(p^2+q^2a^2b^2)^2);
t2 = p^2+q^2a^2+b^2;
t3 = p^2+q^2+a^2b^2;
alpha1 = atan2(b*(q*t2p*t1),b*(p*t2q*t1));
beta1 = atan2(a*( p*t3+q*t1),a*(q*t3p*t1));
alpha2 = atan2(b*(q*t2+p*t1),b*(p*t2+q*t1));
beta2 = atan2(a*( p*t3q*t1),a*(q*t3+p*t1));
For solutions to exist you must of course have 4*a^2*b^2(p^2+q^2a^2b^2)^2 >= 0. Also you must have a and b nonzero for uniqueness.
After obtaining alpha and beta the other two equations are linear in wab and wbc, so it is easy to then compute them. You don't really need the symbolic toolbox for doing this for various values of i. You do however need some criterion for selecting which of these two solutions you wish to use in each case.
Roger Stafford
