1. ## binomial expansion mishap

Hi folks,

I have the following expansion of $(1 + x - 2x^2)^{-1}$ = $\dfrac{1}{3} [ (1 - x)^{-1} + 2(1 + 2x)^{-1}]$ by partial fractions.

the result is:

$1 - x + 3x^2 - 5x^3 + 11x^4$ ...............(1)

I have to find a suitable value of x to evaluate $(1.0098)^{-1}$ to 7 decimal places.

I calculate that the range of values of x for which the series converges is $x \lt \dfrac{1}{2}$

so $1 + x - 2x^2 = 1.0098$

$x -2x^2 = 0.0098$

$2x^2 - x + 0.0098 = 0$

$x = \dfrac{1 \pm \sqrt{1 - 4.2.*(0.0098)}}{4}$

$x = \dfrac{1 \pm \sqrt{1 - 0.0784}}{4}$

$x = \dfrac{1 \pm \sqrt{0.9216}}{4}$

$x = \dfrac{1 \pm 0.96}{4}$

$x = 0.49$ or $x = 0.01$

given the range of allowable values of x both values are permissible and I was expecting that when I substitute them into the expansion (1) , I would get the same result.

But I do not

$x = 0.01$ gives 0.99029511 which is the correct answer

$x = 0.49$ gives 1.27618311 which I guess is wrong.

I was expecting the range of permissible values of x for a convergent series to eliminate one of my solutions. Is that reasonable?

Thanks

2. ## Re: binomial expansion mishap

the Taylor polynomial $1-x+3 x^2-5 x^3$ of degree 3 is enough to give the approximation 0.990295 at x=0.01

You need the Taylor polynomial of degree 700 to get the same approximation at x=0.49

3. ## Re: binomial expansion mishap

My point is that I get different answers with the two values of x. How do I know which is right? My books says the result with 0.01 is correct, but why is the other result wrong. I see nothing in my maths that tells me it should be.

4. ## Re: binomial expansion mishap

the fourth degree Taylor polynomial

$1-x+3 x^2-5 x^3+11 x^4$ with $x=0.01$ gives $6$ decimal places accuracy

the polynomial of degree $700$ with $x=0.49$ will give the same accuracy

so the method works with both values of $x$ to give the same result $0.990295$

it is just that with $0.49$ you have to use the polynomial

$1-x+3 x^2-5 x^3+11 x^4-21 x^5+43 x^6+...+c x^{700}$

5. ## Re: binomial expansion mishap

I don't know where you get the idea of a polynomial of degree 700. I think you are getting too advanced!
The question as set in my book only refers to one polynomial, the one I have quoted and the question explicitly restricts it to the term in $x^4$
AT this level the two values of x give different results. Only one is right and I don't understand why this is.

6. ## Re: binomial expansion mishap

Originally Posted by s_ingram
I have the following expansion of $(1 + x - 2x^2)^{-1}$ = $\dfrac{1}{3} [ (1 - x)^{-1} + 2(1 + 2x)^{-1}]$ by partial fractions.

the result is:

$1 - x + 3x^2 - 5x^3 + 11x^4$ ...............(1)
Originally Posted by s_ingram
I don't know where you get the idea of a polynomial of degree 700. I think you are getting too advanced!
The question as set in my book only refers to one polynomial, the one I have quoted and the question explicitly restricts it to the term in $x^4$
AT this level the two values of x give different results. Only one is right and I don't understand why this is.
The issue is that $1-x+3x^2-5x^3+11x^4$ is an approximation, not the full expansion of

$$\dfrac{1}{3}\left( \dfrac{1}{1-x} + \dfrac{2}{1+2x} \right)$$

The full expansion is an infinite series. You can take approximations by taking partial sums. Different values you plug in will have different rates of convergence. The rate of convergence is how many terms you need from the infinite sum to get a meaningful result.

$$\displaystyle \dfrac{1}{3} \sum_{n=0}^\infty (1+2(-2)^n)x^n = 1 - x + 3x^2 - 5x^3+11x^4 - \cdots$$

The sum goes on forever.

7. ## Re: binomial expansion mishap

Indeed, as you say for a convergent series, the more terms you take, the nearer to the sum you get. But there is only one sum. Using a calculator $(1.0098)^{-1} = 0.990295$ Are you saying that I can use any x to get to it? My impression was that only one value of x would get me there. My calculation gives two values of x, one works the other doesn't.

8. ## Re: binomial expansion mishap

Originally Posted by s_ingram
Indeed, as you say for a convergent series, the more terms you take, the nearer to the sum you get. But there is only one sum. Using a calculator $(1.0098)^{-1} = 0.990295$ Are you saying that I can use any x to get to it? My impression was that only one value of x would get me there. My calculation gives two values of x, one works the other doesn't.
As Idea said, both work. One just works faster. .01 gives the answer when you sum five terms. .49 works when you sum 700 terms:

1/3*sum[(1+2*(-2)^n)(0.49)^n,{n,0,700}] - Wolfram|Alpha Results

There are no other values for x that will give the same answer. You already proved that in your very first post when you solved the quadratic to find values for x that would make the denominator equal 1.0098

9. ## Re: binomial expansion mishap

I see! Thanks very much. I guess you solve for n in the following to get n = 700?

$0.990295 = 1/3 [1 + (-1)^n. 2^{n+1}.(0.49)^n]$

$2.970885 = 1 + (-1)^n. 2^{n+1}.(0.49)^n$

$1.970885 = (-1)^n. 2^{n+1}.(0.49)^n$

$log 1.970885 = n log (-1) + (n+1) log 2 + n log 0.49$

I can't take log of a negative number.

10. ## Re: binomial expansion mishap

$$\dfrac{1}{3} \sum_{n=0}^k (1+2(-2)^n)x^n = \dfrac{1}{3}\left(\dfrac{1-x^{k+1}}{1-x} + \dfrac{2(1-(-2x)^{k+1})}{1+2x} \right)$$

You want to find the smallest value of $k$ so that:

$$\left| \dfrac{1}{3}\left( \dfrac{1}{1-x} + \dfrac{2}{1+2x} \right) - \dfrac{1}{3} \left( \dfrac{1-x^{k+1}}{1-x} + \dfrac{2(1-(-2)^{k+1}}{1+2x} \right) \right| < 5\times 10^{-7}$$

Let's simplify:

$$\left| \dfrac{3}{1+x-2x^2} - \left( \dfrac{(1-x^{k+1})(1+2x) + (1-x)(2(1-(-2x)^{k+1})}{1+x-2x^2} \right) \right| < 1.5 \times 10^{-6}$$

$$\left| \dfrac{ (1.98 - 2.04(-2)^k)(0.49)^{k+1} }{1.0098} \right| < 1.5 \times 10^{-6}$$

$$(2.04(2)^k-1.98)(0.49)^{k+1} < 1.5147 \times 10^{-6}$$

As k gets large, $2.04(2)^k-1.98 \approx 2.04(2)^k$

$$.9996(.98)^k < 1.5147 \times 10^{-6}$$

$$k\ln (.98) < \ln 1.5147 - \ln .9996 - 6\ln 10$$

$$k > \dfrac{\ln 1.5147 - \ln .9996 - 6\ln 10}{\ln .98} \approx 664$$

Let's test it out. We expect:

$$\dfrac{1}{3}\sum_{n=0}^{665}(1+2(-2)^n)(0.49)^n \approx 0.990295$$

Wolfram|Alpha: Computational Knowledge Engine

Just as expected.

11. ## Re: binomial expansion mishap

Thanks for this. I have to confess I don't understand what you are doing. I know this isn't a geometric progression (the common ratio is a function of k), so I don't know what formula you are using for the sum to infinity, only that it is not the one for geometric progressions i.e.

$S_{n} = \dfrac{a.(k^{n} - 1)}{k - 1}$.

Then I thought that you took the difference between the general term $\dfrac{1}{3} [1 + (-1)^{k}.2^{k+1}) x^k ]$ and the general term + the next term and made this less than the seventh digit, but I don't recognise the k+1 th general term.

Could you kindly clarify this a bit.

Many thanks Slip.

12. ## Re: binomial expansion mishap

It is the sum of two geometric progressions.

$$\sum_{n=0}^\infty (1+2 (-2)^n)x^n = \sum_{n=0}^\infty x^n + 2\sum_{n=0}^\infty (-2x)^n$$

In fact, you showed it was the sum of two geometric progressions in your first post.