0

Finding the constant term for

$$\left (1+\frac x2 -\frac 2x \right)^4$$

is easy, but that would require converting the expression into a binomial.

However, I have no idea about how to do that. Completing squares doesn’t work because we have a negative sign on $\frac 2x$.

Quanto
  • 97,352
Aditya
  • 6,191

8 Answers8

1

Let $[x^k]f(x)$ denote the $x^k$ coefficient in $f$, so $[1]f$ is $f$'s constant term. Then$$\begin{align}[1](1+x/2-2/x)^4&=\tfrac{1}{16}[x^4](x^2+2x-4)^4\\&=\tfrac{1}{384}\left.[(x^2+2x-4)^4]^{(4)}\right|_{x=0}\\&=\tfrac{1}{384}\left.[(y^2-5)^4]^{(4)}\right|_{y=1}\\&=\tfrac{1}{384}\left.[y^8-20y^6+150y^4-o(y^4)]^{(4)}\right|_{y=1}\\&=\tfrac{1}{384}\left.[1680y^4-7200y^2+3600]\right|_{y=1}\\&=\tfrac{1}{384}[1680-7200+3600]\\&=-5.\end{align}$$

J.G.
  • 115,835
1

Say you were to use the binomial theorem. Then only terms containing even powers of the factor $x/2-2/x$ would contain any constants because getting a constant would require the exponent of $x/2$ and $2/x$ to be equal. The constant in $(x/2-2/x)^k$ is thus$$\binom k{k/2}(x/2)^{k/2}(-2/x)^{k/2}=(-1)^{k/2}\binom k{k/2}$$ This gets multiplied by $\binom4k$ which is the coefficient from the outer binomial expansion.

Can you sum this for even $k\in\{0,1,2,3,4\}$?

$\binom40+\binom42(-1)^1\binom21+\binom44(-1)^2\binom42=-5$

Shubham Johri
  • 17,659
  • Is that determinant like term just a different way of writing binomial coefficients? – Aditya Dec 23 '20 at 19:01
  • @Aditya Yeah. it is. – Shubham Johri Dec 23 '20 at 20:23
  • I am still not able to convert it. Can you write it in terms of $C_r$? – Aditya Dec 24 '20 at 05:37
  • @Aditya $^nC_r=\binom nr$. Use the \binom{n}{r} syntax for mathjax. – Shubham Johri Dec 24 '20 at 05:40
  • Why are you using $\frac k2$? – Aditya Dec 24 '20 at 05:44
  • Your expansion is $\sum ^nC_k(x/2-2/x)^k$. Which of these terms generates a constant? We look at thebinomial expansion of $(x/2-2/x)^k$. For generating a constant, $x/2$ and $2/x$ have to have the same exponent. Note that in this binomial expansion, the total degree of any term is equal to $k$. So $k$ must be even, and the constant term is obtained when $x/2$ and $2/x$ have the same exponent i.e. $k/2$. – Shubham Johri Dec 24 '20 at 05:49
  • Why not use $2k$ instead? – Aditya Dec 24 '20 at 14:23
  • @Aditya You can either say $\sum_{k\text{ even}}\binom nk(-1)^{k/2}\binom k{k/2}$ or $\sum^{m\le\lfloor n/2\rfloor}\binom n{2m}(-1)^m\binom {2m}m$. One and the same thing. – Shubham Johri Dec 24 '20 at 14:50
  • I suppose it will much easier using multinomial theorem. I mean it should be, but I am not able to solve all the variables ie. there aren’t enough equations to solve the three variable equation – Aditya Dec 25 '20 at 11:40
1

Substitute $a=\frac x2-\frac2x $ into $(a+1)^4 = a^4+4a^3 + 6a^2 +4a +1 $ and note that only the three even terms contain constants, which are their middle coefficients

$$\left( \frac x2-\frac2x\right)^4 \implies 6,\>\>\>\>\>\>\> 6\left( \frac x2-\frac2x\right)^2 \implies -12,\ $$ Thus, the constant is $6-12+1=-5$.

Edit:

Same logic, the constant term for the general expression $\left (1+\frac x2 -\frac 2x \right)^{2n}$ is $$c_{2n} = \sum_{k= 0}^{n}(-1)^k \binom {2n}{2k}\binom {2k}{k} $$ which yields $c_4=-5$, $c_6= 41$, $c_{12}=3301$, $c_{20}=-1813055$, ... The summation has a close-form, but only in hypergeometric function $c_{2n} = {}_2F_1(1/2-n,-n;1,-4)$.

Quanto
  • 97,352
  • 1
    How r those terms constant? It still has $(\frac x2)^4 +(\frac 2x)^4$ in it – Aditya Dec 23 '20 at 18:58
  • @Aditya - the middle term $6$ is the constant; others such as $(\frac x2)^4 $ are ignored – Quanto Dec 23 '20 at 19:01
  • 1
    Fair enough. But your solution still involves a lot of manual work, which wouldn’t be feasible if we were given 100 instead of 4. – Aditya Dec 23 '20 at 19:03
  • @Aditya - it turns out the result for large powers is quite messy, as seen in the edit. – Quanto Dec 23 '20 at 20:32
1

We are looking for constant products of four factors taken from $\{1, x/2, -2/x\}$. If you pick one of $x/2$ or $-2/x$ you have to pick the other one as well to cancel $x$. Hence, there's just three ways to form constant products:

  • All four factors are $1$, so the product is $1$. There's only one way to achieve this.
  • Two factors are $1$ and the other two are $x/2$ and $-2/x$, so the product is $-1$. There are $\binom{4}{2,1,1} = 12$ ways to do this.
  • Two factors are $x/2$ and the other two are $-2/x$, so the product is $1$. There are $\binom{4}{2,2} = 6$ ways to do this.

Hence, the sum of all these products is $$ 1 - 12 + 6 = -5. $$

Christoph
  • 24,912
  • @Chrisoph: Very nice approach. (+1) – Markus Scheuer Dec 23 '20 at 22:00
  • What 4 factors are you talking about here? I just don’t understand what you mean by ‘factor’ – Aditya Dec 24 '20 at 05:39
  • @Aditya Expanding a product of four sums, which $(1+x/2-2/x)^4$ is, each resulting summand is a product of four factors: $1\cdot 1\cdot 1\cdot 1+ 1\cdot 1\cdot 1\cdot (-2/x) + 1\cdot 1\cdot 1\cdot(x/2) + \cdots + (-2/x)\cdot (-2/x)\cdot (-2/x)\cdot (-2/x)$. – Christoph Dec 24 '20 at 11:22
1

And Now for Something Completely Different:

Let $f_k= \begin{cases} -2, & k=-1, \\ 1,& k=0,\\ {1 \over 2},& k=1,\\ 0, & \text{otherwise}\end{cases}$,

Formally we have $1+{x \over 2}-{2 \over x} = \sum_k f_k x^k$ and so the constant term of $(1+{x \over 2}-{2 \over x})^4 $ is found from the convolution $\sum_{k_1+...+k_4 = 0} f_{k_1} ... f_{k_4}$.

Note that if any of $k_1,...,k_4$ are not in $\{-1,0,1\}$ then $f_{k_1} ... f_{k_4} = 0$.

Let $K= \{ (k_1,...,k_4) | k_1+...+k_4 = 0, k_i \in \{-1,0,1\} \}$.

It is not hard to see that the $K$ contains 1 element with no $-1$, $12 = 4 \cdot 3$ elements with exactly one $-1$ and $\binom{4}{2}$ elements with exactly two $-1$s. Computing the product $f_{k_1} ... f_{k_4}$ for each gives $1 \cdot 1^4 + 12 \cdot (-2 \cdot {1 \over 2}) +6 ((-2)^2 \cdot ({1 \over 2})^2 ) = -5$.

copper.hat
  • 172,524
0

Hint: Let $$ p(x)= \left (1+\frac x2 -\frac 2x \right)^4$$ then $$16x^4 p(x) = (2x+x^2-4)^4$$ so you have to find the term in $(2x+x^2-4)^4$ which has $x^4$.


$$(2x+x^2-4)^2 = x^4+4x^3-4x^2-16x+16$$

\begin{align} (\color{red}{x^4}+\color{blue}{4x^3}-4x^2\color{blue}{-16x}+\color{red}{16})^2 &= ... 2\cdot \color{red}{16x^4} - 2\cdot \color{blue}{64x^4} + (-4x^2)^2 +...\\ &= ...-80x^4+... \end{align}

nonuser
  • 90,026
0

Using the hint of @Aqua :-) we can see that \begin{eqnarray*} \left( 1+\frac{x}{2}-\frac{2}{x}\right)^{4}&=&\left(\frac{x^{2}}{2x}+\frac{2x}{2x}-\frac{4}{2x} \right)^{4}\\ &=&\left(\frac{x^{2}+2x-4}{2x} \right)^{4}\\ &=&\frac{(x^{2}+2x-4)^{4}}{16x^{4}} \end{eqnarray*} Now, since that $$16x^{4}p(x)=(x^{2}+2x-4)^{4}$$ but since that $$(x^{2}+2x-4)^{4}=x^{8}+8x^{7}+8x^{6}-64x^{5}-80x^{4}+256x^{3}+128x^{2}-512x+256$$ so, we have $$\mathbf{constant}\left( 1+\frac{x}{2}-\frac{2}{x}\right)^{4}=\boxed{-5}$$

0

The combinatorial approach from @Christoph is elegant and efficient. Here we do it the same way using just a slightly different notation. We use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a series. We also use consequently multinomial coefficients which is convenient in the current situation.

We obtain \begin{align*} \color{blue}{[x^0]}&\color{blue}{\left(1+\frac{x}{2}-\frac{2}{x}\right)^4}\\ &=\binom{4}{4,0,0}1^4\left(\frac{1}{2}\right)^0\left(-2\right)^0+\binom{4}{2,1,1}1^2\left(\frac{1}{2}\right)^1(-2 )^1 +\binom{4}{0,2,2}1^0\left(\frac{1}{2}\right)^2(-2)^2\\ &=\frac{4!}{4!0!0!}\,1\cdot 1\cdot 1+\frac{4!}{2!1!1!}\,1\cdot\frac{1}{2}(-2)+\frac{4!}{0!2!2!}\,1\cdot\frac{1}{4}\cdot4\\ &=1-12+6\\ &\,\,\color{blue}{=-5} \end{align*}

Markus Scheuer
  • 108,315