The solution considers x<0 and x>0 to ensure that the constant value is the same as the function is not continuous. It doesn't imply you need to consider these cases separately for an alternate proof.
If you look at other proofs of tan(arccosx) they don't consider the x<0 case because its...