I'm having trouble convincing maple to simplify a complicated trig expression. It appears the bottleneck is that I don't know how to tell maple that it's OK to simplify expressions like:
arccos(cos(x))
into
x
Instead, if I issue:
simplify(arccos(cos(x)));
I just get
arccos(cos(x));
Is there some set of assume
s that I should be using? My actual expression is much more complicated so I'd prefer a generic solution where the expressions inside arccos and cos might each be complicated expressions.
Update:
Here's the more complicated simplify
example where this came up (or at least where I thought this was the issue):
# Angles
hac := arccos( (lab^2 + lbc^2 - lca^2)/(2*lab*lbc) ):
hcd := arccos( (lbc^2 + lbd^2 - lcd^2)/(2*lbc*lbd) ):
had := hac+hcd:
# length of AD
lad := sqrt( lab^2 + lbd^2 - 2*lab*lbd*cos(had) ):
sin_hbd := lbd*sin(had)/lad:
sin_hbp := sin_hbd:
hbp := arcsin( sin_hbp ):
hap := hac:
hab := Pi - hbp - hap:
# length of BP
lbp := lab*sin_hbp/sin(hab):
# factor we're looking for
s := lbp/lbc:
simplify(s);
produces:
lab lbd sin(%2)
-----------------------------------------------------------------------------------------------
2 2 1/2 lbd sin(%2)
(lab + lbd - 2 lab lbd cos(%2)) sin(arcsin(------------------------------------) + %1) lbc
2 2 1/2
(lab + lbd - 2 lab lbd cos(%2))
2 2 2
lab + lbc - lca
%1 := arccos(------------------)
2 lab lbc
2 2 2
lbc + lbd - lcd
%2 := %1 + arccos(------------------)
2 lbc lbd
The symbols lab
,lbc
,lca
are lengths of a triangle. Similarly lab
,lbd
,lcd
. So the angles h*
should all be between 0 and Pi. I'm not sure a priori how simple the expression for s
can be made. But all my attempts at assumptions so far (e.g., adding the triangle inequalities explicitly, adding bounds like acer's partial answer below) have not had an effect.