I'm confused about the difference between Series
and Asymptotic
. Is there a good rule of thumb of when to use which?
Observations:
- Asymptotic of order $n+1$ is analogous to Series to order $n$
- Series generates constant terms
Code below uses both to simplify the following expression
$$\text{expr}=\frac{1}{\frac{s}{2}+\frac{\sqrt{2} \sqrt{s}}{\pi -2 \tan ^{-1}\left(\frac{\sqrt{s}}{\sqrt{2}}\right)}}$$
ClearAll["Global`*"];
expr = 1/(s/2 + (Sqrt[2] Sqrt[s])/(\[Pi] - 2 ArcTan[Sqrt[s]/Sqrt[2]]));
SF = StringForm;
series[order_] := Normal@Series[expr, {s, 0, order}];
asymp[order_] := Asymptotic[expr, {s, 0, order}];
{approxSeries, approxAsymp} =
Table[{i, #[i]}, {i, 0, 3}] & /@ {series, asymp};
visualize[approx_, label_] := (
Print[TableForm[approx, TableHeadings -> {{}, {"order", "expr"}}]];
LogLogPlot @@ {{expr}~Join~(Last /@ approx), {s, 0., .2},
PlotLegends -> {"true"}~Join~(SF["order ``", First@#] & /@ approx),
PlotStyle -> {{Thick, Opacity[.5]}, Automatic, Dashed, Dotted,
DotDashed},
PlotLabel -> label}
)
Quiet[visualize[approxSeries, "Series"]]
Quiet[visualize[approxAsymp, "Asymptotic"]]
Quiet
s? $\endgroup$Series
follows fromLimit[1/( s/2 + (Sqrt[2] Sqrt[s])/(\[Pi] - 2 ArcTan[Sqrt[s]/Sqrt[2]])) - \[Pi]/(Sqrt[2] Sqrt[s]), s -> 0 ]
which results in-1 - \[Pi]^2/4
. This term is not of importance for the asymptotic. $\endgroup$SeriesData
output and 2.Asymptotic
generalizesSeries
in that it will give an expression asymptotic to the input.Series
gives a (generalized) power series, and when this exists it's asymptotic to the input. CompareAsymptotic[PrimePi[x], {x, ∞, 3}]
andSeries[PrimePi[x], {x, ∞, 3}]
. $\endgroup$Asymptotic
is meant as a more powerful "superfunction". It can also handle, for example, inactivated operators (Asymptotic[Inactive[Integrate][Exp[x^2], x], x -> 0]
). For a more detailed discussion about the peculiarities of implementation, I suggest watching Live CEOing Ep 279: Calculus & Algebra Features for WL 12.1. $\endgroup$