They are equal, as can be seen from their graphs.
But how can this be proved with Wolfram tools?
In other words, how can Wolfram get g from f and vice versa?
Isn’t it a challenge to the Wolfram expert to compare two fundamentally different definitions of the same mathematical entity and prove in a given system their equivalence?
As you can see from the name of the attached file, there is a third equivalent function: arccocos[x_]:=ArcCos[Cos[x]]. So the task becomes more complicated. We need to justify the equality of the three functions in Wolfram.
It is not a question of making sure that the functions are equal: this is already evident from the graph. I am interested in how Wolfram can get g from f and vice versa.
I think Bill’s point is that if f[Pi] == g[Pi] is False, then f[x] and g[x} are not equivalent. Therefore one cannot to get from f[x] to g[x] or vice versa. Typically, Plot fails to show differences between function when they occur only at isolated points. It does discrete sampling and does not check all possible points (obviously, since there would be infinitely many values to check).
As they say in my language: It was a long time ago and not true. I have long since corrected it. Check the attached file ArcCosCos, please. Copying to text causes errors.
And I remember your trick with ArcTan[1/x] + ArcTan[x]. Bravo! I’ve never seen that before anywhere. If there is any literature on this subject, please tell me.
IMHO A function in Wolfram is nothing more than its definition. Therefore, proving the equality of two functions is nothing more than establishing the equivalence of their definitions.
You keep on modifiying the original post. Makes it hard to keep up a coherent discussion. However, your new version of f[x] is equal to g[x], if one applies Gianluca’s suggestion of using PiecewiseExpand: