1
$\begingroup$

I'm trying to get a formal power series expansion in Mathematica, e.g. $$\frac{1}{{{x^\alpha } + {x^\beta }}} = \sum\limits_{k = 0}^{ + \infty } {{{( - 1)}^k}{x^{ - \alpha + k(\beta - \alpha )}}} $$ with $\beta > \alpha $, $0 < x < 1$ but Mathematica doesn't want to compute it. Moreover, mathematica doesn't compute it with certain values, e.g.

$Assumptions = 0 < x < 1
Series[1/(x^0.23 + x^0.55), {x, 0, 3}]

So, what should I do to compute these-like "power series"?

$\endgroup$
  • 2
    $\begingroup$ try Series[Rationalize[1/(x^0.23 + x^0.55)], {x, 0, 3}]? $\endgroup$ – kglr May 10 '18 at 6:53
  • $\begingroup$ No, of course, it works with rational powers, but in real, I need to work with any real numbers, so this way does not fit $\endgroup$ – Afftar43 May 10 '18 at 7:33
  • $\begingroup$ @Afftar43 Apply then to the result res proposed by @kglr this: Normal[res] /. Rational[$__] :> N@Rational[$] $\endgroup$ – Andrew May 10 '18 at 8:19
  • $\begingroup$ For an arbitrary real number you should specify a dx for Rationalize $\endgroup$ – Bob Hanlon May 10 '18 at 13:50
  • $\begingroup$ (1) A floating point number is actually a rational number (with a power of 2 in the denominator). So those suggesting Rationalize do have a point. (2) Pose something like Series[1/(x^Sqrt[1/2] + x^Sqrt[2/3]), {x, 0, 3}] and folks will see that Rationalize has its limits. $\endgroup$ – Michael E2 May 18 '18 at 18:27
1
$\begingroup$

Try factoring and then taking the series. Your expression is equivalent to:

x^(-b)(1/(x^(a - b) + 1))

so

x^(-b) Series[1/(y + 1), {y, 0, 3}]//Normal
(*-(y^3 x^-b) + y^2 x^-b - y x^-b + x^-b*)

(% // Normal) /. y -> x^(a - b)
(*-x^(3*a - 4*b) + x^(2*a - 3*b) - x^(a - 2*b) + x^(-b)*)

The sub anything you want for a and b.

% /. {a -> .22, b -> .55}

(*1/x^1.2100000000000002 - 1/x^0.8800000000000001 - 1/x^1.54 + 1/x^0.55*)
$\endgroup$
1
$\begingroup$

Let me change and expand the answer of Bill Watts a little bit.

exp = 1/(x^a + x^b)

Numerator[exp] x^-a/(Denominator[exp]  x^-a // Simplify)

(*   x^-a/(1 + x^(-a + b))   *)

Substitute x^(-a + b) -> y and evaluate general series coefficients.

seriescoefficient[k_] = 
      x^-a SeriesCoefficient[1/(y + 1), {y, 0, k}, 
               Assumptions -> k > 0 && Element[k, Integers]]

(*   (-1)^k x^-a   *)

For any analytic function you have

g[y] == Sum[seriescoefficient[k] y^k, {k, 0, Infinity}]

Therefore in this case

seriescoefficient[k] y^k /. y -> x^(-a + b) // PowerExpand

(*   (-1)^k x^(-a + (-a + b) k)   *)

Here the proof

1/(x^a + x^b) == 
     Sum[seriescoefficient[k] y^k /. y -> x^(-a + b), {k, 0, Infinity}]

(*   True   *)
$\endgroup$

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.