A series expansion which occurs often in applications is the binomial expansion. In this article we will discuss about
- What is binomial expansion?
- How to arrive at that expansion?
- Where it is used?
- Its relation with pascal’s triangle
- Issac newton’s approach to binomial expansion
- A ‘C’ program to calculate the binomial coefficients
A "Binomial" is a polynomial expression with two terms, like x+y, x+y^2 etc
"Binomial expansion" is the expansion of the expressions like (x+y)^3, (x+y)^6, where the entire binomial is raised to some power.
First, we’ll look at the expansion of "generic" binomial x+y, and its powers (x+y)^2, (x+y)^3, … (x+y)^n.
We can see some kind of patterns in the powers of x and y and the coefficents from the above expansions.
Lets first look at the powers of x and y ,
Power of (x,y) in the (k)th term
For example in,
The power of x and y in the 2nd term (K) is 1 and 1 respectively.
Similary, the power of x and y for equations (1) is given in Table (1)
Table1: Power of (x,y) in the (k)th term
From Table(1) it is clear that (x+y)^n will have n+1 terms, the ‘k’ th term will have a (n-k+1)th power of x, and (k-1)th power of y.
Now lets look at the coefficients for equation (1)
The coefficients in table 2 can be written as shown in figure 1
This is called pascal’s triangle and it is easy to generate any rows of the triangle. Just put 1′s along the sides of the triangle and add the pair of values from the previous row to get the next element. For example to get value 3 in the third row we need to add the pair of values from the previous rows, which happens to be 1 and 2.
Now lets try to expand (x+y)^n. If B(n,k) is the kth entry in the nth row of the pascal triangle. Then
Its summation equivalent is
If we start k from ’0′ instead of ’1′ eqn (3) becomes
C(n,k) in equation (4) is called as binomial coefficient and its value is
The above expansion was known long before the times of newton (1642-1727). However i like to share an interesting information on how he arrived at the above expansion while he was investigating on calculus.
We all knew that Wallis laid the foundation of modern integral calculus by finding the area under the parabola (Refer previous article- Wallis method of integration). In the similar way Wallis also determined the area of quadrature of circle which is,
The work of Wallis was continued by Newton who replaced the fixed upper limit of unity in equation (6) by x and obtained the below results
After noticing some kind of patterns in equation (7) he concluded that
and by differentiating on both sides he discovered the series
If -x^2 =x, the binomial theorem as given in equation(4) is revealed.
and if we put,
Equation (8) becomes,
——– (9)
and in DSP, equation(9) is the Z-Transform of the right sided signal.
Further this expansion is very useful if we expect some terms to cancel out in our derivations!
Implementation of Binomial Coefficient:
To calculate binomial coefficients we just need to implement the below equation,
————-(10)
However it is not easy as it looks, since "n!" is highly prone to overflow errors.
There are two ways to solve this problem
- a) Determine the factorial after taking log on both sides of the above equation.
b) To get the actual output take the exponential of step (a)
2. Recursive implemetation of Equation (10)
Recursive implementation to calculate binomial coefficent can be downloaded here
Posted by Christober rayappan