How to expand a series in points where the denominator vanishes?

133 Views Asked by At

When I ask Mathematica to compute the series of $f(x)=\frac{\cos(x)}{\sin(x)}$ around $0$, I get:

$$\frac{1}{x}-\frac{x}{3}-\frac{x^3}{45}-\frac{2 x^5}{945}-\frac{x^7}{4725}-\frac{2 x^9}{93555}+\dots\tag{$\star$}$$

In the case of this series, we can't just compute the derivatives and take $a=0$ because the denominator vanishes, so we must appeal to some kind of trick. I just learned that we can write:

$$\frac{\cos(x)}{\sin(x)}=p(x) \implies \cos(x)=\sin(x) p(x)$$

Where $p(x)=c[0]+c[1]x^1+\dots$ is a polynomial, and then we expand the series of $\cos(x)$ and $\sin(x)$, multiply $\sin(x)$ by $p(x)$, collect the coefficients and compare them with the coefficients of the expansion of $\cos(x)$.

But in this case, it seems that something weird happens: When I expand $\cos(x)$ I get the coefficients of $x^n$ of the first column, when I expand $\sin(x)$, multiply by $p(x)$ and collect the coefficients , I get the coefficients in the second column:

$$ \begin{array}{c} 1 \\ 0 \\ -\frac{1}{2} \\ 0 \\\vdots \end{array} \hspace{4cm} \begin{array}{c} 0 \\ c(0) \\ c(1) \\ c(2)-\frac{c(0)}{6} \\\vdots \end{array}$$

So there is no coefficient of $x^0$ to be compared. I thought about writing it as

$$\frac{\cos(x)}{\sin(x)}=\frac{1}{p(x)} \implies p(x) \cos(x)=\sin(x) $$

Now we have (ie: Now it's possible to compare all coefficients):

$$ \begin{array}{c} 0 \\ 1 \\ 0 \\ -\frac{1}{6} \\\vdots \end{array}\hspace{4cm} \begin{array}{c} c(0) \\ c(1) \\ c(2)-\frac{c(0)}{2} \\ c(3)-\frac{c(1)}{2} \\\vdots \end{array} $$

And this "series" "approximates pretty well" in "small" interval:

enter image description here

But I still would like to know how it's possible to expand the series of $f$ and obtain $(\star)$ and know if there is some general "trick" where we can expand series in points where the denominator vanishes.


EDIT: In the comments below, I kinda remembered about Laurent series. But even with this, I don't get what algebraic manipulation can be done so that we can expand $f$ into $(\star)$.

2

There are 2 best solutions below

0
On

Your basic idea isn't flawed, but it does need some care to execute correctly.

If we assume $p$ has some expansion of the form $$p(x) = \sum_{k = -\infty}^\infty a_k x^k,$$ then we want the solutions for coefficients $a_k$ satisfying $$1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots = \left(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots\right)\left(\cdots + \frac{a_{-2}}{x^2} + \frac{a_{-1}}{x} + a_0 + a_1 x + a_2 x^2 + \cdots\right).$$

It's not difficult to see that for all $k \le -2$, the coefficients $a_k = 0$, since the product on the RHS cannot contain terms of degree less than $0$, which would occur from multiplying the first term in the series expansion of the sine function, which has degree $1$.

We can also see that $a_{-1} = 1$, since the only constant term arising from the product on the RHS is $x \cdot \frac{a_{-1}}{x} = a_{-1}$. And it is in this way that we can recursively calculate additional coefficients, as this in turn implies $$a_0 x = 0, \\ -\frac{a_{-1}}{3!} x^2 + a_1 x^2 = - \frac{x^2}{2!}, \\ -\frac{a_0}{3!} x^3 + a_2 x^3 = 0,$$ and so forth. Working carefully, this gives us $a_0 = 0$, $a_1 = -1/3$, etc., which is the desired expansion.

Now, this is not necessarily how we go about solving for such series expansions in the general case. Laurent expansions, as you mentioned, can also be calculated using residue theory.

2
On

Computing the Laurent Series

It often helps to know the degree of the singularity. At $x=0$ the degree is $1$, so we multiply by $x/x$: $$ \begin{align} \frac{\cos(x)}{\sin(x)} &=\frac1x\frac{\cos(x)}{\sin(x)/x}\tag{1a}\\ &=\frac1x\frac{1-\frac{x^2}2+\frac{x^4}{24}-\frac{x^6}{720}+\cdots}{1-\frac{x^2}6+\frac{x^4}{120}-\frac{x^6}{5040}+\cdots}\tag{1b}\\ &=\frac1x\left(1-\frac{x^2}3-\frac{x^4}{45}-\frac{2x^6}{945}+\cdots\right)\tag{1c}\\ &=\frac1x-\frac{x}3-\frac{x^3}{45}-\frac{2x^5}{945}+\cdots\tag{1d} \end{align} $$ Explanation:
$\text{(1a):}$ multiply the denominator by $x/x$
$\text{(1b):}$ apply the Taylor Series for $\sin(x)$ and $\cos(x)$
$\text{(1c):}$ divide the series
$\text{(1d):}$ divide each term by $x$


Dividing Power Series

Dividing series is much the same as dividing polynomials, only we use the orders of the terms backwards. $$ \begin{align} \frac{1-\frac{x^2}2+\frac{x^4}{24}-\frac{x^6}{720}+\cdots}{x-\frac{x^3}6+\frac{x^5}{120}-\frac{x^7}{5040}+\cdots} &=\frac1x\frac{1-\frac{x^2}2+\frac{x^4}{24}-\frac{x^6}{720}+\cdots}{1-\frac{x^2}6+\frac{x^4}{120}-\frac{x^6}{5040}+\cdots}\tag{2a}\\ &=\frac1x\left(1+O\!\left(x^2\right)\right)\tag{2b}\\ &=\frac1x\left(1-\frac{x^2}3+O\!\left(x^4\right)\right)\tag{2c}\\ &=\frac1x\left(1-\frac{x^2}3-\frac{x^4}{45}+O\!\left(x^6\right)\right)\tag{2d}\\ &=\frac1x\left(1-\frac{x^2}3-\frac{x^4}{45}-\frac{2x^6}{945}+\cdots\right)\tag{2e}\\ \end{align} $$ Explanation:
$\text{(2a):}$ factor the lowest power of $x$ out of the numerator and denominator
$\phantom{\text{(2a):}}$ so that each series has a non-zero constant term
$\text{(2b):}$ compute the constant term by dividing the constant terms
$\text{(2c):}$ compute the coefficient of $x^2$ by multiplying $1+c_2x^2$ by
$\phantom{\text{(2c):}}$ the denominator and comparing the coefficient of $x^2$
$\phantom{\text{(2c):}}$ with that of the numerator:
$\phantom{\text{(2c):}}$ $c_2x^2-\frac{x^2}6=-\frac{x^2}2\implies c_2=-\frac13$
$\text{(2d):}$ compute the coefficient of $x^4$ by multiplying $1-\frac{x^2}3+c_4x^4$ by
$\phantom{\text{(2d):}}$ the denominator and comparing the coefficient of $x^4$
$\phantom{\text{(2d):}}$ with that of the numerator:
$\phantom{\text{(2d):}}$ $c_4x^4+\frac{x^4}{18}+\frac{x^4}{120}=\frac{x^4}{24}\implies c_4=-\frac1{45}$
$\text{(2e):}$ compute the coefficient of $x^6$ by multiplying $1-\frac{x^2}3-\frac{x^4}{45}$ by
$\phantom{\text{(2e):}}$ the denominator and comparing the coefficient of $x^6$
$\phantom{\text{(2e):}}$ with that of the numerator:
$\phantom{\text{(2e):}}$ $c_6x^6+\frac{x^6}{270}-\frac{x^6}{360}-\frac{x^6}{5040}=-\frac{x^6}{720}\implies c_6=-\frac2{945}$