Trigonometric system of equations

Eduardo Kopik

New member
Joined
Jun 30, 2020
Messages
5
Hello, I've come across this system equations that I just can't solve. We are supposed to be using MATLAB to solve this kind of stuff in our class, but the software is just not able to solve this either.

The equations are:
(0.6)*s1 + (0.707)*(s1 - c1*s2)*(d3 + 0.3) == x
(-0.6)*c1 + (0.707)*(-c1 + s1*s2)*(d3 + 0.3) == y
(0.707)*c2*(d3+0.3) + 0.3 == z

with s1 standing for Sin(theta1)

I need to write these in terms of theta1, theta2 and d3 (with x,y,z being knowns)


Anyone here knows how to solve this, or if it is indeed unsolvable? (this is just the last bit of the question, so if it is unsolvable, I screwed up soemthing earlier on)
 
Please write the equations out properly, so we can be sure what they are. Are c1 and c2 cosines, or constants? Is 0.707 meant to be [MATH]\sqrt{2}/2[/MATH]?

And when you say MATLAB can't solve it, what does it actually say?
 
Please write the equations out properly, so we can be sure what they are. Are c1 and c2 cosines, or constants? Is 0.707 meant to be [MATH]\sqrt{2}/2[/MATH]?

And when you say MATLAB can't solve it, what does it actually say?
Dr. Peterson

(0.6)*sin(th1) + (0.707)*(sin(th1) - cos(th1)*sin(th2))*(d3 + 0.3) = x
(-0.6)*cos(th1) + (0.707)*(-cos(th1) + sin(th1)*sin(th2))*(d3 + 0.3) = y
(0.707)*cos(th2)*(d3+0.3) + 0.3 = z

with th1 being a variable, and th2 being another.

0.707 comes from cos(45) (so yes) but for this question in particular, rounding is ok.

MATLAB gives a bunch of error messages, I run this script:
syms x y z th1 th2 d3;
E1 = (0.6)*sin(th1) + (0.707)*(sin(th1) - cos(th1)*sin(th2))*(d3 + 0.3) == x;
E2 = (-0.6)*cos(th1) + (0.707)*(-cos(th1) + sin(th1)*sin(th2))*(d3 + 0.3) == y;
E3 = (0.707)*cos(th2)*(d3+0.3) + 0.3 == z;


[th1, th2, d3] = solve(E1,E2,E3 ,th1, th2, d3);


it takes a long time to run, and eventually crashes.
I tried declaring c1 and s1 as variables (instead of cosine/sine of the variables) and then adding equations linking s1 = sin(asin(c1))
but that gives me a vector with *extremely* long entries in each row as the answer to each variable.


Also what does = = mean?
Jomo, it is just "=". I had it written like that because of matlab
 
s1 = sin(asin(c1)) is not an identity. Rather sin(asin(c1))= c1. Even that is unusual.
 
s1 = sin(asin(c1)) is not an identity. Rather sin(asin(c1))= c1. Even that is unusual.
That was a typo: I meant so say sin(acos(c1) = s1
but it does not matter, because that was just a different way of typing it into MATLAB.

The problem is still: how to solve that system of equations.
 
Well thanks but this does not make any sense to me.
Those equations contain x y and z as variables, the solution to the angles and d3 should be functions of x y and z.
How would this program even finding numerical values for those variables?
Yes. I misread your post. I immediately deleted my post as irrelevant but apparently not before you saw it. Sorry. Maple can't solve it either.
 
I don't think it can be solved analytically(maybe Matlab can do it), but if you have x,y,z numeric values then you can find th1,th2 ,d3 using numerical analysis .Starting from d3= 0 or something then put that in your equations find th1,th2 then from those find a new d3 then using that d3 to find two new values of th1,th2 continue this process until the difference between the old and new variables is small enough.
 
Top