# How do I simplify the expanded equation with syms symbols

2 views (last 30 days)
Rohan Dey on 29 Oct 2022
Answered: Gokul Nath S J on 26 May 2023
syms s [1 6]; syms c [1 6]; syms a2 a3 d3 d4; syms R_1 [1 3];syms R_2 [1 3];syms R_3 [1 3] ;
syms Px Py Pz;
syms theta1 theta2 theta3 theta4 theta5 theta6;
syms c23 s23;
T_01_14 = a2*c2 - Py*s1 - Px*c1 + a3*c23 - d4*s23
T_01_34 = -Pz - c23*d4 - a2*s2 - a3*s23
T_01_24 = Py*c1 - d3 - Px*s1
eqT_01 = T_01_14^2 + T_01_34^2 + T_01_24^2
eqT_01 = subs(eqT_01,[c1 s1 c2 s2 c3 s3 c23 s23], [cos(theta1) sin(theta1) cos(theta2) sin(theta2) cos(theta3) sin(theta3) cos(theta2)*cos(theta3)-sin(theta2)*sin(theta3) cos(theta2)*sin(theta3)+sin(theta2)*cos(theta3)])
eqT_01 = subs(eqT_01,[cos(theta1) sin(theta1) cos(theta2) sin(theta2) cos(theta3) sin(theta3)], [c1 s1 c2 s2 c3 s3])
eqT_01 = expand(eqT_01)
eqT_01 = simplify(eqT_01)
I am trying to simplify the final eqT_01 equation but I am not able to get it to simplify.
My goal is to find the equation:
by squaring these 3 equations:
(which in my code are T_01_14, T_01_34 and T_01_24)
If you know a better way, please let me know how,
Thank you

Gokul Nath S J on 26 May 2023
Hi Rohan,
with regards,
Gokul Nath S J