# How can I make Mathematica trigger the simplification of ArcCos[a]+ArcCos[b]?

According to this Wikipedia subsection my guess is that I should be able to convince Mathematica to return zero when doing

FullSimplify[(ArcCos[a] + ArcCos[b]) - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])],
a ∈ Reals && b ∈ Reals]


but I cannot achieve it. I guess I'm missing some assumptions, but, which ones?

Thanks!

• You misread/mistyped the identity in your code: You should have ArcCos[a] + ArcCos[b] instead of ArcCos[a +b]. It also seems you have to worry about the range of ArcCos. The identity is certainly valid for angles in the first quadrant. (0 <= a <= 1 && 0 <= b <= 1). – Michael E2 Nov 21 '15 at 17:56
• Thanks a lot for finding the typo (I corrected it above). But, anyway, I'm still unable to get zero from FullSimplify[(ArcCos[a] + ArcCos[b]) - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])], 0 <= a <= 1 && 0 <= b <= 1] – cesss Nov 21 '15 at 18:09

Numerical experiments are useful for problems like this. Mathematica doesn't seem to think this is zero in most cases:

f[a_, b_] := (ArcCos[a + b]) - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])]
Table[f[x, y] // N, {x, 0, 2, 2}, {y, 0, 2}]
(* {{-1.5708, -1.5708, -1.5708 + 0. I}, {-1.5708 + 0. I, 0. + 0.445789 I, 0. + 2.06344 I}} *)


First, you got a typo. It should be

ArcCos[a] + AecCos[b] - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])] ==0


whereas you have

 ArcCos[a+b] - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])] ==0


Second, the range of the a,b needs to be restricted to the interval [-1,1], as the identity only holds for such a,b that are derived via a=cos(t) with real t.

Third, the right-hand side always yields a value between 0 and pi (as per Mathematica's convention), whereas the left-hand side is not constrained in such a way: with a->0 and b->-1 the left-hand side is pi/2+pi=3pi/2 whereas the right-hand side is ArcCos[0] which of course could be 3pi/2, but is taken to be pi/2.

So strictly speaking, the identity is not true. You would need to restrict the left-hand side's range of results.

• Speaking of typos, what's AecCos? :) – Michael E2 Nov 21 '15 at 18:12
• Thanks a lot, Oliver, but, as Michael E2 pointed out, shouldn't the ranges match in the first quadrant? I tried FullSimplify[(ArcCos[a] + ArcCos[b]) - ArcCos[a*b - (Sqrt[(1 - a^2)*(1 - b^2)])], 0 <= a <= 1 && 0 <= b <= 1] and it doesn't return zero. – cesss Nov 21 '15 at 18:19

You can check that the expression is zero only in some region:

expr = (ArcCos[a] + ArcCos[b]) - ArcCos[a b - (Sqrt[(1 - a^2) (1 - b^2)])];

Plot3D[Evaluate@ReIm[expr], {a, -2, 2}, {b, -2, 2}, Exclusions -> None]


Unfortunately, Mathematica cannot simplify it even with proper assumptions:

FullSimplify[expr, a < 1 && b < 1 && a + b > 0]
(* ArcCos[a] + ArcCos[b] - ArcCos[a b - Sqrt[(-1 + a^2) (-1 + b^2)]] *)


You can make a trigonometric substitution:

expr2 = expr /. {a -> Cos[x], b -> Cos[y]};
Plot3D[Evaluate@ReIm[expr2], {x, -π, π}, {y, -π, π},
Exclusions -> None, PlotRange -> All]


FunctionExpand@FullSimplify[expr2, x > 0 && y > 0 && x + y < π]
(* 0 *)

• Thanks a lot. I still don't know exactly what's happening here. I've used the ArcCos[a] + ArcCos[b] simplification for the development of a expression where I believe it's legit to do so. But FullSimplify[] won't say that the simplified expression subtracted from the original is zero, so I'm executing a Reduce[] asking it to be zero and hoping I'll see what's needed for it to be zero. The Reduce[] has been running for more than 24h now. No result yet. – cesss Nov 22 '15 at 19:33