Unfortunately, Mathematica is giving me something else that I am unable to convert to this expression (or close to it). I have tried ExpToTrig and ComplexExpand without success.
I haven’t looked it up, but it looks like a problem that may depend on whether a and x are real or complex, and on the sign of x^2-a^2. You can take a look at the Assumptions option of Integrate, but I couldn’t get that to work either. I’ve had a somewhat similar problem in the past where Integrate returned the most general solution but couldn’t refine it to a special solution when I tried to restrict values of parameters and variables via Assumptions.
I would like to thank you both, Bianca and Gianluca, for helping me. About Bianca’s idea, I also was not able to improve the result by using Assumptions. About Gianluca’s, his suggestion is interesting, but it depends on the previous knowledge about the ArcTan function in the solution.
The ideal way of solving that integral, which I was expecting to find, was to use the functions and options already provided by Mathematica, such as FullSimplify, Expand, Factor, PowerExpand, ExpToTrig, Assumptions, and many others.