# Simplifying an ArcTan expression

The expression $\tan ^{-1}\left(\frac{\sqrt{L^2 \sin ^2(\theta )}}{\sqrt{L^2 \cos ^2(\theta )}}\right)$ can be simplified to $\theta$.

After some attempts I got the following to do the job.

ArcTan[Sqrt[L^2 Cos[θ]^2], Sqrt[L^2 Sin[θ]^2]] //
PowerExpand // TrigToExp // Simplify // PowerExpand

It appears rather clunky to me. Is there a better way to simplify this expression.

-
Please see meta.mathematica.stackexchange.com/a/1044/1356 for formatting questions with greek letters easily. – Öskå Jul 15 '13 at 15:46
Öskå, thanks for pointing that out. I had wondered how that was done. – Suba Thomas Jul 15 '13 at 15:49
I don't think mathematically it is true that the argument of ArcTan can be simplified to theta...what if theta=3Pi/4? – Leo Fang Jul 15 '13 at 15:50
Thanks halirutan instead :-) – Öskå Jul 15 '13 at 15:52
@SubaThomas, I think I am not missing the point. The point you had such a clunky expression is that you missed the fact sin(θ) may give a minus sign, and that's why you had to use PowerExpand to simplify it (PowerExpand assumes everything is real and positive, so the problem here is avoided). For a cleaner way see my comment above using Assumptions . – Leo Fang Jul 15 '13 at 16:48

the most you can generally simplify is:

Simplify[ArcTan[ Sqrt[ L^2 Sin[t]^2]/Sqrt[ L^2 Cos[t]^2]],
Assumptions -> {L > 0, Element[t, Reals]}]

(* ArcTan[Sqrt[1/Cot[t]^2]] *)

your original statement is true only on 0-Pi/2

Simplify[ArcTan[ Sqrt[ L^2 Sin[t]^2]/Sqrt[ L^2 Cos[t]^2]],
Assumptions -> {L > 0, 0 < t < Pi/2}]

(* t *)

now a fair question, why doesnt Simplyfy return -t here.. ?

Simplify[ArcTan[ Sqrt[ L^2 Sin[t]^2]/Sqrt[ L^2 Cos[t]^2]],
Assumptions -> {L > 0, -Pi/2 < t < 0}]

or better we'd like to see Abs[t] for -Pi/2 < t < Pi/2

-
Yeah this is a interesting question...In fact Simplify[Sqrt[ L^2 Sin[t]^2]/Sqrt[ L^2 Cos[t]^2], Assumptions -> {L > 0, -Pi/2 < t < 0}] is not really simplified either, so the question is irrelevant of ArcTan. – Leo Fang Jul 15 '13 at 21:24
Thanks for your response. My eventual solution was to reformulate the expression as $\sin ^{-1}(\sin (\theta ))$ and use PowerExpand. – Suba Thomas Jul 16 '13 at 13:19