Question: Extract the argument of a trigonometric function

Regards,

I have a very large equation which has an arctan(x,y). I need to be able to extract the arguments x,y and assign them in some variables.

I have tried the solution given here.

Unfortunately, that solution only works for constants, not equations.

For example, if I use the proc given in there with arctan(10,11) it works. But if I use something like arctan(x+1,sqrt(x+u)) it doesn't return anything at all.

Hope you can help me.

 

Thanks in advance.

 

 

P.S. This is the code for the equation I need to get the arguments:

 

-(1/2)*(arctan((-sin(theta)*(p1dm-k1*(p1-p1d))^2+2*sin(theta)*p1*(p1dm-k1*(p1-p1d))+(2*(p1dm-k1*(p1-p1d)))*(p2dm-k2*(p2-p2d))*cos(theta)-(2*(p1dm-k1*(p1-p1d)))*p2*cos(theta)+(p2dm-k2*(p2-p2d))^2*sin(theta)+p2^2*sin(theta)-sin(theta)*p1^2-(2*(p2dm-k2*(p2-p2d)))*p2*sin(theta)-(2*(p2dm-k2*(p2-p2d)))*cos(theta)*p1+2*p2*cos(theta)*p1+(4*(p2dm-k2*(p2-p2d)))*L-4*p2*L+4*sin(theta)*L^2)/(p1^2-4*p1*L*cos(theta)-2*p1*(p1dm-k1*(p1-p1d))-4*p2*L*sin(theta)+(p1dm-k1*(p1-p1d))^2+(4*(p1dm-k1*(p1-p1d)))*L*cos(theta)+(p2dm-k2*(p2-p2d))^2+p2^2+(4*(p2dm-k2*(p2-p2d)))*L*sin(theta)-(2*(p2dm-k2*(p2-p2d)))*p2+4*L^2), (cos(theta)*p1^2-2*p1*(p1dm-k1*(p1-p1d))*cos(theta)-2*p1*sin(theta)*(p2dm-k2*(p2-p2d))+2*p1*sin(theta)*p2+(2*(p2dm-k2*(p2-p2d)))*(p1dm-k1*(p1-p1d))*sin(theta)-2*p2*(p1dm-k1*(p1-p1d))*sin(theta)+cos(theta)*(p1dm-k1*(p1-p1d))^2-cos(theta)*p2^2-cos(theta)*(p2dm-k2*(p2-p2d))^2+2*cos(theta)*(p2dm-k2*(p2-p2d))*p2+4*L^2*cos(theta)-4*p1*L+(4*(p1dm-k1*(p1-p1d)))*L)/(p1^2-4*p1*L*cos(theta)-2*p1*(p1dm-k1*(p1-p1d))-4*p2*L*sin(theta)+(p1dm-k1*(p1-p1d))^2+(4*(p1dm-k1*(p1-p1d)))*L*cos(theta)+(p2dm-k2*(p2-p2d))^2+p2^2+(4*(p2dm-k2*(p2-p2d)))*L*sin(theta)-(2*(p2dm-k2*(p2-p2d)))*p2+4*L^2))-theta)*(2*p1*(p1dm-k1*(p1-p1d))-(2*(p1dm-k1*(p1-p1d)))*L*cos(theta)+2*p1*L*cos(theta)+(2*(p2dm-k2*(p2-p2d)))*p2-(2*(p2dm-k2*(p2-p2d)))*L*sin(theta)+2*p2*L*sin(theta)-(p1dm-k1*(p1-p1d))^2-p1^2-(p2dm-k2*(p2-p2d))^2-p2^2)/(T*(cos(theta)*(p2dm-k2*(p2-p2d))-p2*cos(theta)-(p1dm-k1*(p1-p1d))*sin(theta)+p1*sin(theta)));

 

 

Please Wait...