二项式展开

Binomial Theorem

What happens when you multiply a binomial by itself ... many times?

Here is the answer:

Don‘t worry ... I will explain it all!

And you will learn lots of cool math symbols along the way.

Binomial

A binomial is a polynomial with two terms

example of a binomial

Multiplying

The Binomial Theorem shows what happens when you multiply a binomial by itself (as many times as you want).

It works because there is a pattern ... let us see if we can discover it.

Exponents


But first you need to know what an Exponent is.
Here is a quick summary:

An exponent says how many times to use something in a multiplication.

Example: 82 = 8 × 8 = 64

An exponent of 1 means just to have it appear once, so you get the original value:

Example: 81 = 8

An exponent of 0 means not to use it at all, and we have only 1:

Example: 80 = 1

Exponents of (a+b)

Now on to the binomial.

We will use the simple binomial a+b, but it could be any binomial.

Let us start with an exponent of 0 and build upwards.

Exponent of 0

When an exponent is 0, you get 1:

(a+b)0 = 1

Exponent of 1

When the exponent is 1, you get the original value, unchanged:

(a+b)1 = a+b

Exponent of 2

An exponent of 2 means to multiply by itself (see how to multiply polynomials):

(a+b)2 = (a+b)(a+b) = a2 + 2ab + b2

Exponent of 3

For an exponent of 3 just multiply again:

(a+b)3 = (a+b)(a2 + 2ab + b2) = a3 + 3a2b + 3ab2 + b3

We have enough now to start talking about the pattern.

The Pattern

In the last result we got:

a3 + 3a2b + 3ab2 + b3

Now, notice the exponents of a. They start at 3 and go down: 3, 2, 1, 0:

Likewise the exponents of b go upwards: 0, 1, 2, 3:

If we number the terms 0 to n, we get this:

k=0 k=1 k=2 k=3
a3 a2 a 1
1 b b2 b3

Which can be brought together into this:

an-kbk

How about an example to see how it works:

Example: When the exponent, n, is 3.

The terms are:

k=0: k=1: k=2: k=3:
  an-kbk
= a3-0b0
= a3
  an-kbk
= a3-1b1
= a2b
  an-kbk
= a3-2b2
= ab2
  an-kbk
= a3-3b3
= b3

It works like magic!

Coefficients

So far we have: a3 + a2b + ab2 + b3
But we really need: a3 + 3a2b + 3ab2 + b3

We are missing the numbers (which are called coefficients).

Let‘s look at all the results we got before, from (a+b)0 up to (a+b)3:

And now look at just the coefficients (with a "1" where a coefficient wasn‘t shown):


They actually make Pascal‘s Triangle!

Each number is just the two numbers above it added together (except for the edges, which are all "1")

(Here I have highlighted that 1+3 = 4)

Armed with this information let us try something new ... an exponent of 4:

a exponents go 4,3,2,1,0:   a4 + a3 + a2 + a + 1  
b exponents go 0,1,2,3,4:   a4 + a3b + a2b2 + ab3 + b4  
coefficients go 1,4,6,4,1:   a4 + 4a3b + 6a2b2 + 4ab3 + b4

And that is the correct answer.

We have success!

We can now use that pattern for exponents of 5, 6, 7, ... 50, ... 112, ... you name it!

That pattern is the essence of the Binomial Theorem.

Now you can take a break.

When you come back see if you can work out (a+b)5 yourself.

Answer (hover over): a5 + 5a4b + 10a3b2 + 10a2b3 + 5ab4 + b5

As a Formula

Our last step is to write it all as a formula.

But hang on, how do we write a formula for "find the coefficient from Pascal‘s Triangle" ... ?

Well, there is such a formula:

   
It is commonly called "n choose k" because it is how many ways to choose k elements from a set of n.

You can read more at Combinations and Permutations

The "!" means "factorial", for example 4! = 1×2×3×4 = 24


And it matches to Pascal‘s Triangle like this:

(Note how the top row is row zero
and also the leftmost column is zero!)

Example: Row 4, term 2 in Pascal‘s Triangle is "6".

Let‘s see if the formula works:

Yes, it works! Try another value for yourself.

Putting It All Together

The last step is to put all the terms together into one formula.

But we are adding lots of terms together ... can that be done using one formula?

Yes! The handy Sigma Notation allows us to sum up as many terms as we want:


Sigma Notation

Now it can all go into one formula:


The Binomial Theorem

Use It

OK ... it won‘t make much sense without an example.

So let‘s try using it for n = 3 :

BUT ... it is usually much easier just to remember the patterns:

  • The first term‘s exponents start at n and go down
  • The second term‘s exponents start at 0 and go up
  • Coefficients are from Pascal‘s Triangle, or by calculation using n!/(k!(n-k)!)

Like this:

Example: What is (x+5)4

Start with exponents: x450 x351 x252 x153 x054
Include Coefficients: 1x450 4x351 6x252 4x153 1x054

Then write down the answer (including all calculations, such as 4×5, 6×52, etc):

(x+5)4 = x4 + 20x3 + 150x2 + 500x + 625

You may also want to calculate just one term:

Example: What is the coefficient for x3 in (2x+4)8

The exponents for x3 are:

(2x)345

The coefficient is "8 choose 5". We can use Pascal‘s Triangle, or calculate directly:

n!   =   8!   =   8!   =   8×7×6   = 56
       
k!(n-k)! 5!(8-5)! 5!3! 3×2×1

And we get:

56(2x)345

Which simplifies to:

458752 x3

A large coefficient, isn‘t it?

And one last, most amazing example:

Example: A formula for e (Euler‘s Number)

You can use the Binomial Theorem to calculate e (Euler‘s number).

e = 2.718281828459045... (the digits go on forever without repeating)

It can be calculated using:

(1 + 1/n)n

(It gets more accurate the higher the value of n)

That formula is a binomial, right? So let‘s use the Binomial Theorem:

First, we can drop 1n-k as it is always equal to 1:

And, quite magically, most of what is left goes to 1 as n goes to infinity:

Which just leaves:

With just those first few terms we get e ≈ 2.7083...

Try calculating more terms for a better approximation!

Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Question 7 Question 8 Question 9 Question 10

Challenging 1 Challenging 2

Isaac Newton

As a footnote it is worth mentioning that around 1665 Sir Isaac
Newton came up with a "general" version of the formula that is not
limited to exponents of 0, 1, 2, .... I hope to write about that one
day.

Polynomial Exponent Pascal‘s Triangle Sigma Notation Algebra Index

Search :: Index :: About :: Contact :: Contribute :: Cite This Page :: Privacy

Copyright © 2014 MathsIsFun.com

----

In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the power (x + y)n into a sum involving terms of the form a?xb?yc, where the exponents b and c are nonnegative integers with b + c = n, and the coefficient a of each term is a specific positive integer depending on n and b. For example,

( x + y ) 4 = x 4 + 4 x 3 y + 6 x 2 y 2 + 4 x y 3 + y 4 . {\displaystyle (x+y)^{4}\;=\;x^{4}\,+\,4x^{3}y\,+\,6x^{2}y^{2}\,+\,4xy^{3}\,+\,y^{4}.}

The coefficient a in the term of a?xb?yc is known as the binomial coefficient

In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the power (x + y)n into a sum involving terms of the form a?xb?yc, where the exponents b and c are nonnegative integers with b + c = n, and the coefficient a of each term is a specific positive integer depending on n and b. For example,

( x + y ) 4 = x 4 + 4 x 3 y + 6 x 2 y 2 + 4 x y 3 + y 4 . {\displaystyle (x+y)^{4}\;=\;x^{4}\,+\,4x^{3}y\,+\,6x^{2}y^{2}\,+\,4xy^{3}\,+\,y^{4}.}

The coefficient a in the term of a?xb?yc is known as the binomial coefficient

( n b ) {\displaystyle {\tbinom {n}{b}}} or ( n c ) {\displaystyle {\tbinom {n}{c}}} (the two have the same value). These coefficients for varying n and b can be arranged to form Pascal‘s triangle. These numbers also arise in combinatorics, where ( n b ) {\displaystyle {\tbinom {n}{b}}} gives the number of different combinations of b elements that can be chosen from an n-element set.

( n b ) {\displaystyle {\tbinom {n}{b}}} or ( n c ) {\displaystyle {\tbinom {n}{c}}} (the two have the same value). These coefficients for varying n and b can be arranged to form Pascal‘s triangle. These numbers also arise in combinatorics, where ( n b ) {\displaystyle {\tbinom {n}{b}}} gives the number of different combinations of b elements that can be chosen from an n-element set.

时间: 2024-11-03 03:47:22

二项式展开的相关文章

bzoj5015 [Snoi2017]礼物 矩阵快速幂+二项式展开

题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=5015 题解 设 \(f_i\) 表示第 \(i\) 个朋友的礼物,\(s_i\) 表示从 \(1\) 到 \(i\) 的 \(f_i\) 的和. \[ f_i = s_{i-1}+i^k\\s_i = s_{i-1}+f_i = 2s_{i-1}+i^k \] 考虑用矩阵维护转移,但是这个 \(i^k\) 不太方便转移. 发现 \(k \leq 10\),可以考虑使用二项式展开. \[ (i

【 CodeForces - 392C】 Yet Another Number Sequence (二项式展开+矩阵加速)

Yet Another Number Sequence Description Everyone knows what the Fibonacci sequence is. This sequence can be defined by the recurrence relation: F1 = 1, F2 = 2, Fi = Fi - 1 + Fi - 2 (i > 2). We'll define a new number sequence Ai(k) by the formula: Ai(

10.05T2 二项式展开+二分答案+差分数组

Description 御坂美琴正在进行能力测试御坂美琴正在进行能力测试,她手上有 k 枚硬币,她面前 50 米有 n 个相邻放置的自动售货机,编号为 1 到 n,且每个售货机都有一个耐久度 vi ,为了使测试更有难度,考官钦定了一个值 m .御坂美琴可以精准击中任意一个售货机,且排在被命中的售货机前的售货机也会受到溅射伤害.具体来说,若御坂美琴使用 p 的攻击力取投掷硬币,被击中的售货机 i 会受到 p 的伤害,且排在此售货机前的第 j 个售货机会受到max(0,p−(i−j)m), 的伤害.

2014ACM/ICPC亚洲区西安站现场赛 F color(二项式反演)

题意:小球排成一排,从m种颜色中选取k种颜色给n个球上色,要求相邻的球的颜色不同,求可行的方案数,答案模1e9+7.T组数据,1<= n, m <= 1e9, 1 <= k <= 1e6, k <= n, m 分析: a(k)表示用不超过k种颜色染n个位置,两两相邻颜色不相同的总数,很简单a(k)=k(n-1)^(k-1) b(k)表示恰好用k种颜色 很显然a(k)=ΣC(k,i)b(i),我们知道a,想知道b,这里就用到二项式反演 那么b(k)=ΣC(k,i)*i*(-1)

容斥原理

对容斥原理的描述 容斥原理是一种重要的组合数学方法,可以让你求解任意大小的集合,或者计算复合事件的概率. 描述 容斥原理可以描述如下: 要计算几个集合并集的大小,我们要先将所有单个集合的大小计算出来,然后减去所有两个集合相交的部分,再加回所有三个集合相交的部分,再减去所有四个集合相交的部分,依此类推,一直计算到所有集合相交的部分. 关于集合的原理公式 上述描述的公式形式可以表示如下:                  它可以写得更简洁一些,我们将B作为所有Ai的集合,那么容斥原理就变成了: 这个

连续的自然数平方和

3 4 5 3^2+4^2=5^210 11 12 13 14 10^2+11^2+12^2=13^2+14^2左边n+1个右边n个自然数question:输入一个数n(1<=n<=1000)判断是否存在2*n+1个连续的自然数满足上式设中间数字为x(x-n)^2+(x-n+1)^2+...+x^2=(x+1)^2+...+(x+n)^2二项式展开得x=2*n*(n+1)中间元素只需向前向后分别找n个元素,即题解 啦啦啦,数学使问题变得简单~~~ 1 #include "iostre

【转载】【容斥原理】

转载自 http://www.cppblog.com/vici/archive/2011/09/05/155103.html 容斥原理(翻译) 前言: 这篇文章发表于http://e-maxx.ru/algo/inclusion_exclusion_principle,原文是俄语的.由于文章确实很实用,而且鉴于国内俄文资料翻译的匮乏,我下决心将其翻译之.由于俄语对我来说如同乱码,而用Google直接翻译中文的话又变得面目全非,所以只能先用Google翻译成英语,再反复读,慢慢理解英语的意思,实在

hdu1098费马小定理

Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9783    Accepted Submission(s): 6839 Problem Description Ignatius is poor at math,he falls across a puzzle problem,so he has no

HDU4565 So Easy!【矩阵连乘】【推导】

题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4565 题目大意: 定义Sn = [( a + √b )^n] % m,[x]表示x向上取整,比如[3.14] = 4.给你a b n m的值, 求Sn是多少. 思路: 这道题很经典,因为(a-1)^2< b < a^2,所以0 < |a-√(b)| < 1,所以 Sn = [( a + √b )^n] % m = ( [( a + √b )^n]  + [( a - √b))^n]