# \[?\] Find the limit efficiently containing ArcTan?

**URL:** <https://community.wolfram.com/t/find-the-limit-efficiently-containing-arctan/14860>\
**Category:** Questions\
**Created:** [October 16, 2019, 8:13am UTC](https://community.wolfram.com/t/find-the-limit-efficiently-containing-arctan/14860 "2019-10-16T08:13:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![airbeta](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@airbeta](https://community.wolfram.com/u/airbeta)\
**Post date:** [October 16, 2019, 8:13am UTC](https://community.wolfram.com/t/find-the-limit-efficiently-containing-arctan/14860/1 "2019-10-16T08:13:52Z")

</div>

Hi everyone,

I am trying to evaluate this limit (actually the limit of a complicated expression containing this actan function):

```
Limit[ArcTan[(s + r Cos[\[Phi]])/Sqrt[
  a^2 - r^2 - s^2 - 2 r s Cos[\[Phi]]]] , 
 s -> (-r Cos[\[Phi]] + Sqrt[
    a^2 Cos[\[Phi]]^2 + (a - r) (a + r) Sin[\[Phi]]^2]), 
 Direction -> "FromBelow"]

```

which is related to some integrals inside a circle of radius a.  
Anyway, when I set these assumptions:

```
assumptions = {0 < a < r};
Limit[(s + r Cos[\[Phi]])/Sqrt[a^2 - r^2 - s^2 - 2 r s Cos[\[Phi]]], 
     s -> (-r Cos[\[Phi]] + Sqrt[
        a^2 Cos[\[Phi]]^2 + (a - r) (a + r) Sin[\[Phi]]^2]), 
     Direction -> "FromBelow", Assumptions -> assumptions]

```

gives the result:

```
DirectedInfinity[Sign[2 a^2 - r^2 + r^2 Cos[2 \[Phi]]]^(1/4)]

```

The region I am interested is where the part inside Sign function is positive, so this will just equals to positive infinity. So I thought this code will work:

```
assumptions = {0 < a < r, 2 a^2 - r^2 + r^2 Cos[2 \[Phi]] > 0};
Limit[(s + r Cos[\[Phi]])/Sqrt[a^2 - r^2 - s^2 - 2 r s Cos[\[Phi]]], 
     s -> (-r Cos[\[Phi]] + Sqrt[
        a^2 Cos[\[Phi]]^2 + (a - r) (a + r) Sin[\[Phi]]^2]), 
     Direction -> "FromBelow", Assumptions -> assumptions]

```

On my computer, this code runs for half an hour and did not give any output. I am wondering if there is any simple way to tell Mathematica to ignore the directed infinity thing and just treat it like positive infinity?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [October 16, 2019, 10:47am UTC](https://community.wolfram.com/t/find-the-limit-efficiently-containing-arctan/14860/2 "2019-10-16T10:47:07Z")

</div>

If I rewrite your assumption like so:

```
Refine[Reduce[2 a^2 - r^2 + r^2 Cos[2 \[Phi]] > 0, a, Reals], 
 Assumptions -> {\[Phi] \[Element] Reals, 0 < a < r}]

```

I get:

![assum.png](https://global.discourse-cdn.com/wolfram/original/3X/1/d/1d55a4bb1072a9c360201f59594172ac489e678a.png)

So if I execute using this assumption:

```
assumptions = {0 < r, a > Sqrt[r^2 - r^2 Cos[2 \[Phi]]]/Sqrt[2]};

Limit[(s + r Cos[\[Phi]])/Sqrt[a^2 - r^2 - s^2 - 2 r s Cos[\[Phi]]], 
 s -> (-r Cos[\[Phi]] + 
    Sqrt[a^2 Cos[\[Phi]]^2 + (a - r) (a + r) Sin[\[Phi]]^2]), 
 Direction -> "FromBelow", Assumptions -> assumptions]

```

I get immediately as result `Infinity`. Does that make sense?  
[1]: [https://community.wolfram.com//c/portal/getImageAttachment?filename=assum.png&userId=32203](https://community.wolfram.com//c/portal/getImageAttachment?filename=assum.png&userId=32203)

---

<div class="post-metadata">

**Author:** ![airbeta](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@airbeta](https://community.wolfram.com/u/airbeta)\
**Post date:** [October 16, 2019, 12:35pm UTC](https://community.wolfram.com/t/find-the-limit-efficiently-containing-arctan/14860/3 "2019-10-16T12:35:25Z")

</div>

Dear Henrik,

Thanks for the help!

I tried your code and it worked like magic. Although I don’t really get the logic behind this trick.

I tried to change the Refine to Simplify:

```
Simplify[Reduce[2 a^2 - r^2 + r^2 Cos[2 \[Phi]] > 0, a, 
  Reals], {\[Phi] \[Element] Reals, 0 < a < r}]

```

which gives:

```
a > r/Abs[Csc[\[Phi]]]

```

With this modification the code run slowly again, and ends with this result:

```
DirectedInfinity[Sign[2 a^2 - r^2 + r^2 Cos[2 \[Phi]]]^(1/4)]

```

It seems only Refine will work.

But the original problem is solved, so Thank You regardless!
