Open
Description
@anutosh491 I have now fixed the `e.is_zero` case. Also added tests for this and the e<0 case.
In [1]: besselk(1,cos(x)).as_leading_term(x)
Out[1]: besselk(1, 1)
In [2]: besselk(3,1/x).as_leading_term(x)
Out[2]:
-1
───
x
√2⋅√π⋅ℯ
──────────
___
╱ 1
2⋅ ╱ ─
╲╱ x
In [9]: besselk(3,1/sin(x)).as_leading_term(x)
Out[9]:
-1
───
x
√2⋅√π⋅ℯ
──────────
___
╱ 1
2⋅ ╱ ─
╲╱ x
Unsure about the last one, since it disagrees with @arnabnandikgp 's implementation of besselk._eval_aseries
In [8]: besselk(3,1/sin(x)).series(x, n=1).expand().removeO()
Out[8]:
-1
──────
sin(x)
√2⋅√π⋅ℯ
──────────────
________
╱ 1
2⋅ ╱ ──────
╲╱ sin(x)
Originally posted by @Kishore96in in #25664 (comment)