1
$\begingroup$

Here is a minimal example of my problem.

I expand a function, f[x], in a Taylor series around a point a == 1/b. The variable x is a function of the point b, and is expanded around 0. The higher term of the x expansion has a negative power of b (i.e., 1/b). Theoretically, there is no problem, but Mathematica generates an error message SeriesData::scmn. I don't know how to avoid it.

Could you help me please?

F = Series[f[x], {x, a, 3}, {b, 0, 3}] 
x = 1/b Series[1/(1 - b), {b, 0, 3}]
a = 1/b;
$\endgroup$
2
$\begingroup$

Are you looking for something like this?

F = Series[f[x], {x, a, 3}, {b, 0, 3}]

Normal[%] /. {x -> Normal[1/b Series[1/(1 - b), {b, 0, 3}]], a -> 1/b}

enter image description here

$\endgroup$
  • $\begingroup$ Thank you for your quick answer. Your proposition is a good solution if I can truncate my expansion, but if it is possible I would like to keep the information of the order of the expansion, i.e a O(b^3). $\endgroup$ – Antoine Mar 24 '18 at 6:53
0
$\begingroup$

By using Series you are assuming that the function is analytic at the point you are expanding around, which is false for your case: ultimately, you are expanding around $b=0$ for which $x[b]$ is divergent.

One way to get around this is to expand as follows:

Series[f[x[b]], {b, 0, 3}]

Then replace $x$ with its series form:

intermeadiateResult=
Series[f[x[b]], {b, 0, 3}]
/.x->Function[var, 
       Evaluate[
         Normal[1/b Series[1/(1 - b), {b, 0, 3}]] /.b -> var+k
       ]
     ]

where $k$ is the regulator. It should be taken to $0$ at the very end; however, as it stands, we cannot take it to zero as the expression would diverge. At this point, the result looks like follows:

\begin{equation} f\left(k^2+k+\frac{1}{k}+1\right)+b \left(-\frac{1}{k^2}+2 k+1\right) f'\left(k^2+k+\frac{1}{k}+1\right)+\frac{1}{2} b^2 \left(\left(-\frac{1}{k^2}+2 k+1\right)^2 f''\left(k^2+k+\frac{1}{k}+1\right)+\left(\frac{2}{k^3}+2\right) f'\left(k^2+k+\frac{1}{k}+1\right)\right)+\frac{1}{6} b^3 \left(\left(-\frac{1}{k^2}+2 k+1\right)^3 f^{(3)}\left(k^2+k+\frac{1}{k}+1\right)+3 \left(\frac{2}{k^3}+2\right) \left(-\frac{1}{k^2}+2 k+1\right) f''\left(k^2+k+\frac{1}{k}+1\right)-\frac{6 f'\left(k^2+k+\frac{1}{k}+1\right)}{k^4}\right)+O\left(b^4\right) \end{equation}

As an example, let us assume $$f(x)=\frac{1}{x}$$ In that case, we can get the result as follows:

Series[Normal[intermeadiateResult /. f -> Function[x, 1/x]], {k, 0,0}]

which yields $k$ independent result $(b - b^2)$.

One can check that it is not possible to get rid of $k\rightarrow 0$ limit for all $f$. For those functions, it simply means that the expression we are calculating is divergent so we should not have tried Taylor series to being with, but possibly a Laurent series.

$\endgroup$
  • $\begingroup$ Series gives Laurent expansions so that is not at all an issue. $\endgroup$ – Daniel Lichtblau Mar 24 '18 at 16:36
  • $\begingroup$ Series assumes that the function is analytic around the expansion point, so no it does not yield Laurent expansions. The input may be divided by Series into convergent part times a divergent monomial hence it looks as if Series yield Laurent expansion but this works only for explicit forms. For any implicit function, Series will be correct only for analytic functions. There is the option Analytic->False, you can use that, but with that option Series[f[x],{x,0,3},Analytic->False] simply won't evaluate! $\endgroup$ – Soner Mar 24 '18 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.