Repository: sympy/sympy

Issue:
sympy is  unable to solve limit for function log( x ) + asech( x ) at both point x = 0 and x = oo.
while Calculating the limit of function  log(x)+asech(x) at two different point sympy gives unexpected result 

```
>>> limit(log(x)+asech(x),x,oo)
    ⅈ⋅π
∞ + ───
     2 
>>> limit(log(x)+asech(x),x,0)
 lim (log(x) + asech(x))
x─→0⁺                   
>>> 
```

I think that gruntz algorithm has problem while  calculating limit for  function whose two side limit is not exist .
Reference  -https://www.wolframalpha.com/input/i=limit+of+log%28x%29%2Basech%28x%29+where+x+tends+0


Discussion:
sympy-bot: :white_check_mark:

Hi, I am the [SymPy bot](https://github.com/sympy/sympy-bot) (v167). I'm here to help you write a release notes entry. Please read the [guide on how to write release notes](https://github.com/sympy/sympy/wiki/Writing-Release-Notes).



Your release notes are in good order.

Here is what the release notes will look like:
* series
  * Implemented taylor_term method for asec, acsc, asech, acsch functions. ([#23715](https://github.com/sympy/sympy/pull/23715) by [@anutosh491](https://github.com/anutosh491))

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.11.

<details><summary>Click here to see the pull request description that was parsed.</summary>

    <!-- Your title above should be a short description of what
    was changed. Do not include the issue number in the title. -->

    #### References to other Issues or PRs
    <!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
    format, e.g. "Fixes #1234" (see
    https://tinyurl.com/auto-closing for more information). Also, please
    write a comment on that issue linking back to this pull request once it is
    open. -->


    #### Brief description of what is fixed or changed

    1) Changes through first commit

    On master
    ```
    >>> asec(x).series(x)
    nan
    >>> acsc(x).series(x)
    nan
    >>> asech(x).series(x)
    nan
    >>> acsch(x).series(x)
    nan
    ```
    On branch
    ```
    >>> asec(x).series(x)
    I*log(2) - I*log(x) - I*x**2/4 - 3*I*x**4/32 + O(x**6)
    >>> acsc(x).series(x)
    -I*log(2) + pi/2 + I*log(x) + I*x**2/4 + 3*I*x**4/32 + O(x**6)
    >>> asech(x).series(x)
    log(2) - log(x) - x**2/4 - 3*x**4/32 + O(x**6)
    >>> acsch(x).series(x)
    log(2) - log(x) + x**2/4 - 3*x**4/32 + O(x**6)
    ```

    #### Other comments


    #### Release Notes

    <!-- Write the release notes for this release below between the BEGIN and END
    statements. The basic format is a bulleted list with the name of the subpackage
    and the release note for this PR. For example:

    * solvers
      * Added a new solver for logarithmic equations.

    * functions
      * Fixed a bug with log of integers.

    or if no release note(s) should be included use:

    NO ENTRY

    See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
    information on how to write release notes. The bot will check your release
    notes automatically to see if they are formatted correctly. -->

    <!-- BEGIN RELEASE NOTES -->
    * series
      * Implemented taylor_term method for asec, acsc, asech, acsch functions.
    <!-- END RELEASE NOTES -->


</details><p>

github-actions[bot]: Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with `+` are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with `-` are speedups.

Significantly changed benchmark results (PR vs master)
```diff

```
Significantly changed benchmark results (master vs previous release)
```diff
       before           after         ratio
     [77f1d79c]       [b64cfcdb]
     <sympy-1.10.1^0>                 
+         112±1ms          203±1ms     1.81  sum.TimeSum.time_doit

```
Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).
anutosh491: Another thing which needs to be considered here is the bi-directional limit for the following functions : `acot`, `asec`, `acsc`, `acoth`, `asech`, `acsch` . 

Consider something like `limit(acot(x), x, 0, '+-')`
```
>>> limit(acot(x), x, 0, '-')
-pi/2
>>> limit(acot(x), x, 0, '+')
pi/2
```
Both limit separately are correct but if we consider the bi-directional case, we get pi/2 instead of a `ValueError`
```
>>> limit(acot(x), x, 0, '+-')
pi/2
```
Now this is because `limit(acot(x), x, 0, '+-')` boils down to something like `acot(x).as_leading_term(x, cdir = 0)` .This happens because.... when `dir ='+-'` , we don't really assign it a `cdir` as the other cases . And now that we have `acot(x).as_leading_term(x, cdir= 0)` . This is being treated as the default case from right rather than a bi-directional leading term .

This would eventually happen for all functions where `f(x).as_leading_term(x, cdir = 1) != f(x).as_leading_term(x, cdir = -1)`
For eg asech(x) 
```
>>> asech(x).as_leading_term(x, cdir = 1)
-log(x) + log(2)
>>> asech(x).as_leading_term(x, cdir = -1)
-log(x) + log(2) + 2*I*pi
>>> 
>>> limit(asech(x) + log(x), x, 0, '-')
log(2) + 2*I*pi
>>> limit(asech(x) + log(x), x, 0, '+-')
log(2)
```
anutosh491: The floor and ceiling functions are a prime example of this behavior where `floor(x).as_leading_term(x, cdir =1) != floor(x).as_leading_term(x, cdir =-1)` . And if we notice carefully , the bi-directional case has correctly been taken care of in `floor._eval_as_leading_term()`.

https://github.com/sympy/sympy/blob/b64cfcdb640975706c71f305d99a8453ea5e46d8/sympy/functions/elementary/integers.py#L151-L159

I will try to recreate something like this for acot, asec, acsc, acoth, asech, acsch in the next commit , which marks the end of all work to be done through this pr !
anutosh491: This can be done by changing the default case for `cdir` to `1` from `0`. So that the default case by any means is through the right !! and the case where `cdir` will be explicitly `0`, that is when we use the bi-directional limit, we can catch it through a check , compute left and right . if they are same return same else raise . So something like the following diff will be applied for all of  `acot, asec, acsc, acoth, asech, acsch` .

```
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    def _eval_as_leading_term(self, x, logx=None, cdir=1):
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
+        if x0 is S.Zero and re(cdir) == 0:
+            r = self._eval_as_leading_term(x, logx=logx, cdir=1)
+            l = self._eval_as_leading_term(x, logx=logx, cdir=-1)
+            if r != l:
+                raise ValueError("The limit from either sides is not equal")
+            else:
+                return r
```
jksuom: It looks like the treatment of bidirectional limits should be changed in `Limit.doit`. It should not be coupled with `cdir=0`, instead, it should be handled quite early in separation of the unidirectional limits. Something like

    if dir == '+-':
        r = limit with dir='+'
        l = limit with dir='-'
        if r == l:
            return l
        raise ....

Only unidirectional limits are handled after this point.
anutosh491: > It looks like the treatment of bidirectional limits should be changed in `Limit.doit`

Ahh I saw this comment of your after making the commit . Hence I thought we could maybe get this as we do for the floor function , can we ? Also if we want something like `f(x).as_leading_term(x)` to be considered from right by default .... shouldn't we be changing the `cdir` parameter in `expr.py` where we define the as_leading_term method !
```
    @cacheit
-  def as_leading_term(self, *symbols, logx=None, cdir=0):
+ def as_leading_term(self, *symbols, logx=None, cdir=1):
```
jksuom: > we shouldn't be making changes in _eval_as_leading_term methods of respective functions

I think that we should not be treating `cdir=0` as a bidirectional leading term.
anutosh491: > > we shouldn't be making changes in _eval_as_leading_term methods of respective functions
> 
> I think that we should not be treating `cdir=0` as a bidirectional leading term.

Got it ! Then maybe this should be the first thing in `Limits.doit`
```
if dir == '+-':
    r = limit with dir='+'
    l = limit with dir='-'
    if r == l:
        return l
    raise ....
```
So that we get rid of the bi-directional cases this point onwards!
anutosh491: It seems there are commits (that also have the failing test related to optional dependencies) that have been merged into master yesterday . So I feel the failing test wouldn't be of concern while merging this . 
Maybe @oscarbenjamin could confirm this as the work here is almost done (just reviews on some corner cases and minor improvements in code quality might be left) and it would be great to have these changes for the latest release if we have time as this would significantly improve what limits/series can currently address in sympy specially for functions involving branch cuts!

Patch:
diff --git a/sympy/core/power.py b/sympy/core/power.py
index cefce3873f..268e8acaf4 100644
--- a/sympy/core/power.py
+++ b/sympy/core/power.py
@@ -1720,13 +1720,19 @@ def mul(d1, d2):
             return res
 
         try:
-            _, d = g.leadterm(x, logx=logx)
+            c, d = g.leadterm(x, logx=logx)
         except (ValueError, NotImplementedError):
             if limit(g/x**maxpow, x, 0) == 0:
                 # g has higher order zero
                 return f**e + e*f**e*g  # first term of binomial series
             else:
                 raise NotImplementedError()
+        if c.is_Float and d == S.Zero:
+            # Convert floats like 0.5 to exact SymPy numbers like S.Half, to
+            # prevent rounding errors which can induce wrong values of d leading
+            # to execution of an inappropriate code block (line 1741 - 1750)
+            from sympy.simplify.simplify import nsimplify
+            _, d = nsimplify(g).leadterm(x, logx=logx)
         if not d.is_positive:
             g = g.simplify()
             if g.is_zero:
@@ -1761,9 +1767,14 @@ def mul(d1, d2):
 
         from sympy.functions.elementary.complexes import im
 
-        if (not e.is_integer and m.is_zero and f.is_real
-            and f.is_negative and im((b - f).dir(x, cdir)).is_negative):
-            inco, inex = coeff_exp(f**e*exp(-2*e*S.Pi*S.ImaginaryUnit), x)
+        if not e.is_integer and m.is_zero and f.is_negative:
+            ndir = (b - f).dir(x, cdir)
+            if im(ndir).is_negative:
+                inco, inex = coeff_exp(f**e*(-1)**(-2*e), x)
+            elif im(ndir).is_zero:
+                inco, inex = coeff_exp(exp(e*log(b)).as_leading_term(x, logx=logx, cdir=cdir), x)
+            else:
+                inco, inex = coeff_exp(f**e, x)
         else:
             inco, inex = coeff_exp(f**e, x)
         res = S.Zero
@@ -1798,9 +1809,17 @@ def _eval_as_leading_term(self, x, logx=None, cdir=0):
                 f = b.as_leading_term(x, logx=logx, cdir=cdir)
             except PoleError:
                 return self
-            if (not e.is_integer and f.is_constant() and f.is_real
-                and f.is_negative and im((b - f).dir(x, cdir)).is_negative):
-                return self.func(f, e) * exp(-2 * e * S.Pi * S.ImaginaryUnit)
+            if not e.is_integer and f.is_negative:
+                ndir = (b - f).dir(x, cdir)
+                if im(ndir).is_negative:
+                    # Normally, f**e would evaluate to exp(e*log(f)) but on branch cuts
+                    # an other value is expected through the following computation
+                    # exp(e*(log(f) - 2*pi*I)) == f**e*exp(-2*e*pi*I) == f**e*(-1)**(-2*e).
+                    return self.func(f, e) * (-1)**(-2*e)
+                elif im(ndir).is_zero:
+                    log_leadterm = log(b)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+                    if log_leadterm.is_infinite is False:
+                        return exp(e*log_leadterm)
             return self.func(f, e)
 
     @cacheit
diff --git a/sympy/functions/elementary/hyperbolic.py b/sympy/functions/elementary/hyperbolic.py
index 65e8aba69a..a240ffbb98 100644
--- a/sympy/functions/elementary/hyperbolic.py
+++ b/sympy/functions/elementary/hyperbolic.py
@@ -5,7 +5,7 @@
 from sympy.functions.combinatorial.factorials import (binomial, factorial,
                                                       RisingFactorial)
 from sympy.functions.combinatorial.numbers import bernoulli, euler, nC
-from sympy.functions.elementary.complexes import Abs
+from sympy.functions.elementary.complexes import Abs, im, re
 from sympy.functions.elementary.exponential import exp, log, match_real_imag
 from sympy.functions.elementary.integers import floor
 from sympy.functions.elementary.miscellaneous import sqrt
@@ -1215,18 +1215,32 @@ def taylor_term(n, x, *previous_terms):
                 F = factorial(k)
                 return S.NegativeOne**k * R / F * x**n / n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
-        from sympy.series.order import Order
-        arg = self.args[0].as_leading_term(x)
-
-        if x in arg.free_symbols and Order(1, x).contains(arg):
-            return arg
-        else:
-            return self.func(arg)
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # asinh
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        if x0.is_zero:
+            return arg.as_leading_term(x)
+        # Handling branch points
+        if x0 in (-S.ImaginaryUnit, S.ImaginaryUnit, S.ComplexInfinity):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        # Handling points lying on branch cuts (-I*oo, -I) U (I, I*oo)
+        if (1 + x0**2).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if re(ndir).is_positive:
+                if im(x0).is_negative:
+                    return -self.func(x0) - I*pi
+            elif re(ndir).is_negative:
+                if im(x0).is_positive:
+                    return -self.func(x0) + I*pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
 
     def _eval_rewrite_as_log(self, x, **kwargs):
         return log(x + sqrt(x**2 + 1))
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_atanh(self, x, **kwargs):
         return atanh(x/sqrt(1 + x**2))
 
@@ -1364,7 +1378,7 @@ def eval(cls, arg):
     @cacheit
     def taylor_term(n, x, *previous_terms):
         if n == 0:
-            return S.Pi*S.ImaginaryUnit / 2
+            return I*pi/2
         elif n < 0 or n % 2 == 0:
             return S.Zero
         else:
@@ -1378,18 +1392,28 @@ def taylor_term(n, x, *previous_terms):
                 F = factorial(k)
                 return -R / F * S.ImaginaryUnit * x**n / n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
-        from sympy.series.order import Order
-        arg = self.args[0].as_leading_term(x)
-
-        if x in arg.free_symbols and Order(1, x).contains(arg):
-            return S.ImaginaryUnit*S.Pi/2
-        else:
-            return self.func(arg)
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acosh
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        # Handling branch points
+        if x0 in (-S.One, S.Zero, S.One, S.ComplexInfinity):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        # Handling points lying on branch cuts (-oo, 1)
+        if (x0 - 1).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if (x0 + 1).is_negative:
+                    return self.func(x0) - 2*I*pi
+                return -self.func(x0)
+            elif not im(ndir).is_positive:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
 
     def _eval_rewrite_as_log(self, x, **kwargs):
         return log(x + sqrt(x + 1) * sqrt(x - 1))
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_acos(self, x, **kwargs):
         return sqrt(x - 1)/sqrt(1 - x) * acos(x)
 
@@ -1499,18 +1523,32 @@ def taylor_term(n, x, *previous_terms):
             x = sympify(x)
             return x**n / n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
-        from sympy.series.order import Order
-        arg = self.args[0].as_leading_term(x)
-
-        if x in arg.free_symbols and Order(1, x).contains(arg):
-            return arg
-        else:
-            return self.func(arg)
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # atanh
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        if x0.is_zero:
+            return arg.as_leading_term(x)
+        # Handling branch points
+        if x0 in (-S.One, S.One, S.ComplexInfinity):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        # Handling points lying on branch cuts (-oo, -1] U [1, oo)
+        if (1 - x0**2).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_negative:
+                    return self.func(x0) - I*pi
+            elif im(ndir).is_positive:
+                if x0.is_positive:
+                    return self.func(x0) + I*pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
 
     def _eval_rewrite_as_log(self, x, **kwargs):
         return (log(1 + x) - log(1 - x)) / 2
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_asinh(self, x, **kwargs):
         f = sqrt(1/(x**2 - 1))
         return (pi*x/(2*sqrt(-x**2)) -
@@ -1592,25 +1630,39 @@ def eval(cls, arg):
     @cacheit
     def taylor_term(n, x, *previous_terms):
         if n == 0:
-            return S.Pi*S.ImaginaryUnit / 2
+            return -I*pi/2
         elif n < 0 or n % 2 == 0:
             return S.Zero
         else:
             x = sympify(x)
             return x**n / n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
-        from sympy.series.order import Order
-        arg = self.args[0].as_leading_term(x)
-
-        if x in arg.free_symbols and Order(1, x).contains(arg):
-            return S.ImaginaryUnit*S.Pi/2
-        else:
-            return self.func(arg)
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acoth
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        if x0 is S.ComplexInfinity:
+            return (1/arg).as_leading_term(x)
+        # Handling branch points
+        if x0 in (-S.One, S.One, S.Zero):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        # Handling points lying on branch cuts [-1, 1]
+        if x0.is_real and (1 - x0**2).is_positive:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_positive:
+                    return self.func(x0) + I*pi
+            elif im(ndir).is_positive:
+                if x0.is_negative:
+                    return self.func(x0) - I*pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
 
     def _eval_rewrite_as_log(self, x, **kwargs):
         return (log(1 + 1/x) - log(1 - 1/x)) / 2
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_atanh(self, x, **kwargs):
         return atanh(1/x)
 
@@ -1735,7 +1787,7 @@ def eval(cls, arg):
 
     @staticmethod
     @cacheit
-    def expansion_term(n, x, *previous_terms):
+    def taylor_term(n, x, *previous_terms):
         if n == 0:
             return log(2 / x)
         elif n < 0 or n % 2 == 1:
@@ -1744,13 +1796,30 @@ def expansion_term(n, x, *previous_terms):
             x = sympify(x)
             if len(previous_terms) > 2 and n > 2:
                 p = previous_terms[-2]
-                return p * (n - 1)**2 // (n // 2)**2 * x**2 / 4
+                return p * ((n - 1)*(n-2)) * x**2/(4 * (n//2)**2)
             else:
                 k = n // 2
                 R = RisingFactorial(S.Half, k) *  n
                 F = factorial(k) * n // 2 * n // 2
                 return -1 * R / F * x**n / 4
 
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # asech
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        # Handling branch points
+        if x0 in (-S.One, S.Zero, S.One, S.ComplexInfinity):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        # Handling points lying on branch cuts (-oo, 0] U (1, oo)
+        if x0.is_negative or (1 - x0).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_positive:
+                if x0.is_positive or (x0 + 1).is_negative:
+                    return -self.func(x0)
+                return self.func(x0) - 2*I*pi
+            elif not im(ndir).is_negative:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
+
     def inverse(self, argindex=1):
         """
         Returns the inverse of this function.
@@ -1760,6 +1829,8 @@ def inverse(self, argindex=1):
     def _eval_rewrite_as_log(self, arg, **kwargs):
         return log(1/arg + sqrt(1/arg - 1) * sqrt(1/arg + 1))
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_acosh(self, arg, **kwargs):
         return acosh(1/arg)
 
@@ -1873,6 +1944,45 @@ def eval(cls, arg):
         if arg.could_extract_minus_sign():
             return -cls(-arg)
 
+    @staticmethod
+    @cacheit
+    def taylor_term(n, x, *previous_terms):
+        if n == 0:
+            return log(2 / x)
+        elif n < 0 or n % 2 == 1:
+            return S.Zero
+        else:
+            x = sympify(x)
+            if len(previous_terms) > 2 and n > 2:
+                p = previous_terms[-2]
+                return -p * ((n - 1)*(n-2)) * x**2/(4 * (n//2)**2)
+            else:
+                k = n // 2
+                R = RisingFactorial(S.Half, k) *  n
+                F = factorial(k) * n // 2 * n // 2
+                return S.NegativeOne**(k +1) * R / F * x**n / 4
+
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acsch
+        arg = self.args[0]
+        x0 = arg.subs(x, 0).cancel()
+        # Handling branch points
+        if x0 in (-S.ImaginaryUnit, S.ImaginaryUnit, S.Zero):
+            return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        if x0 is S.ComplexInfinity:
+            return (1/arg).as_leading_term(x)
+        # Handling points lying on branch cuts (-I, I)
+        if x0.is_imaginary and (1 + x0**2).is_positive:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if re(ndir).is_positive:
+                if im(x0).is_positive:
+                    return -self.func(x0) - I*pi
+            elif re(ndir).is_negative:
+                if im(x0).is_negative:
+                    return -self.func(x0) + I*pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
+        return self.func(x0)
+
     def inverse(self, argindex=1):
         """
         Returns the inverse of this function.
@@ -1882,6 +1992,8 @@ def inverse(self, argindex=1):
     def _eval_rewrite_as_log(self, arg, **kwargs):
         return log(1/arg + sqrt(1/arg**2 + 1))
 
+    _eval_rewrite_as_tractable = _eval_rewrite_as_log
+
     def _eval_rewrite_as_asinh(self, arg, **kwargs):
         return asinh(1/arg)
 
diff --git a/sympy/functions/elementary/trigonometric.py b/sympy/functions/elementary/trigonometric.py
index 394b0320ce..c1a3a1ad8f 100644
--- a/sympy/functions/elementary/trigonometric.py
+++ b/sympy/functions/elementary/trigonometric.py
@@ -2317,20 +2317,25 @@ def taylor_term(n, x, *previous_terms):
                 F = factorial(k)
                 return R/F*x**n/n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # asin
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
         if x0.is_zero:
             return arg.as_leading_term(x)
-        # Handling Branch cuts (-oo, -1) U (1, oo)
+        # Handling branch points
         if x0 in (-S.One, S.One, S.ComplexInfinity):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        if im(cdir) < 0 and x0.is_real and x0 < S.NegativeOne:
-            return -pi - self.func(x0)
-        elif im(cdir) > 0 and x0.is_real and x0 > S.One:
-            return pi - self.func(x0)
+        # Handling points lying on branch cuts (-oo, -1) U (1, oo)
+        if (1 - x0**2).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_negative:
+                    return -pi - self.func(x0)
+            elif im(ndir).is_positive:
+                if x0.is_positive:
+                    return pi - self.func(x0)
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_nseries(self, x, n, logx, cdir=0):  # asin
@@ -2379,6 +2384,7 @@ def _eval_rewrite_as_atan(self, x, **kwargs):
 
     def _eval_rewrite_as_log(self, x, **kwargs):
         return -S.ImaginaryUnit*log(S.ImaginaryUnit*x + sqrt(1 - x**2))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def _eval_rewrite_as_acot(self, arg, **kwargs):
@@ -2521,20 +2527,25 @@ def taylor_term(n, x, *previous_terms):
                 F = factorial(k)
                 return -R/F*x**n/n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acos
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
-        # Handling Branch cuts (-oo, -1) U (1, oo)
+        # Handling branch points
         if x0 == 1:
             return sqrt(2)*sqrt((S.One - arg).as_leading_term(x))
         if x0 in (-S.One, S.ComplexInfinity):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        if im(cdir) < 0 and x0.is_real and x0 < S.NegativeOne:
-            return 2*pi - self.func(x0)
-        elif im(cdir) > 0 and x0.is_real and x0 > S.One:
-            return -self.func(x0)
+        # Handling points lying on branch cuts (-oo, -1) U (1, oo)
+        if (1 - x0**2).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_negative:
+                    return 2*pi - self.func(x0)
+            elif im(ndir).is_positive:
+                if x0.is_positive:
+                    return -self.func(x0)
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_is_extended_real(self):
@@ -2585,6 +2596,7 @@ def _eval_nseries(self, x, n, logx, cdir=0):  # acos
     def _eval_rewrite_as_log(self, x, **kwargs):
         return pi/2 + S.ImaginaryUnit*\
             log(S.ImaginaryUnit*x + sqrt(1 - x**2))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def _eval_rewrite_as_asin(self, x, **kwargs):
@@ -2748,20 +2760,25 @@ def taylor_term(n, x, *previous_terms):
             x = sympify(x)
             return S.NegativeOne**((n - 1)//2)*x**n/n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # atan
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
         if x0.is_zero:
             return arg.as_leading_term(x)
-        # Handling Branch cuts (-I*oo, -I) U (I, I*oo)
+        # Handling branch points
         if x0 in (-S.ImaginaryUnit, S.ImaginaryUnit, S.ComplexInfinity):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        if re(cdir) < 0 and re(x0).is_zero and im(x0) > S.One:
-            return self.func(x0) - pi
-        elif re(cdir) > 0 and re(x0).is_zero and im(x0) < S.NegativeOne:
-            return self.func(x0) + pi
+        # Handling points lying on branch cuts (-I*oo, -I) U (I, I*oo)
+        if (1 + x0**2).is_negative:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if re(ndir).is_negative:
+                if im(x0).is_positive:
+                    return self.func(x0) - pi
+            elif re(ndir).is_positive:
+                if im(x0).is_negative:
+                    return self.func(x0) + pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_nseries(self, x, n, logx, cdir=0):  # atan
@@ -2782,6 +2799,7 @@ def _eval_nseries(self, x, n, logx, cdir=0):  # atan
     def _eval_rewrite_as_log(self, x, **kwargs):
         return S.ImaginaryUnit/2*(log(S.One - S.ImaginaryUnit*x)
             - log(S.One + S.ImaginaryUnit*x))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def _eval_aseries(self, n, args0, x, logx):
@@ -2947,20 +2965,25 @@ def taylor_term(n, x, *previous_terms):
             x = sympify(x)
             return S.NegativeOne**((n + 1)//2)*x**n/n
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acot
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
         if x0 is S.ComplexInfinity:
             return (1/arg).as_leading_term(x)
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        # Handling Branch cuts [-I, I]
+        # Handling branch points
         if x0 in (-S.ImaginaryUnit, S.ImaginaryUnit, S.Zero):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
-        if re(cdir) > 0 and re(x0).is_zero and im(x0) > S.Zero and im(x0) < S.One:
-            return self.func(x0) + pi
-        if re(cdir) < 0 and re(x0).is_zero and im(x0) < S.Zero and im(x0) > S.NegativeOne:
-            return self.func(x0) - pi
+        # Handling points lying on branch cuts [-I, I]
+        if x0.is_imaginary and (1 + x0**2).is_positive:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if re(ndir).is_positive:
+                if im(x0).is_positive:
+                    return self.func(x0) + pi
+            elif re(ndir).is_negative:
+                if im(x0).is_negative:
+                    return self.func(x0) - pi
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_nseries(self, x, n, logx, cdir=0):  # acot
@@ -2991,6 +3014,7 @@ def _eval_aseries(self, n, args0, x, logx):
     def _eval_rewrite_as_log(self, x, **kwargs):
         return S.ImaginaryUnit/2*(log(1 - S.ImaginaryUnit/x)
             - log(1 + S.ImaginaryUnit/x))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def inverse(self, argindex=1):
@@ -3126,20 +3150,43 @@ def inverse(self, argindex=1):
         """
         return sec
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    @staticmethod
+    @cacheit
+    def taylor_term(n, x, *previous_terms):
+        if n == 0:
+            return S.ImaginaryUnit*log(2 / x)
+        elif n < 0 or n % 2 == 1:
+            return S.Zero
+        else:
+            x = sympify(x)
+            if len(previous_terms) > 2 and n > 2:
+                p = previous_terms[-2]
+                return p * ((n - 1)*(n-2)) * x**2/(4 * (n//2)**2)
+            else:
+                k = n // 2
+                R = RisingFactorial(S.Half, k) *  n
+                F = factorial(k) * n // 2 * n // 2
+                return -S.ImaginaryUnit * R / F * x**n / 4
+
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # asec
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
-        # Handling Branch cuts (-1, 1)
+        # Handling branch points
         if x0 == 1:
             return sqrt(2)*sqrt((arg - S.One).as_leading_term(x))
         if x0 in (-S.One, S.Zero):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir)
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        if im(cdir) < 0 and x0.is_real and x0 > S.Zero and x0 < S.One:
-            return -self.func(x0)
-        elif im(cdir) > 0 and x0.is_real and x0 < S.Zero and x0 > S.NegativeOne:
-            return 2*pi - self.func(x0)
+        # Handling points lying on branch cuts (-1, 1)
+        if x0.is_real and (1 - x0**2).is_positive:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_positive:
+                    return -self.func(x0)
+            elif im(ndir).is_positive:
+                if x0.is_negative:
+                    return 2*pi - self.func(x0)
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_nseries(self, x, n, logx, cdir=0):  # asec
@@ -3184,6 +3231,7 @@ def _eval_is_extended_real(self):
 
     def _eval_rewrite_as_log(self, arg, **kwargs):
         return pi/2 + S.ImaginaryUnit*log(S.ImaginaryUnit/arg + sqrt(1 - 1/arg**2))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def _eval_rewrite_as_asin(self, arg, **kwargs):
@@ -3304,20 +3352,43 @@ def inverse(self, argindex=1):
         """
         return csc
 
-    def _eval_as_leading_term(self, x, logx=None, cdir=0):
+    @staticmethod
+    @cacheit
+    def taylor_term(n, x, *previous_terms):
+        if n == 0:
+            return pi/2 - S.ImaginaryUnit*log(2) + S.ImaginaryUnit*log(x)
+        elif n < 0 or n % 2 == 1:
+            return S.Zero
+        else:
+            x = sympify(x)
+            if len(previous_terms) > 2 and n > 2:
+                p = previous_terms[-2]
+                return p * ((n - 1)*(n-2)) * x**2/(4 * (n//2)**2)
+            else:
+                k = n // 2
+                R = RisingFactorial(S.Half, k) *  n
+                F = factorial(k) * n // 2 * n // 2
+                return S.ImaginaryUnit * R / F * x**n / 4
+
+    def _eval_as_leading_term(self, x, logx=None, cdir=0):  # acsc
         arg = self.args[0]
         x0 = arg.subs(x, 0).cancel()
-        # Handling Branch cuts (-1, 1)
+        # Handling branch points
         if x0 in (-S.One, S.One, S.Zero):
             return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         if x0 is S.ComplexInfinity:
             return (1/arg).as_leading_term(x)
-        if cdir != 0:
-            cdir = arg.dir(x, cdir)
-        if im(cdir) < 0 and x0.is_real and x0 > S.Zero and x0 < S.One:
-            return pi - self.func(x0)
-        elif im(cdir) > 0 and x0.is_real and x0 < S.Zero and x0 > S.NegativeOne:
-            return -pi - self.func(x0)
+        # Handling points lying on branch cuts (-1, 1)
+        if x0.is_real and (1 - x0**2).is_positive:
+            ndir = arg.dir(x, cdir if cdir else 1)
+            if im(ndir).is_negative:
+                if x0.is_positive:
+                    return pi - self.func(x0)
+            elif im(ndir).is_positive:
+                if x0.is_negative:
+                    return -pi - self.func(x0)
+            else:
+                return self.rewrite(log)._eval_as_leading_term(x, logx=logx, cdir=cdir).expand()
         return self.func(x0)
 
     def _eval_nseries(self, x, n, logx, cdir=0):  # acsc
@@ -3356,6 +3427,7 @@ def _eval_nseries(self, x, n, logx, cdir=0):  # acsc
 
     def _eval_rewrite_as_log(self, arg, **kwargs):
         return -S.ImaginaryUnit*log(S.ImaginaryUnit/arg + sqrt(1 - 1/arg**2))
+
     _eval_rewrite_as_tractable = _eval_rewrite_as_log
 
     def _eval_rewrite_as_asin(self, arg, **kwargs):
diff --git a/sympy/series/limits.py b/sympy/series/limits.py
index 1bac908dcd..da6dd10501 100644
--- a/sympy/series/limits.py
+++ b/sympy/series/limits.py
@@ -212,6 +212,20 @@ def doit(self, **hints):
 
         e, z, z0, dir = self.args
 
+        if str(dir) == '+-':
+            r = limit(e, z, z0, dir='+')
+            l = limit(e, z, z0, dir='-')
+            if isinstance(r, Limit) and isinstance(l, Limit):
+                if r.args[0] == l.args[0]:
+                    return self
+            if r == l:
+                return l
+            if r.is_infinite and l.is_infinite:
+                return S.ComplexInfinity
+            raise ValueError("The limit does not exist since "
+                             "left hand limit = %s and right hand limit = %s"
+                             % (l, r))
+
         if z0 is S.ComplexInfinity:
             raise NotImplementedError("Limits at complex "
                                     "infinity are not implemented")
@@ -351,15 +365,7 @@ def set_signs(expr):
         l = None
 
         try:
-            if str(dir) == '+-':
-                r = gruntz(e, z, z0, '+')
-                l = gruntz(e, z, z0, '-')
-                if l != r:
-                    raise ValueError("The limit does not exist since "
-                            "left hand limit = %s and right hand limit = %s"
-                            % (l, r))
-            else:
-                r = gruntz(e, z, z0, dir)
+            r = gruntz(e, z, z0, dir)
             if r is S.NaN or l is S.NaN:
                 raise PoleError()
         except (PoleError, ValueError):


Test patch:
diff --git a/sympy/core/tests/test_power.py b/sympy/core/tests/test_power.py
index 5cdb5855d0..f3fcb8a1e3 100644
--- a/sympy/core/tests/test_power.py
+++ b/sympy/core/tests/test_power.py
@@ -298,10 +298,20 @@ def test_nseries():
     assert sqrt(I*x - 1)._eval_nseries(x, 4, None, -1) == -I - x/2 - I*x**2/8 + x**3/16 + O(x**4)
     assert cbrt(I*x - 1)._eval_nseries(x, 4, None, 1) == (-1)**(S(1)/3) - (-1)**(S(5)/6)*x/3 + \
     (-1)**(S(1)/3)*x**2/9 + 5*(-1)**(S(5)/6)*x**3/81 + O(x**4)
-    assert cbrt(I*x - 1)._eval_nseries(x, 4, None, -1) == (-1)**(S(1)/3)*exp(-2*I*pi/3) - \
-    (-1)**(S(5)/6)*x*exp(-2*I*pi/3)/3 + (-1)**(S(1)/3)*x**2*exp(-2*I*pi/3)/9 + \
-    5*(-1)**(S(5)/6)*x**3*exp(-2*I*pi/3)/81 + O(x**4)
+    assert cbrt(I*x - 1)._eval_nseries(x, 4, None, -1) == -(-1)**(S(2)/3) - (-1)**(S(1)/6)*x/3 - \
+    (-1)**(S(2)/3)*x**2/9 + 5*(-1)**(S(1)/6)*x**3/81 + O(x**4)
     assert (1 / (exp(-1/x) + 1/x))._eval_nseries(x, 2, None) == x + O(x**2)
+    # test issue 23752
+    assert sqrt(-I*x**2 + x - 3)._eval_nseries(x, 4, None, 1) == -sqrt(3)*I + sqrt(3)*I*x/6 - \
+    sqrt(3)*I*x**2*(-S(1)/72 + I/6) - sqrt(3)*I*x**3*(-S(1)/432 + I/36) + O(x**4)
+    assert sqrt(-I*x**2 + x - 3)._eval_nseries(x, 4, None, -1) == -sqrt(3)*I + sqrt(3)*I*x/6 - \
+    sqrt(3)*I*x**2*(-S(1)/72 + I/6) - sqrt(3)*I*x**3*(-S(1)/432 + I/36) + O(x**4)
+    assert cbrt(-I*x**2 + x - 3)._eval_nseries(x, 4, None, 1) == -(-1)**(S(2)/3)*3**(S(1)/3) + \
+    (-1)**(S(2)/3)*3**(S(1)/3)*x/9 - (-1)**(S(2)/3)*3**(S(1)/3)*x**2*(-S(1)/81 + I/9) - \
+    (-1)**(S(2)/3)*3**(S(1)/3)*x**3*(-S(5)/2187 + 2*I/81) + O(x**4)
+    assert cbrt(-I*x**2 + x - 3)._eval_nseries(x, 4, None, -1) == -(-1)**(S(2)/3)*3**(S(1)/3) + \
+    (-1)**(S(2)/3)*3**(S(1)/3)*x/9 - (-1)**(S(2)/3)*3**(S(1)/3)*x**2*(-S(1)/81 + I/9) - \
+    (-1)**(S(2)/3)*3**(S(1)/3)*x**3*(-S(5)/2187 + 2*I/81) + O(x**4)
 
 
 def test_issue_6100_12942_4473():
diff --git a/sympy/functions/elementary/tests/test_hyperbolic.py b/sympy/functions/elementary/tests/test_hyperbolic.py
index 18b01a8f56..00fb2715dc 100644
--- a/sympy/functions/elementary/tests/test_hyperbolic.py
+++ b/sympy/functions/elementary/tests/test_hyperbolic.py
@@ -564,6 +564,24 @@ def test_asinh_rewrite():
     assert asinh(x).rewrite(acos) == I*(-I*asinh(x) + pi/2) - I*pi/2
 
 
+def test_asinh_leading_term():
+    x = Symbol('x')
+    assert asinh(x).as_leading_term(x, cdir=1) == x
+    # Tests concerning branch points
+    assert asinh(x + I).as_leading_term(x, cdir=1) == I*pi/2
+    assert asinh(x - I).as_leading_term(x, cdir=1) == -I*pi/2
+    assert asinh(1/x).as_leading_term(x, cdir=1) == -log(x) + log(2)
+    assert asinh(1/x).as_leading_term(x, cdir=-1) == log(x) - log(2) - I*pi
+    # Tests concerning points lying on branch cuts
+    assert asinh(x + 2*I).as_leading_term(x, cdir=1) == I*asin(2)
+    assert asinh(x + 2*I).as_leading_term(x, cdir=-1) == -I*asin(2) + I*pi
+    assert asinh(x - 2*I).as_leading_term(x, cdir=1) == -I*pi + I*asin(2)
+    assert asinh(x - 2*I).as_leading_term(x, cdir=-1) == -I*asin(2)
+    # Tests concerning re(ndir) == 0
+    assert asinh(2*I + I*x - x**2).as_leading_term(x, cdir=1) == log(2 - sqrt(3)) + I*pi/2
+    assert asinh(2*I + I*x - x**2).as_leading_term(x, cdir=-1) == log(2 - sqrt(3)) + I*pi/2
+
+
 def test_asinh_series():
     x = Symbol('x')
     assert asinh(x).series(x, 0, 8) == \
@@ -651,6 +669,26 @@ def test_acosh_rewrite():
         sqrt(x - 1)*sqrt(x + 1)*atanh(sqrt(x**2 - 1)/x)/sqrt(x**2 - 1)
 
 
+def test_acosh_leading_term():
+    x = Symbol('x')
+    # Tests concerning branch points
+    assert acosh(x).as_leading_term(x) == I*pi/2
+    assert acosh(x + 1).as_leading_term(x) == sqrt(2)*sqrt(x)
+    assert acosh(x - 1).as_leading_term(x) == I*pi
+    assert acosh(1/x).as_leading_term(x, cdir=1) == -log(x) + log(2)
+    assert acosh(1/x).as_leading_term(x, cdir=-1) == -log(x) + log(2) + 2*I*pi
+    # Tests concerning points lying on branch cuts
+    assert acosh(I*x - 2).as_leading_term(x, cdir=1) == acosh(-2)
+    assert acosh(-I*x - 2).as_leading_term(x, cdir=1) == -2*I*pi + acosh(-2)
+    assert acosh(x**2 - I*x + S(1)/3).as_leading_term(x, cdir=1) == -acosh(S(1)/3)
+    assert acosh(x**2 - I*x + S(1)/3).as_leading_term(x, cdir=-1) == acosh(S(1)/3)
+    assert acosh(1/(I*x - 3)).as_leading_term(x, cdir=1) == -acosh(-S(1)/3)
+    assert acosh(1/(I*x - 3)).as_leading_term(x, cdir=-1) == acosh(-S(1)/3)
+    # Tests concerning im(ndir) == 0
+    assert acosh(-I*x**2 + x - 2).as_leading_term(x, cdir=1) == log(sqrt(3) + 2) - I*pi
+    assert acosh(-I*x**2 + x - 2).as_leading_term(x, cdir=-1) == log(sqrt(3) + 2) - I*pi
+
+
 def test_acosh_series():
     x = Symbol('x')
     assert acosh(x).series(x, 0, 8) == \
@@ -723,11 +761,33 @@ def test_asech():
     assert str(asech(-5*I).n(6)) == '0.19869 + 1.5708*I'
 
 
+def test_asech_leading_term():
+    x = Symbol('x')
+    # Tests concerning branch points
+    assert asech(x).as_leading_term(x, cdir=1) == -log(x) + log(2)
+    assert asech(x).as_leading_term(x, cdir=-1) == -log(x) + log(2) + 2*I*pi
+    assert asech(x + 1).as_leading_term(x, cdir=1) == sqrt(2)*I*sqrt(x)
+    assert asech(1/x).as_leading_term(x, cdir=1) == I*pi/2
+    # Tests concerning points lying on branch cuts
+    assert asech(x - 1).as_leading_term(x, cdir=1) == I*pi
+    assert asech(I*x + 3).as_leading_term(x, cdir=1) == -asech(3)
+    assert asech(-I*x + 3).as_leading_term(x, cdir=1) == asech(3)
+    assert asech(I*x - 3).as_leading_term(x, cdir=1) == -asech(-3)
+    assert asech(-I*x - 3).as_leading_term(x, cdir=1) == asech(-3)
+    assert asech(I*x - S(1)/3).as_leading_term(x, cdir=1) == -2*I*pi + asech(-S(1)/3)
+    assert asech(I*x - S(1)/3).as_leading_term(x, cdir=-1) == asech(-S(1)/3)
+    # Tests concerning im(ndir) == 0
+    assert asech(-I*x**2 + x - 3).as_leading_term(x, cdir=1) == log(-S(1)/3 + 2*sqrt(2)*I/3)
+    assert asech(-I*x**2 + x - 3).as_leading_term(x, cdir=-1) == log(-S(1)/3 + 2*sqrt(2)*I/3)
+
+
 def test_asech_series():
     x = Symbol('x')
-    t6 = asech(x).expansion_term(6, x)
+    assert asech(x).series(x, 0, 9) == log(2) - log(x) - x**2/4 - 3*x**4/32 \
+    - 5*x**6/96 - 35*x**8/1024 + O(x**9)
+    t6 = asech(x).taylor_term(6, x)
     assert t6 == -5*x**6/96
-    assert asech(x).expansion_term(8, x, t6, 0) == -35*x**8/1024
+    assert asech(x).taylor_term(8, x, t6, 0) == -35*x**8/1024
 
 
 def test_asech_rewrite():
@@ -809,6 +869,33 @@ def test_acsch_infinities():
     assert acsch(zoo) == 0
 
 
+def test_acsch_leading_term():
+    x = Symbol('x')
+    assert acsch(1/x).as_leading_term(x) == x
+    # Tests concerning branch points
+    assert acsch(x + I).as_leading_term(x) == -I*pi/2
+    assert acsch(x - I).as_leading_term(x) == I*pi/2
+    # Tests concerning points lying on branch cuts
+    assert acsch(x).as_leading_term(x, cdir=1) == -log(x) + log(2)
+    assert acsch(x).as_leading_term(x, cdir=-1) == log(x) - log(2) - I*pi
+    assert acsch(x + I/2).as_leading_term(x, cdir=1) == -I*pi - acsch(I/2)
+    assert acsch(x + I/2).as_leading_term(x, cdir=-1) == acsch(I/2)
+    assert acsch(x - I/2).as_leading_term(x, cdir=1) == -acsch(I/2)
+    assert acsch(x - I/2).as_leading_term(x, cdir=-1) == acsch(I/2) + I*pi
+    # Tests concerning re(ndir) == 0
+    assert acsch(I/2 + I*x - x**2).as_leading_term(x, cdir=1) == log(2 - sqrt(3)) - I*pi/2
+    assert acsch(I/2 + I*x - x**2).as_leading_term(x, cdir=-1) == log(2 - sqrt(3)) - I*pi/2
+
+
+def test_acsch_series():
+    x = Symbol('x')
+    assert acsch(x).series(x, 0, 9) == log(2) - log(x) + x**2/4 - 3*x**4/32 \
+    + 5*x**6/96 - 35*x**8/1024 + O(x**9)
+    t4 = acsch(x).taylor_term(4, x)
+    assert t4 == -3*x**4/32
+    assert acsch(x).taylor_term(6, x, t4, 0) == 5*x**6/96
+
+
 def test_acsch_rewrite():
     x = Symbol('x')
     assert acsch(x).rewrite(log) == log(1/x + sqrt(1/x**2 + 1))
@@ -888,6 +975,26 @@ def test_atanh_rewrite():
         pi*x/(2*sqrt(-x**2)) - sqrt(-x)*sqrt(1 - x**2)*sqrt(1/(x**2 - 1))*asinh(sqrt(1/(x**2 - 1)))/sqrt(x)
 
 
+def test_atanh_leading_term():
+    x = Symbol('x')
+    assert atanh(x).as_leading_term(x) == x
+    # Tests concerning branch points
+    assert atanh(x + 1).as_leading_term(x, cdir=1) == -log(x)/2 + log(2)/2 - I*pi/2
+    assert atanh(x + 1).as_leading_term(x, cdir=-1) == -log(x)/2 + log(2)/2 + I*pi/2
+    assert atanh(x - 1).as_leading_term(x, cdir=1) == log(x)/2 - log(2)/2
+    assert atanh(x - 1).as_leading_term(x, cdir=-1) == log(x)/2 - log(2)/2
+    assert atanh(1/x).as_leading_term(x, cdir=1) == -I*pi/2
+    assert atanh(1/x).as_leading_term(x, cdir=-1) == I*pi/2
+    # Tests concerning points lying on branch cuts
+    assert atanh(I*x + 2).as_leading_term(x, cdir=1) == atanh(2) + I*pi
+    assert atanh(-I*x + 2).as_leading_term(x, cdir=1) == atanh(2)
+    assert atanh(I*x - 2).as_leading_term(x, cdir=1) == -atanh(2)
+    assert atanh(-I*x - 2).as_leading_term(x, cdir=1) == -I*pi - atanh(2)
+    # Tests concerning im(ndir) == 0
+    assert atanh(-I*x**2 + x - 2).as_leading_term(x, cdir=1) == -log(3)/2 - I*pi/2
+    assert atanh(-I*x**2 + x - 2).as_leading_term(x, cdir=-1) == -log(3)/2 - I*pi/2
+
+
 def test_atanh_series():
     x = Symbol('x')
     assert atanh(x).series(x, 0, 10) == \
@@ -947,10 +1054,29 @@ def test_acoth_rewrite():
         x*sqrt(x**(-2))*asinh(sqrt(1/(x**2 - 1))) + I*pi*(sqrt((x - 1)/x)*sqrt(x/(x - 1)) - sqrt(x/(x + 1))*sqrt(1 + 1/x))/2
 
 
+def test_acoth_leading_term():
+    x = Symbol('x')
+    # Tests concerning branch points
+    assert acoth(x + 1).as_leading_term(x, cdir=1) == -log(x)/2 + log(2)/2
+    assert acoth(x + 1).as_leading_term(x, cdir=-1) == -log(x)/2 + log(2)/2
+    assert acoth(x - 1).as_leading_term(x, cdir=1) == log(x)/2 - log(2)/2 + I*pi/2
+    assert acoth(x - 1).as_leading_term(x, cdir=-1) == log(x)/2 - log(2)/2 - I*pi/2
+    # Tests concerning points lying on branch cuts
+    assert acoth(x).as_leading_term(x, cdir=-1) == I*pi/2
+    assert acoth(x).as_leading_term(x, cdir=1) == -I*pi/2
+    assert acoth(I*x + 1/2).as_leading_term(x, cdir=1) == acoth(1/2)
+    assert acoth(-I*x + 1/2).as_leading_term(x, cdir=1) == acoth(1/2) + I*pi
+    assert acoth(I*x - 1/2).as_leading_term(x, cdir=1) == -I*pi - acoth(1/2)
+    assert acoth(-I*x - 1/2).as_leading_term(x, cdir=1) == -acoth(1/2)
+    # Tests concerning im(ndir) == 0
+    assert acoth(-I*x**2 - x - S(1)/2).as_leading_term(x, cdir=1) == -log(3)/2 + I*pi/2
+    assert acoth(-I*x**2 - x - S(1)/2).as_leading_term(x, cdir=-1) == -log(3)/2 + I*pi/2
+
+
 def test_acoth_series():
     x = Symbol('x')
     assert acoth(x).series(x, 0, 10) == \
-        I*pi/2 + x + x**3/3 + x**5/5 + x**7/7 + x**9/9 + O(x**10)
+        -I*pi/2 + x + x**3/3 + x**5/5 + x**7/7 + x**9/9 + O(x**10)
 
 
 def test_acoth_fdiff():
@@ -976,11 +1102,9 @@ def test_leading_term():
     x = Symbol('x')
     assert cosh(x).as_leading_term(x) == 1
     assert coth(x).as_leading_term(x) == 1/x
-    assert acosh(x).as_leading_term(x) == I*pi/2
-    assert acoth(x).as_leading_term(x) == I*pi/2
-    for func in [sinh, tanh, asinh, atanh]:
+    for func in [sinh, tanh]:
         assert func(x).as_leading_term(x) == x
-    for func in [sinh, cosh, tanh, coth, asinh, acosh, atanh, acoth]:
+    for func in [sinh, cosh, tanh, coth]:
         for ar in (1/x, S.Half):
             eq = func(ar)
             assert eq.as_leading_term(x) == eq
diff --git a/sympy/functions/elementary/tests/test_trigonometric.py b/sympy/functions/elementary/tests/test_trigonometric.py
index ec65eb5bca..8f90d5508b 100644
--- a/sympy/functions/elementary/tests/test_trigonometric.py
+++ b/sympy/functions/elementary/tests/test_trigonometric.py
@@ -927,12 +927,22 @@ def test_asin_series():
     assert t5 == 3*x**5/40
     assert asin(x).taylor_term(7, x, t5, 0) == 5*x**7/112
 
+
 def test_asin_leading_term():
     assert asin(x).as_leading_term(x) == x
+    # Tests concerning branch points
     assert asin(x + 1).as_leading_term(x) == pi/2
     assert asin(x - 1).as_leading_term(x) == -pi/2
     assert asin(1/x).as_leading_term(x, cdir=1) == I*log(x) + pi/2 - I*log(2)
     assert asin(1/x).as_leading_term(x, cdir=-1) == -I*log(x) - 3*pi/2 + I*log(2)
+    # Tests concerning points lying on branch cuts
+    assert asin(I*x + 2).as_leading_term(x, cdir=1) == pi - asin(2)
+    assert asin(-I*x + 2).as_leading_term(x, cdir=1) == asin(2)
+    assert asin(I*x - 2).as_leading_term(x, cdir=1) == -asin(2)
+    assert asin(-I*x - 2).as_leading_term(x, cdir=1) == -pi + asin(2)
+    # Tests concerning im(ndir) == 0
+    assert asin(-I*x**2 + x - 2).as_leading_term(x, cdir=1) == -pi/2 + I*log(2 - sqrt(3))
+    assert asin(-I*x**2 + x - 2).as_leading_term(x, cdir=-1) == -pi/2 + I*log(2 - sqrt(3))
 
 
 def test_asin_rewrite():
@@ -995,10 +1005,19 @@ def test_acos():
 
 def test_acos_leading_term():
     assert acos(x).as_leading_term(x) == pi/2
+    # Tests concerning branch points
     assert acos(x + 1).as_leading_term(x) == sqrt(2)*sqrt(-x)
     assert acos(x - 1).as_leading_term(x) == pi
     assert acos(1/x).as_leading_term(x, cdir=1) == -I*log(x) + I*log(2)
     assert acos(1/x).as_leading_term(x, cdir=-1) == I*log(x) + 2*pi - I*log(2)
+    # Tests concerning points lying on branch cuts
+    assert acos(I*x + 2).as_leading_term(x, cdir=1) == -acos(2)
+    assert acos(-I*x + 2).as_leading_term(x, cdir=1) == acos(2)
+    assert acos(I*x - 2).as_leading_term(x, cdir=1) == acos(-2)
+    assert acos(-I*x - 2).as_leading_term(x, cdir=1) == 2*pi - acos(-2)
+    # Tests concerning im(ndir) == 0
+    assert acos(-I*x**2 + x - 2).as_leading_term(x, cdir=1) == pi + I*log(sqrt(3) + 2)
+    assert acos(-I*x**2 + x - 2).as_leading_term(x, cdir=-1) == pi + I*log(sqrt(3) + 2)
 
 
 def test_acos_series():
@@ -1102,12 +1121,21 @@ def test_atan_fdiff():
 
 def test_atan_leading_term():
     assert atan(x).as_leading_term(x) == x
+    assert atan(1/x).as_leading_term(x, cdir=1) == pi/2
+    assert atan(1/x).as_leading_term(x, cdir=-1) == -pi/2
+    # Tests concerning branch points
     assert atan(x + I).as_leading_term(x, cdir=1) == -I*log(x)/2 + pi/4 + I*log(2)/2
     assert atan(x + I).as_leading_term(x, cdir=-1) == -I*log(x)/2 - 3*pi/4 + I*log(2)/2
     assert atan(x - I).as_leading_term(x, cdir=1) == I*log(x)/2 + pi/4 - I*log(2)/2
     assert atan(x - I).as_leading_term(x, cdir=-1) == I*log(x)/2 + pi/4 - I*log(2)/2
-    assert atan(1/x).as_leading_term(x, cdir=1) == pi/2
-    assert atan(1/x).as_leading_term(x, cdir=-1) == -pi/2
+    # Tests concerning points lying on branch cuts
+    assert atan(x + 2*I).as_leading_term(x, cdir=1) == I*atanh(2)
+    assert atan(x + 2*I).as_leading_term(x, cdir=-1) == -pi + I*atanh(2)
+    assert atan(x - 2*I).as_leading_term(x, cdir=1) == pi - I*atanh(2)
+    assert atan(x - 2*I).as_leading_term(x, cdir=-1) == -I*atanh(2)
+    # Tests concerning re(ndir) == 0
+    assert atan(2*I - I*x - x**2).as_leading_term(x, cdir=1) == -pi/2 + I*log(3)/2
+    assert atan(2*I - I*x - x**2).as_leading_term(x, cdir=-1) == -pi/2 + I*log(3)/2
 
 
 def test_atan2():
@@ -1240,13 +1268,22 @@ def test_acot_fdiff():
     raises(ArgumentIndexError, lambda: acot(x).fdiff(2))
 
 def test_acot_leading_term():
-    assert acot(x).as_leading_term(x, cdir=1) == pi/2
-    assert acot(x).as_leading_term(x, cdir=-1) == -pi/2
+    assert acot(1/x).as_leading_term(x) == x
+    # Tests concerning branch points
     assert acot(x + I).as_leading_term(x, cdir=1) == I*log(x)/2 + pi/4 - I*log(2)/2
     assert acot(x + I).as_leading_term(x, cdir=-1) == I*log(x)/2 + pi/4 - I*log(2)/2
     assert acot(x - I).as_leading_term(x, cdir=1) == -I*log(x)/2 + pi/4 + I*log(2)/2
     assert acot(x - I).as_leading_term(x, cdir=-1) == -I*log(x)/2 - 3*pi/4 + I*log(2)/2
-    assert acot(1/x).as_leading_term(x) == x
+    # Tests concerning points lying on branch cuts
+    assert acot(x).as_leading_term(x, cdir=1) == pi/2
+    assert acot(x).as_leading_term(x, cdir=-1) == -pi/2
+    assert acot(x + I/2).as_leading_term(x, cdir=1) == pi - I*acoth(S(1)/2)
+    assert acot(x + I/2).as_leading_term(x, cdir=-1) == -I*acoth(S(1)/2)
+    assert acot(x - I/2).as_leading_term(x, cdir=1) == I*acoth(S(1)/2)
+    assert acot(x - I/2).as_leading_term(x, cdir=-1) == -pi + I*acoth(S(1)/2)
+    # Tests concerning re(ndir) == 0
+    assert acot(I/2 - I*x - x**2).as_leading_term(x, cdir=1) == -pi/2 - I*log(3)/2
+    assert acot(I/2 - I*x - x**2).as_leading_term(x, cdir=-1) == -pi/2 - I*log(3)/2
 
 
 def test_attributes():
@@ -1780,11 +1817,29 @@ def test_asec_is_real():
 
 
 def test_asec_leading_term():
-    assert asec(x).as_leading_term(x, cdir=1) == -I*log(x) + I*log(2)
-    assert asec(x).as_leading_term(x, cdir=-1) == I*log(x) + 2*pi - I*log(2)
+    assert asec(1/x).as_leading_term(x) == pi/2
+    # Tests concerning branch points
     assert asec(x + 1).as_leading_term(x) == sqrt(2)*sqrt(x)
     assert asec(x - 1).as_leading_term(x) == pi
-    assert asec(1/x).as_leading_term(x) == pi/2
+    # Tests concerning points lying on branch cuts
+    assert asec(x).as_leading_term(x, cdir=1) == -I*log(x) + I*log(2)
+    assert asec(x).as_leading_term(x, cdir=-1) == I*log(x) + 2*pi - I*log(2)
+    assert asec(I*x + 1/2).as_leading_term(x, cdir=1) == asec(1/2)
+    assert asec(-I*x + 1/2).as_leading_term(x, cdir=1) == -asec(1/2)
+    assert asec(I*x - 1/2).as_leading_term(x, cdir=1) == 2*pi - asec(-1/2)
+    assert asec(-I*x - 1/2).as_leading_term(x, cdir=1) == asec(-1/2)
+    # Tests concerning im(ndir) == 0
+    assert asec(-I*x**2 + x - S(1)/2).as_leading_term(x, cdir=1) == pi + I*log(2 - sqrt(3))
+    assert asec(-I*x**2 + x - S(1)/2).as_leading_term(x, cdir=-1) == pi + I*log(2 - sqrt(3))
+
+
+def test_asec_series():
+    assert asec(x).series(x, 0, 9) == \
+        I*log(2) - I*log(x) - I*x**2/4 - 3*I*x**4/32 \
+        - 5*I*x**6/96 - 35*I*x**8/1024 + O(x**9)
+    t4 = asec(x).taylor_term(4, x)
+    assert t4 == -3*I*x**4/32
+    assert asec(x).taylor_term(6, x, t4, 0) == -5*I*x**6/96
 
 
 def test_acsc():
@@ -1840,29 +1895,43 @@ def test_csc_rewrite():
            -1/cos(-pi/2 - 1 + cos(I*besselj(I, I)) +
                   I*cos(-pi/2 + I*besselj(I, I), evaluate=False), evaluate=False)
 
+
 def test_acsc_leading_term():
-    assert acsc(x).as_leading_term(x, cdir=1) == I*log(x) + pi/2 - I*log(2)
-    assert acsc(x).as_leading_term(x, cdir=-1) == -I*log(x) - 3*pi/2 + I*log(2)
+    assert acsc(1/x).as_leading_term(x) == x
+    # Tests concerning branch points
     assert acsc(x + 1).as_leading_term(x) == pi/2
     assert acsc(x - 1).as_leading_term(x) == -pi/2
-    assert acsc(1/x).as_leading_term(x) == x
-
-
-def test_inverses_nseries():
-    assert asin(x + 2)._eval_nseries(x, 4, None, I) == -asin(2) + pi + sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 + \
-    sqrt(3)*I*x**3/18 + O(x**4)
-    assert asin(x + 2)._eval_nseries(x, 4, None, -I) == asin(2) - sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
-    assert asin(x - 2)._eval_nseries(x, 4, None, I) == -asin(2) - sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
-    assert asin(x - 2)._eval_nseries(x, 4, None, -I) == asin(2) - pi + sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 + \
-    sqrt(3)*I*x**3/18 + O(x**4)
-    assert asin(I*x + I*x**3 + 2)._eval_nseries(x, 3, None, 1) == -asin(2) + pi - sqrt(3)*x/3 + sqrt(3)*I*x**2/9 + O(x**3)
-    assert asin(I*x + I*x**3 + 2)._eval_nseries(x, 3, None, -1) == asin(2) + sqrt(3)*x/3 - sqrt(3)*I*x**2/9 + O(x**3)
-    assert asin(I*x + I*x**3 - 2)._eval_nseries(x, 3, None, 1) == -asin(2) + sqrt(3)*x/3 + sqrt(3)*I*x**2/9 + O(x**3)
-    assert asin(I*x + I*x**3 - 2)._eval_nseries(x, 3, None, -1) == asin(2) - pi - sqrt(3)*x/3 - sqrt(3)*I*x**2/9 + O(x**3)
-    assert asin(I*x**2 + I*x**3 + 2)._eval_nseries(x, 3, None, 1) == -asin(2) + pi - sqrt(3)*x**2/3 + O(x**3)
-    assert asin(I*x**2 + I*x**3 + 2)._eval_nseries(x, 3, None, -1) == -asin(2) + pi - sqrt(3)*x**2/3 + O(x**3)
-    assert asin(I*x**2 + I*x**3 - 2)._eval_nseries(x, 3, None, 1) == -asin(2) + sqrt(3)*x**2/3 + O(x**3)
-    assert asin(I*x**2 + I*x**3 - 2)._eval_nseries(x, 3, None, -1) == -asin(2) + sqrt(3)*x**2/3 + O(x**3)
+    # Tests concerning points lying on branch cuts
+    assert acsc(x).as_leading_term(x, cdir=1) == I*log(x) + pi/2 - I*log(2)
+    assert acsc(x).as_leading_term(x, cdir=-1) == -I*log(x) - 3*pi/2 + I*log(2)
+    assert acsc(I*x + 1/2).as_leading_term(x, cdir=1) == acsc(1/2)
+    assert acsc(-I*x + 1/2).as_leading_term(x, cdir=1) == pi - acsc(1/2)
+    assert acsc(I*x - 1/2).as_leading_term(x, cdir=1) == -pi - acsc(-1/2)
+    assert acsc(-I*x - 1/2).as_leading_term(x, cdir=1) == -acsc(1/2)
+    # Tests concerning im(ndir) == 0
+    assert acsc(-I*x**2 + x - S(1)/2).as_leading_term(x, cdir=1) == -pi/2 + I*log(sqrt(3) + 2)
+    assert acsc(-I*x**2 + x - S(1)/2).as_leading_term(x, cdir=-1) == -pi/2 + I*log(sqrt(3) + 2)
+
+
+def test_acsc_series():
+    assert acsc(x).series(x, 0, 9) == \
+        -I*log(2) + pi/2 + I*log(x) + I*x**2/4 \
+        + 3*I*x**4/32 + 5*I*x**6/96 + 35*I*x**8/1024 + O(x**9)
+    t6 = acsc(x).taylor_term(6, x)
+    assert t6 == 5*I*x**6/96
+    assert acsc(x).taylor_term(8, x, t6, 0) == 35*I*x**8/1024
+
+
+def test_asin_nseries():
+    assert asin(x + 2)._eval_nseries(x, 4, None, I) == -asin(2) + pi + \
+    sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
+    assert asin(x + 2)._eval_nseries(x, 4, None, -I) == asin(2) - \
+    sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
+    assert asin(x - 2)._eval_nseries(x, 4, None, I) == -asin(2) - \
+    sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
+    assert asin(x - 2)._eval_nseries(x, 4, None, -I) == asin(2) - pi + \
+    sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
+    # testing nseries for asin at branch points
     assert asin(1 + x)._eval_nseries(x, 3, None) == pi/2 - sqrt(2)*sqrt(-x) - \
     sqrt(2)*(-x)**(S(3)/2)/12 - 3*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
     assert asin(-1 + x)._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(x) + \
@@ -1872,87 +1941,91 @@ def test_inverses_nseries():
     assert asin(-exp(x))._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(-x) - \
     sqrt(2)*(-x)**(S(3)/2)/6 + sqrt(2)*(-x)**(S(5)/2)/120 + O(x**3)
 
-    assert acos(x + 2)._eval_nseries(x, 4, None, I) == -acos(2) - sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
-    assert acos(x + 2)._eval_nseries(x, 4, None, -I) == acos(2) + sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
-    assert acos(x - 2)._eval_nseries(x, 4, None, I) == acos(-2) + sqrt(3)*I*x/3 + sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
-    assert acos(x - 2)._eval_nseries(x, 4, None, -I) == -acos(-2) + 2*pi - sqrt(3)*I*x/3 - \
+
+def test_acos_nseries():
+    assert acos(x + 2)._eval_nseries(x, 4, None, I) == -acos(2) - sqrt(3)*I*x/3 + \
     sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
-    # assert acos(I*x + I*x**3 + 2)._eval_nseries(x, 3, None, 1) == -acos(2) + sqrt(3)*x/3 - sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acos(I*x + I*x**3 + 2)._eval_nseries(x, 3, None, -1) == acos(2) - sqrt(3)*x/3 + sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acos(I*x + I*x**3 - 2)._eval_nseries(x, 3, None, 1) == acos(-2) - sqrt(3)*x/3 - sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acos(I*x + I*x**3 - 2)._eval_nseries(x, 3, None, -1) == -acos(-2) + 2*pi + sqrt(3)*x/3 + sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acos(I*x**2 + I*x**3 + 2)._eval_nseries(x, 3, None, 1) == -acos(2) + sqrt(3)*x**2/3 + O(x**3)
-    # assert acos(I*x**2 + I*x**3 + 2)._eval_nseries(x, 3, None, -1) == -acos(2) + sqrt(3)*x**2/3 + O(x**3)
-    # assert acos(I*x**2 + I*x**3 - 2)._eval_nseries(x, 3, None, 1) == acos(-2) - sqrt(3)*x**2/3 + O(x**3)
-    # assert acos(I*x**2 + I*x**3 - 2)._eval_nseries(x, 3, None, -1) == acos(-2) - sqrt(3)*x**2/3 + O(x**3)
-    # assert acos(1 + x)._eval_nseries(x, 3, None) == sqrt(2)*sqrt(-x) + sqrt(2)*(-x)**(S(3)/2)/12 + 3*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
-    # assert acos(-1 + x)._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(x) - sqrt(2)*x**(S(3)/2)/12 - 3*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
-    # assert acos(exp(x))._eval_nseries(x, 3, None) == sqrt(2)*sqrt(-x) - sqrt(2)*(-x)**(S(3)/2)/6 + sqrt(2)*(-x)**(S(5)/2)/120 + O(x**3)
-    # assert acos(-exp(x))._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(-x) + sqrt(2)*(-x)**(S(3)/2)/6 - sqrt(2)*(-x)**(S(5)/2)/120 + O(x**3)
-
-    assert atan(x + 2*I)._eval_nseries(x, 4, None, 1) == I*atanh(2) - x/3 - 2*I*x**2/9 + 13*x**3/81 + O(x**4)
-    assert atan(x + 2*I)._eval_nseries(x, 4, None, -1) == I*atanh(2) - pi - x/3 - 2*I*x**2/9 + 13*x**3/81 + O(x**4)
-    assert atan(x - 2*I)._eval_nseries(x, 4, None, 1) == -I*atanh(2) + pi - x/3 + 2*I*x**2/9 + 13*x**3/81 + O(x**4)
-    assert atan(x - 2*I)._eval_nseries(x, 4, None, -1) == -I*atanh(2) - x/3 + 2*I*x**2/9 + 13*x**3/81 + O(x**4)
-    # assert atan(x**2 + 2*I)._eval_nseries(x, 3, None, 1) == I*atanh(2) - x**2/3 + O(x**3)
-    # assert atan(x**2 + 2*I)._eval_nseries(x, 3, None, -1) == I*atanh(2) - x**2/3 + O(x**3)
-    # assert atan(x**2 - 2*I)._eval_nseries(x, 3, None, 1) == -I*atanh(2) + pi - x**2/3 + O(x**3)
-    # assert atan(x**2 - 2*I)._eval_nseries(x, 3, None, -1) == -I*atanh(2) + pi - x**2/3 + O(x**3)
+    assert acos(x + 2)._eval_nseries(x, 4, None, -I) == acos(2) + sqrt(3)*I*x/3 - \
+    sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
+    assert acos(x - 2)._eval_nseries(x, 4, None, I) == acos(-2) + sqrt(3)*I*x/3 + \
+    sqrt(3)*I*x**2/9 + sqrt(3)*I*x**3/18 + O(x**4)
+    assert acos(x - 2)._eval_nseries(x, 4, None, -I) == -acos(-2) + 2*pi - \
+    sqrt(3)*I*x/3 - sqrt(3)*I*x**2/9 - sqrt(3)*I*x**3/18 + O(x**4)
+    # testing nseries for acos at branch points
+    assert acos(1 + x)._eval_nseries(x, 3, None) == sqrt(2)*sqrt(-x) + \
+    sqrt(2)*(-x)**(S(3)/2)/12 + 3*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
+    assert acos(-1 + x)._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(x) - \
+    sqrt(2)*x**(S(3)/2)/12 - 3*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
+    assert acos(exp(x))._eval_nseries(x, 3, None) == sqrt(2)*sqrt(-x) - \
+    sqrt(2)*(-x)**(S(3)/2)/6 + sqrt(2)*(-x)**(S(5)/2)/120 + O(x**3)
+    assert acos(-exp(x))._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(-x) + \
+    sqrt(2)*(-x)**(S(3)/2)/6 - sqrt(2)*(-x)**(S(5)/2)/120 + O(x**3)
+
+
+def test_atan_nseries():
+    assert atan(x + 2*I)._eval_nseries(x, 4, None, 1) == I*atanh(2) - x/3 - \
+    2*I*x**2/9 + 13*x**3/81 + O(x**4)
+    assert atan(x + 2*I)._eval_nseries(x, 4, None, -1) == I*atanh(2) - pi - \
+    x/3 - 2*I*x**2/9 + 13*x**3/81 + O(x**4)
+    assert atan(x - 2*I)._eval_nseries(x, 4, None, 1) == -I*atanh(2) + pi - \
+    x/3 + 2*I*x**2/9 + 13*x**3/81 + O(x**4)
+    assert atan(x - 2*I)._eval_nseries(x, 4, None, -1) == -I*atanh(2) - x/3 + \
+    2*I*x**2/9 + 13*x**3/81 + O(x**4)
     assert atan(1/x)._eval_nseries(x, 2, None, 1) == pi/2 - x + O(x**2)
     assert atan(1/x)._eval_nseries(x, 2, None, -1) == -pi/2 - x + O(x**2)
 
-    assert acot(x + S(1)/2*I)._eval_nseries(x, 4, None, 1) == -I*acoth(S(1)/2) + pi - 4*x/3 + 8*I*x**2/9 + 112*x**3/81 + O(x**4)
-    assert acot(x + S(1)/2*I)._eval_nseries(x, 4, None, -1) == -I*acoth(S(1)/2) - 4*x/3 + 8*I*x**2/9 + 112*x**3/81 + O(x**4)
-    assert acot(x - S(1)/2*I)._eval_nseries(x, 4, None, 1) == I*acoth(S(1)/2) - 4*x/3 - 8*I*x**2/9 + 112*x**3/81 + O(x**4)
-    assert acot(x - S(1)/2*I)._eval_nseries(x, 4, None, -1) == I*acoth(S(1)/2) - pi - 4*x/3 - 8*I*x**2/9 + 112*x**3/81 + O(x**4)
-    # assert acot(x**2 + S(1)/2*I)._eval_nseries(x, 3, None, 1) == -I*acoth(S(1)/2) + pi - 4*x**2/3 + O(x**3)
-    # assert acot(x**2 + S(1)/2*I)._eval_nseries(x, 3, None, -1) == -I*acoth(S(1)/2) + pi - 4*x**2/3 + O(x**3)
-    # assert acot(x**2 - S(1)/2*I)._eval_nseries(x, 3, None, 1) == I*acoth(S(1)/2) - 4*x**2/3 + O(x**3)
-    # assert acot(x**2 - S(1)/2*I)._eval_nseries(x, 3, None, -1) == I*acoth(S(1)/2) - 4*x**2/3 + O(x**3)
-    # assert acot(x)._eval_nseries(x, 2, None, 1) == pi/2 - x + O(x**2)
-    # assert acot(x)._eval_nseries(x, 2, None, -1) == -pi/2 - x + O(x**2)
-
-    assert asec(x + S(1)/2)._eval_nseries(x, 4, None, I) == asec(S(1)/2) - 4*sqrt(3)*I*x/3 + \
-    8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert asec(x + S(1)/2)._eval_nseries(x, 4, None, -I) == -asec(S(1)/2) + 4*sqrt(3)*I*x/3 - \
-    8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert asec(x - S(1)/2)._eval_nseries(x, 4, None, I) == -asec(-S(1)/2) + 2*pi + 4*sqrt(3)*I*x/3 + \
-    8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert asec(x - S(1)/2)._eval_nseries(x, 4, None, -I) == asec(-S(1)/2) - 4*sqrt(3)*I*x/3 - \
-    8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
-    # assert asec(I*x + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, 1) == asec(S(1)/2) + 4*sqrt(3)*x/3 - 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert asec(I*x + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, -1) == -asec(S(1)/2) - 4*sqrt(3)*x/3 + 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert asec(I*x + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, 1) == -asec(-S(1)/2) + 2*pi - 4*sqrt(3)*x/3 - 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert asec(I*x + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, -1) == asec(-S(1)/2) + 4*sqrt(3)*x/3 + 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert asec(I*x**2 + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, 1) == asec(S(1)/2) + 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert asec(I*x**2 + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, -1) == asec(S(1)/2) + 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert asec(I*x**2 + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, 1) == -asec(-S(1)/2) + 2*pi - 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert asec(I*x**2 + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, -1) == -asec(-S(1)/2) + 2*pi - 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert asec(1 + x)._eval_nseries(x, 3, None) == sqrt(2)*sqrt(x) - 5*sqrt(2)*x**(S(3)/2)/12 + 43*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
-    # assert asec(-1 + x)._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(-x) + 5*sqrt(2)*(-x)**(S(3)/2)/12 - 43*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
-    # assert asec(exp(x))._eval_nseries(x, 3, None) == sqrt(2)*sqrt(x) - sqrt(2)*x**(S(3)/2)/6 + sqrt(2)*x**(S(5)/2)/120 + O(x**3)
-    # assert asec(-exp(x))._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(x) + sqrt(2)*x**(S(3)/2)/6 - sqrt(2)*x**(S(5)/2)/120 + O(x**3)
-
-    assert acsc(x + S(1)/2)._eval_nseries(x, 4, None, I) == acsc(S(1)/2) + 4*sqrt(3)*I*x/3 - \
-    8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert acsc(x + S(1)/2)._eval_nseries(x, 4, None, -I) == -acsc(S(1)/2) + pi - 4*sqrt(3)*I*x/3 + \
-    8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert acsc(x - S(1)/2)._eval_nseries(x, 4, None, I) == acsc(S(1)/2) - pi - 4*sqrt(3)*I*x/3 - \
-    8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
-    assert acsc(x - S(1)/2)._eval_nseries(x, 4, None, -I) == -acsc(S(1)/2) + 4*sqrt(3)*I*x/3 + \
-    8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
-    # assert acsc(I*x + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, 1) == acsc(S(1)/2) - 4*sqrt(3)*x/3 + 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acsc(I*x + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, -1) == -acsc(S(1)/2) + pi + 4*sqrt(3)*x/3 - 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acsc(I*x + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, 1) == acsc(S(1)/2) - pi + 4*sqrt(3)*x/3 + 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acsc(I*x + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, -1) == -acsc(S(1)/2) - 4*sqrt(3)*x/3 - 8*sqrt(3)*I*x**2/9 + O(x**3)
-    # assert acsc(I*x**2 + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, 1) == acsc(S(1)/2) - 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert acsc(I*x**2 + I*x**3 + S(1)/2)._eval_nseries(x, 3, None, -1) == acsc(S(1)/2) - 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert acsc(I*x**2 + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, 1) == acsc(S(1)/2) - pi + 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert acsc(I*x**2 + I*x**3 - S(1)/2)._eval_nseries(x, 3, None, -1) == acsc(S(1)/2) - pi + 4*sqrt(3)*x**2/3 + O(x**3)
-    # assert acsc(1 + x)._eval_nseries(x, 3, None) == pi/2 - sqrt(2)*sqrt(x) + 5*sqrt(2)*x**(S(3)/2)/12 - 43*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
-    # assert acsc(-1 + x)._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(-x) - 5*sqrt(2)*(-x)**(S(3)/2)/12 + 43*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
-    # assert acsc(exp(x))._eval_nseries(x, 3, None) == pi/2 - sqrt(2)*sqrt(x) + sqrt(2)*x**(S(3)/2)/6 - sqrt(2)*x**(S(5)/2)/120 + O(x**3)
-    # assert acsc(-exp(x))._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(x) - sqrt(2)*x**(S(3)/2)/6 + sqrt(2)*x**(S(5)/2)/120 + O(x**3)
+
+def test_acot_nseries():
+    assert acot(x + S(1)/2*I)._eval_nseries(x, 4, None, 1) == -I*acoth(S(1)/2) + \
+    pi - 4*x/3 + 8*I*x**2/9 + 112*x**3/81 + O(x**4)
+    assert acot(x + S(1)/2*I)._eval_nseries(x, 4, None, -1) == -I*acoth(S(1)/2) - \
+    4*x/3 + 8*I*x**2/9 + 112*x**3/81 + O(x**4)
+    assert acot(x - S(1)/2*I)._eval_nseries(x, 4, None, 1) == I*acoth(S(1)/2) - \
+    4*x/3 - 8*I*x**2/9 + 112*x**3/81 + O(x**4)
+    assert acot(x - S(1)/2*I)._eval_nseries(x, 4, None, -1) == I*acoth(S(1)/2) - \
+    pi - 4*x/3 - 8*I*x**2/9 + 112*x**3/81 + O(x**4)
+    assert acot(x)._eval_nseries(x, 2, None, 1) == pi/2 - x + O(x**2)
+    assert acot(x)._eval_nseries(x, 2, None, -1) == -pi/2 - x + O(x**2)
+
+
+def test_asec_nseries():
+    assert asec(x + S(1)/2)._eval_nseries(x, 4, None, I) == asec(S(1)/2) - \
+    4*sqrt(3)*I*x/3 + 8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert asec(x + S(1)/2)._eval_nseries(x, 4, None, -I) == -asec(S(1)/2) + \
+    4*sqrt(3)*I*x/3 - 8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert asec(x - S(1)/2)._eval_nseries(x, 4, None, I) == -asec(-S(1)/2) + \
+    2*pi + 4*sqrt(3)*I*x/3 + 8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert asec(x - S(1)/2)._eval_nseries(x, 4, None, -I) == asec(-S(1)/2) - \
+    4*sqrt(3)*I*x/3 - 8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
+    # testing nseries for asec at branch points
+    assert asec(1 + x)._eval_nseries(x, 3, None) == sqrt(2)*sqrt(x) - \
+    5*sqrt(2)*x**(S(3)/2)/12 + 43*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
+    assert asec(-1 + x)._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(-x) + \
+    5*sqrt(2)*(-x)**(S(3)/2)/12 - 43*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
+    assert asec(exp(x))._eval_nseries(x, 3, None) == sqrt(2)*sqrt(x) - \
+    sqrt(2)*x**(S(3)/2)/6 + sqrt(2)*x**(S(5)/2)/120 + O(x**3)
+    assert asec(-exp(x))._eval_nseries(x, 3, None) == pi - sqrt(2)*sqrt(x) + \
+    sqrt(2)*x**(S(3)/2)/6 - sqrt(2)*x**(S(5)/2)/120 + O(x**3)
+
+
+def test_acsc_nseries():
+    assert acsc(x + S(1)/2)._eval_nseries(x, 4, None, I) == acsc(S(1)/2) + \
+    4*sqrt(3)*I*x/3 - 8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert acsc(x + S(1)/2)._eval_nseries(x, 4, None, -I) == -acsc(S(1)/2) + \
+    pi - 4*sqrt(3)*I*x/3 + 8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert acsc(x - S(1)/2)._eval_nseries(x, 4, None, I) == acsc(S(1)/2) - pi -\
+    4*sqrt(3)*I*x/3 - 8*sqrt(3)*I*x**2/9 - 16*sqrt(3)*I*x**3/9 + O(x**4)
+    assert acsc(x - S(1)/2)._eval_nseries(x, 4, None, -I) == -acsc(S(1)/2) + \
+    4*sqrt(3)*I*x/3 + 8*sqrt(3)*I*x**2/9 + 16*sqrt(3)*I*x**3/9 + O(x**4)
+    # testing nseries for acsc at branch points
+    assert acsc(1 + x)._eval_nseries(x, 3, None) == pi/2 - sqrt(2)*sqrt(x) + \
+    5*sqrt(2)*x**(S(3)/2)/12 - 43*sqrt(2)*x**(S(5)/2)/160 + O(x**3)
+    assert acsc(-1 + x)._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(-x) - \
+    5*sqrt(2)*(-x)**(S(3)/2)/12 + 43*sqrt(2)*(-x)**(S(5)/2)/160 + O(x**3)
+    assert acsc(exp(x))._eval_nseries(x, 3, None) == pi/2 - sqrt(2)*sqrt(x) + \
+    sqrt(2)*x**(S(3)/2)/6 - sqrt(2)*x**(S(5)/2)/120 + O(x**3)
+    assert acsc(-exp(x))._eval_nseries(x, 3, None) == -pi/2 + sqrt(2)*sqrt(x) - \
+    sqrt(2)*x**(S(3)/2)/6 + sqrt(2)*x**(S(5)/2)/120 + O(x**3)
 
 
 def test_issue_8653():
diff --git a/sympy/series/tests/test_limits.py b/sympy/series/tests/test_limits.py
index 47952d58d0..1f80ac0327 100644
--- a/sympy/series/tests/test_limits.py
+++ b/sympy/series/tests/test_limits.py
@@ -9,7 +9,7 @@
 from sympy.functions.combinatorial.factorials import (binomial, factorial, subfactorial)
 from sympy.functions.elementary.complexes import (Abs, re, sign)
 from sympy.functions.elementary.exponential import (LambertW, exp, log)
-from sympy.functions.elementary.hyperbolic import (acoth, atanh, sinh)
+from sympy.functions.elementary.hyperbolic import (acosh, acoth, acsch, asech, atanh, sinh)
 from sympy.functions.elementary.integers import (ceiling, floor, frac)
 from sympy.functions.elementary.miscellaneous import (cbrt, real_root, sqrt)
 from sympy.functions.elementary.piecewise import Piecewise
@@ -716,6 +716,17 @@ def test_issue_10610():
     assert limit(3**x*3**(-x - 1)*(x + 1)**2/x**2, x, oo) == Rational(1, 3)
 
 
+def test_issue_10868():
+    assert limit(log(x) + asech(x), x, 0, '+') == log(2)
+    assert limit(log(x) + asech(x), x, 0, '-') == log(2) + 2*I*pi
+    raises(ValueError, lambda: limit(log(x) + asech(x), x, 0, '+-'))
+    assert limit(log(x) + asech(x), x, oo) == oo
+    assert limit(log(x) + acsch(x), x, 0, '+') == log(2)
+    assert limit(log(x) + acsch(x), x, 0, '-') == -oo
+    raises(ValueError, lambda: limit(log(x) + acsch(x), x, 0, '+-'))
+    assert limit(log(x) + acsch(x), x, oo) == oo
+
+
 def test_issue_6599():
     assert limit((n + cos(n))/n, n, oo) == 1
 
@@ -1177,6 +1188,9 @@ def test_issue_22220():
     assert limit(expr, x, pi, '+') == 2*I*pi
     assert limit(expr, x, pi, '-') == 0
 
+def test_sympyissue_22986():
+    assert limit(acosh(1 + 1/x)*sqrt(x), x, oo) == sqrt(2)
+
 
 def test_issue_23231():
     f = (2**x - 2**(-x))/(2**x + 2**(-x))
@@ -1185,3 +1199,12 @@ def test_issue_23231():
 
 def test_issue_23596():
     assert integrate(((1 + x)/x**2)*exp(-1/x), (x, 0, oo)) == oo
+
+
+def test_issue_23752():
+    expr1 = sqrt(-I*x**2 + x - 3)
+    expr2 = sqrt(-I*x**2 + I*x - 3)
+    assert limit(expr1, x, 0, '+') == -sqrt(3)*I
+    assert limit(expr1, x, 0, '-') == -sqrt(3)*I
+    assert limit(expr2, x, 0, '+') == sqrt(3)*I
+    assert limit(expr2, x, 0, '-') == -sqrt(3)*I
diff --git a/sympy/series/tests/test_nseries.py b/sympy/series/tests/test_nseries.py
index 2c968aba33..71fd09e16b 100644
--- a/sympy/series/tests/test_nseries.py
+++ b/sympy/series/tests/test_nseries.py
@@ -370,7 +370,7 @@ def test_hyperbolic():
     assert acosh(x).nseries(x, n=6) == \
         pi*I/2 - I*x - 3*I*x**5/40 - I*x**3/6 + O(x**6)
     assert atanh(x).nseries(x, n=6) == x + x**3/3 + x**5/5 + O(x**6)
-    assert acoth(x).nseries(x, n=6) == x + x**3/3 + x**5/5 + pi*I/2 + O(x**6)
+    assert acoth(x).nseries(x, n=6) == -I*pi/2 + x + x**3/3 + x**5/5 + O(x**6)
 
 
 def test_series2():
diff --git a/sympy/series/tests/test_series.py b/sympy/series/tests/test_series.py
index cf462b05e0..7eca2b14d4 100644
--- a/sympy/series/tests/test_series.py
+++ b/sympy/series/tests/test_series.py
@@ -368,3 +368,8 @@ def test_issue_23432():
     expr = 1/sqrt(1 - x**2)
     result = expr.series(x, 0.5)
     assert result.is_Add and len(result.args) == 7
+
+
+def test_issue_23727():
+    res = series(sqrt(1 - x**2), x, 0.1)
+    assert res.is_Add == True