1
$\begingroup$
$Assumptions = Element[t, Reals] && Element[ω, Reals] && ω > 0 
&& t > 0;
ArcTan[8.54596*10^7 (1. + 1. t^2 ω^2) (1.2214 + E^ω Cos[
2 ArcTan[t ω]]), -1.70919*10^8 E^ω t ω] + 
ArcTan[8.54596*10^7 (1. + 1. t^2 ω^2) (1.2214 + E^ω 
Cos[2ArcTan[t ω]]),1.70919*10^8 E^ω t ω]//FullSimplify

Mathematica doesn't simplify this seemingly ArcTan[x,y]+ArcTan[x,-y] expression. I plotted the 3D-graph, it shows the expression is zero for all values of t and \[Omega].

I understand one underlying reason might be Mathematica isn't sure about the positivity of Cos term in x, and hence, x. Am I right? Any ideas to simplify this term in code, instead of manually, would be very much appreciated. I'm relatively new to the language.

$\endgroup$
3
  • $\begingroup$ Maybe Simplify[expr, Cos[2 ArcTan[t \[Omega]]] > 0], where expr is your expression involving Arctan? You can use the second argument of Simplify to submit assumptions. $\endgroup$ Commented Apr 30, 2018 at 10:16
  • $\begingroup$ The Cos term does not necessarily have to be greater than zero. And, I have tried out inserting the global assumptions inside Simplify and FullSimply but it still doesn't work. $\endgroup$
    – naeema18
    Commented Apr 30, 2018 at 11:32
  • 1
    $\begingroup$ If (1.2214 + E^\[Omega] Cos[2 ArcTan[t \[Omega]]]) is not always greater than zero, then it's not necessarily true that the ArcTan terms sum to zero. (Consider x < 0, y == 0.) $\endgroup$
    – Michael E2
    Commented Apr 30, 2018 at 11:43

2 Answers 2

1
$\begingroup$

First you should avoid using inexact numbers if possible.

expr = ArcTan[ α (1 +  t^2 ω^2) (γ +E^ω Cos[2 ArcTan[t ω]]), -β E^ω t ω] + 
  ArcTan[α(1 +  t^2 ω^2) (γ + E^ω Cos[2 ArcTan[t ω]]), β E^ω t ω]

Now, with assumptions inside , the simplification evaluates as you expect

Simplify[expr, 
Assumptions -> {ω > 0,t > 0 , α > 0, β > 0, γ >0,Cos[2 ArcTan[t ω]] > 0,Elements[{ω, t, α, β,γ}, Reals]}]
(* 0 *)
$\endgroup$
2
  • $\begingroup$ Your solution does simplify it to 0, because you're assuming Cos[2 ArcTan[t ω]] > 0. I don't see any good reason to assume so. If you do, please let me know. $\endgroup$
    – naeema18
    Commented Apr 30, 2018 at 11:46
  • 1
    $\begingroup$ @ naeema18: In the question I read ... about the positivity of Cos term.. as an assumption. $\endgroup$ Commented Apr 30, 2018 at 11:53
1
$\begingroup$
$Assumptions = ω > 0 && t > 0;

Note that if a variable is positive it is redundant to add that it is real.

If you want exact results you must use exact numbers. Use Rationalize

expr = ArcTan[
     8.54596*10^7 (1. + 1. t^2 ω^2) (1.2214 + 
        E^ω Cos[
          2 ArcTan[t ω]]), -1.70919*10^8 E^ω t ω] + 
    ArcTan[8.54596*10^7 (1. + 1. t^2 ω^2) (1.2214 + 
        E^ω Cos[2 ArcTan[t ω]]), 
     1.70919*10^8 E^ω t ω] // Rationalize;

TrigToExp is what you need

expr // TrigToExp // Simplify

(* 0 *)
$\endgroup$
1
  • $\begingroup$ If you plot Plot3D[TrigToExp[ArcTan[x, y] + ArcTan[x, -y]], {x, -1, 1}, {y, -1, 1}] you can see that the comment from Michael E2 concerning the first argument x stll holds. $\endgroup$ Commented May 1, 2018 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.