0
$\begingroup$

I would like to compute the following expansion.

Series[(A + p/x^a)^2, {x, 0, 1}] 

where $a>0$. However Mathematica simply returns the expression, unless I choose a specific value for $a$. Is it possible to somehow get a result for generic values?

$\endgroup$
3
  • 6
    $\begingroup$ Expand[(A + p/x^a)^2] shows the "series expansion" $\endgroup$ Jul 25, 2023 at 12:28
  • 3
    $\begingroup$ it is because the derivative of your function $f(x)$ when evaluated at $x=0$ is not defined. i.e. Limit[x^a, x -> 0] is not defined for unknown a. That is why it can not find the power series, which is defined as $$ f\left( x\right) \approx\sum_{n=0}^{\infty}\left. \frac{f^{\left( n\right) }}{n!}\right\vert _{x=0}x $$ If you try different expansion point other than zero, then you see it works. Series[(A + p*x^a)^2, {x, 1, 5}] gives (A+p)^2+2 a p (A+p) (x-1)+(a^2 p^2+(-a+a^2) p (A+p)) (x-1)^2+(a (-a+a^2) p^2+1/3 (2 a-3 a^2+a^3) p (A+p)) (x-1)^3+1/12 (-6 a A p+11.... $\endgroup$
    – Nasser
    Jul 25, 2023 at 12:46
  • 1
    $\begingroup$ typo in the above, should be $$f\left( x\right) \approx\sum_{n=0}^{\infty}\left. \frac{f^{\left( n\right) }}{n!}\right\vert _{x=0}\, x^n$$ $\endgroup$
    – Nasser
    Jul 25, 2023 at 13:21

1 Answer 1

1
$\begingroup$

Mma always returns the original expression if it, for whatever reason, does not know the answer. In this case, it seems to take place because depending on the values and signs of the parameters, there are too many possibilities for the value p/(A*x^a), which can be small or large. In this case, one should help Mma a bit. For example, let us first rewrite the expression as follows:

expr1=A^2 (1 + z)^2;

where z==p/(A*x^a).

To be specific, I will assume that all parameters are reals and positive, while 0<x<1. One can generalize this assumption if needed.

There are two possibilities: a) either 0<z<1, or b) z>1.

In the case a), one finds (p y)/A<1 where y==x^(-a). This splits into two cases: (i) 0<y<1 and (ii) y>1.

The case (i) 0<x^(-a)<1 can only take place at a<0. I assumed the opposite case. Thus, we conclude that within the assumption I specified above, y>1. In this case, the possibility a) fulfills at

   Reduce[(p y)/A < 1 && A > 0 && p > 0 && y > 1]

(*  A > 0 && y > 1 && 0 < p < A/y  *)

Under these conditions, one expands:

  A^2*(Series[(1 + z)^2, {z, 0, 1}] // Normal) /. 
  z -> p/(A*x^a) // Expand

yielding the following result:

enter image description here

The case b) one does the same way. The only difference is that in the case b) z>1 and one has to calculate the expansion around Infinity:Series[(1 + z)^2, {z, Infinity, 1}].

Have fun!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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