# Proper treatment of roots and powers in Series?

I have the following problem in Mathematica 9 on Linux. I let Mathematica compute the Series expansion:

Block[{$Assumptions = {r, p}\[Element] Reals}, Series[Log[r^2 - Sqrt[r^4 + p^2]], {p, 0, 0}] ]  But the output is a rather disappointing naked infinity: Log[r^2 - Sqrt[r^4]] + O[p]^1  Similarly, for: Block[{$Assumptions = {p, r} \[Element] Reals},
Series[1/(r^2 - Sqrt[r^4 + p^2]), {p, 0, 0}]
]


I get:

1/(r^2 - Sqrt[r^4]) + O[p]^1


Why is Mathematica handing me naked infinities like that, even though I specified that the computation is to be carried out in the real numbers? What do I do wrong? How can I avoid this?

EDIT:

To make my point more clear, I would expect the Series to give results like $$\log(c_1 p^2)+O(p^1)$$ and $$\frac{1}{c_2 p^2}+O(p^1)$$ as a regulated infinity, instead of $\log(0)$ and $\frac{1}{0}$.

• Are you disappointed about the output or do you think it's not correct ? Mar 5, 2013 at 11:17
• I am disappointed, since the Series function should give a regulated infinity, like $\frac{1}{p^2}$ or something, instead of a mathematically nonsensical $\frac{1}{0}$. Mar 5, 2013 at 11:19
• I have been told, that as a quick solution one can substitute r by ie Zeta. Any zeta of odd numbers greater than 1 will do. After the expansion is done one simply has to substitute back. Mar 5, 2013 at 14:11
• Not a full-fledged answer, Mathematica's behaviour still puzzles me, but something that may point you in the right direction: you do get the expected result if you assume r>0 && p>0. The assumption r<0 && p>0 works too, but (r<0 || r>0) && p>0 does not... Mar 5, 2013 at 14:42
• It looks like some time between 12.0.1 and 12.3.1 Mathematica started returning your desired results. Apr 20 at 22:30

The answer is very simple, mathematically: Series is a central instrument in complex analysis and has no real version. The series aquired formally e.g. by using Taylors formula, if all derivatives are computable, defines a complex analytic function in an open circle in the complex plane, that touches the nearest singularity anywhere, where the series diverges.

Standard example is the function

f[x_]:=(1-x^2)^(-1)


that has a geometric series representation. f[z_]:= Sum[x^(2n) ,{n,0,oo}] | z | < 1

Here the nearest singularities are simple poles in the points z= +-I, while along the real axis the function is perfectly smooth. But smoothness on the real axis does not yield a series , representationas the this classical example is showing:

x-> Exp[-1/x^2]  \el {0,1}


is a real function with all derivatives 0 at x=0. The function has a real power series

sum 0 z^n.


The reason is that for z on the imaginary axis there is no value at z->0. The real line as a smooth path through the complex hell at z=0

ComplexPlot3D[ Exp[-1/z^2], {z, -(1 + 0.2 I), (1 + 0.2 I)} ,
PlotRange -> {0, 50}, ViewPoint -> {7, 1, 5}, ImageSize -> 220] • You have "Series" as the first word in a sentence, so I do not know if you mean Taylor series in general, or the Mathematica function Series. If the latter, the rest is not really accurate, because it takes assumptions that are intended to allow for Piecewise or other conditional results. Series also tries to provide results that behave on branch cuts, results with asymptotic terms and various other extensions to basic Taylor series. Apr 21 at 15:23