Items tagged with trigonometry


I was playing around with the example "Simple Inverse Kinematic Problem" and found somethings to be odd:

the angular motion seems to be calculated from between pi and negative pi and this has some effects when using position block to move a joint.

the original angular displacement is graph below

the angular displacement after ik calculations have been performed:

if you run the simulation it seems to copy and mirror the input pendulum, however if you disable one of the IK solutions you see that infact its motion isn't like the input.

this becomes more prevailant when you use a position block to force rotation on a joint instead of using the 'prescribed rotation' blocks that comes with the example.

My question then:
why does this happen?
how do I work around this?

the importance that the motion is follow precisely becomes more prevailent when we want to extract other values such as vel, accel, torque. they are incorrect and very jumpy. Also simply put the angular displacement is wrong, how do I fix it?

(side note: I'm thinking  it has to do with the way arctan is calculated in maple limits it to stay in range -pi to pi
"For real arguments x, y, the two-argument function arctan(y, x), computes the principal value of the argument of the complex number x+Iy, so −π < arctan(y,x) ≤ π." from



I have to solve numerical trogonometric equations such as :

But, after, I would like to keep only the solution defined in a specific interval such as : [0,Pi]

1) Is there a possibility to define options with the function solve to limit the solutions belonging to a specific interval ?

2) Otherwise, may you help me to make an systematic process to choose a solution in a specific interval ?

Thank you for your help


Hello Everyone


I have an expression which I would like to integrate from x=0 to x=L. The expression is 



Here, beta, m, alpha are constant. However I want the result in terms of these quantities.


I will be grateful if you could help mw in this regard.

Thanks a lot.


I would like to solve this equation :

tan(gamma0(t)) = tan(gamma[1](t)-theta[1](t)-psi[1](t)

I would like to select the solution of arctan by assuming the domain of variation of some variables. In my case, if -Pi/2 < gamma[1](t) - theta[1](t) - psi[1](t) < Pi/2, the arctan gives only one solution.

Can you help me to solve this equation ? 

eq:=tan(gamma0(t)) = tan(gamma[1](t)-theta[1](t)-psi[1](t))
solve(eq,gamma0(t)) assuming -Pi/2 < gamma[1](t) - theta[1](t) - psi[1](t) < Pi/2

I guess that I don't use properly the "assume" function.

The result that I would like to obain is quiet simple :

gamma0(t)) = gamma[1](t)-theta[1](t)-psi[1](t)

Thanks a lot for your help



I have still some difficulties to conduct some specific trigonometric simplications but which are very common in mechanism study.

The equations are in the form :

sin(gamma0(t))*cos(beta0(t)) = -(sin(psi[1](t))*cos(theta[1](t))*cos(gamma[1](t))+sin(psi[1](t))*sin(theta[1](t))*sin(gamma[1](t))-cos(theta[1](t))*cos(psi[1](t))*sin(gamma[1](t))+cos(psi[1](t))*sin(theta[1](t))*cos(gamma[1](t)))*cos(beta[1](t))

I would like to obtain this equation after simplifications :

sin(gamma0(t))*cos(beta0(t)) = cos(beta[1](t))*sin(gamma[1](t)-theta[1](t)-psi[1](t))

I try to make a procedure to automatize the simplification of this kind of trigonometric equation.

Strangely, I noticed that the simplification is done only if there is a minus before the combine function. The simplification works but the result is wrong because i didn't obtain the good sign.

For you information, I try to make these simplifications with MMA and the FullSimplify function of MMA gives directly the expected result that is to say :

I'm sure that it shoud exist a good way to conduct this kind of simplications in Maple.

Can you help me to correct my procedure so to obtain the good result and be enough general, adaptative ? 

Code here and attached in this post :

constants:= ({constants} minus {gamma})[]:
`evalf/gamma`:= proc() end proc:
`evalf/constant/gamma`:= proc() end proc:
Angular Constraint equations
eq_liaison:=sin(gamma0(t))*cos(beta0(t)) = -(sin(gamma[1](t))*sin(psi[1](t))*sin(theta[1](t))-sin(gamma[1](t))*cos(theta[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t))*cos(theta[1](t))+cos(gamma[1](t))*cos(psi[1](t))*sin(theta[1](t)))*cos(beta[1](t)); 
TrigoTransform2:= proc(Eq)
local S,S1,tt,pp,Eq2,ListVariables,ListVariablesMod,Subs,size,rhsEq2,lhsEq2;
#Construit une liste à plat#
ListVariables:=indets(Eq, function(identical(t)));
#Variables Changement#
print("Equation traitée=",Eq2): 
Eq2:=subs(Subs, Eq2);
print("Equation après subs=",Eq2): 
#Trigonometric transformations#
cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v), 
-sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(lhs(Eq2), size));
print("Equation lhsEq2 première analyse=",lhsEq2):
cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v), 
-sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(rhs(Eq2), size));
print("Equation rhsEq2 première analyse=",rhsEq2):
print("Equation lhsEq2=",lhsEq2):
end try;
print("Equation rhsEq2=",rhsEq2):
end try;
Eq2:= lhsEq2=rhsEq2;
#Variables Changement#
end proc:


Thanks a lot for your help.

I don't know if I am doing it right or not because Maple isn't solving the equation. The equation solution is x=2^(1/2).

Here I let a picture of which equation I want to solve and Maple's response.

Trigonometric Equation

So it looks like radians work.

Why does degrees fail and how do I get degrees work?

How do you guys like to access pi? Do you keep a symbol of it around in a random document to open?

Let A(x , 2 , -1) ,B(0, y , 1) ,C(3 , 4 , -2) , AB=AC and ABC is isosceles right triangle. Find x and y ?

I am attempting to plot an initial value problem in Maple 18.  I have my equation defined, as well as a general solution and two particular solutions at y(0)=3/4 and y(0)=1/2.  To graph, I entered the command


but instead of returning a graph, the software gave me the error message

Error, (in DEtools/DEplot/CheckDE) extra unknowns found: sinx

The Maple support site lists this as an unknown error, and as a new user, I'm not sure what to do.  What does this mean?



I have this kind of expression :


I would like to keep a sum like and simplify all the expressions of
the type $z+\bar{z}=2Re(Z)$


Thanks for your suggestion

True of False, Explain:

If ∏/2<θ<∏, Then cos θ/2<0

Find the value: P=sin(10)sin(30)sin(50)...sin(890) ?

How do you express sin(4x)^2 in terms of powers of cos(x) in Maple 17?

My question is in the title, here is simple example: 


I use formula of abridged multiplication (with help of "factor")


  (sin(a+b) - sin(a-b))(sin(a+b) + sin(a-b))

Then expand:

>expand(%, trig)


And all I whant now is to use double angle formula like this:

4sin(a)cos(b)cos(a)sin(b) = sin(2a)sin(2b)

1 2 Page 1 of 2