Showing posts with label maclaurin series. Show all posts
Showing posts with label maclaurin series. Show all posts

Saturday, January 29, 2022

Binomial Expansion in Two Methods

Binomial Expansion in Two Methods


Expanding the Binomial by Two Methods


There are two ways to obtain the coefficients of expanding the binomial in the form (a ∙ x + b)^n:


1.  Binomial Theorem:


(a ∙ x + b)^n = Σ(comb(n, k) ∙ (a ∙ x)^k ∙ b^(n -k), k=0, n)

where comb(n,k) = n! ÷ (k! × (n - k)!)



2.  Maclaurin Series (Taylor series at point x=0):


f(x) = (a ∙ x + b)^n

f(x) =  f(0) + f'(0) ∙ x + f''(0)÷2! ∙ x^2 + f'''(0)÷3! ∙ x^3 + ... + f^n(0)÷n! ∙ x^n


Let's illustrate this through several examples.


Example 1:   (2∙x+3)^2


Binomial Theorem:

(2∙x+3)^2 

= comb(2,0)∙(2∙x)^2 + comb(2,1)∙(2∙x)∙3 + comb(2,2)∙3^2

= 4∙x^2 + 12∙x + 3


Maclaurin Series:

f(x) = (2∙x+3)^2,  f(0)=9

f'(x) = 4∙(2∙x+3), f'(0)=12

f''(x) = 8,  f''(0)=8

(2∙x+3)^2 = 9 + 12÷1! ∙ x + 8÷2! ∙ x^2 = 9 + 12∙x + 4∙x^2


Example 2:   (x + 5)^3


Binomial Theorem:

(x+5)^3

= comb(3,0)∙x^3 + comb(3,1)∙x^2∙5 + comb(3,2)∙x∙5^2 + comb(3,3)∙5^3

= x^3 + 15∙x^2 + 75∙x + 125


Maclaurin Series:

f(x) = (x+5)^3, f(0) = 125

f'(x) = 3∙(x+5)^2, f'(0) = 75

f''(x) = 6∙(x+5), f''(0) = 30

f'''(x) = 6, f'''(0) = 6

(x + 5)^3 = 125 + 75÷1! ∙ x + 30÷2! ∙x^2 + 6÷3! ∙ x^3 

= 125 + 75∙x + 15∙x^2 + x^3


Example 3:  A general binomial:  (a∙x+b)^2


Binomial Theorem:

(a∙x+b)^2

= comb(2,0)∙(a∙x)^2 + comb(2,1)∙(a∙x)∙b + comb(2,2)∙b^2

= a^2∙x^2 + 2∙a∙b∙x + b^2


Maclaurin Series:

f(x) =  (a∙x+b)^2, f(0) = b^2

f'(x) = 2∙(a∙x+b)∙a, f'(0) = 2∙a∙b

f''(x) = 2∙a^2, f''(0) = 2∙a^2

(a∙x+b)^2 = b^2 + (2∙a∙b)÷1! ∙x + (2∙a^2)÷2! ∙x^2 = b^2 + 2∙a∙b∙x + a^2∙x^2

 


Two ways of obtaining the expansion of the binomial.   


Eddie 


Wednesday, April 18, 2012

Calculus Revisited # 20: Taylor Series and Maclaurin Series

Welcome to Part 20 of 21: Taylor and Maclaurin Series.

The Taylor and Maclaurin series are representation of the function f(x) by using an infinite series. If we use a finite number of terms, the series can (I stress can), but a good approximation f(x).

A Taylor series of f(x) is centered on a focus point x = a. Generally, approximations are best when x is around a, and gets worse the further x gets from a.

Taylor Series:

About the point x = a:

f(x) = f(a) + f'(a) * (x - 1) + f''(a) * (x - a)^2 / 2! + f'''(a) * (x - a)^3 / 3! + ....

If the series is cut off at n terms, the final term of the Taylor series is:

f^(n+1)(t) / (n+1)! * (x - a)^(n+1). This is known as the error term.

Maclaurin Series:

The Taylor series with a = 0.

f(x) = f(0) + f'(0) * x + f''(0) * x^2/2! + f'''(0) *x^3/3! + ...

With error term f^(n+1)(0) / (n+1)! * x^(n+1)

Some famous series:

e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + .... + x^n/n! + ....

sin x = x - x^3/3! + x^5/5! - x^7/7! + .... + ( (-1)^n * x^(2n+1) ) / (2n+1)! + ....

cos x = 1 - x^2/2! + x^4/4! - x^6/6! + ... + ( (-1)^n * x^(2n) ) / (2n)! + ....

Problems

1. Find a Macluarin series for

f(x) = ln(x + 1) to four terms

f(x) = ln(x + 1)
f(0) = ln(0 + 1) = 0

f'(x) = 1/(x+1)
f'(0) = 1/1 = 1

f''(x) = -1/(x+1)^2
f''(0) = -1/(1^2) = -1

f'''(x) = 2/(x+1)^3
f'''(0) = 2/(1^3) = 2

Then:

ln(x + 1) = 0 + 1 * x + (-1) * x^2/2! + 2 * x^3/3! + ....
= x - x^2/2! + 2x^3/3! + ....

2. Find the Macluarin series for

f(x) = e^(-x^2) to three nonzero terms. Approximate its integral.

f(x) = e^(-x^2)
f(0) = 1

f'(x) = e^(-x^2) * (-2x)
f'(0) = 0

f''(x) = e^(-x^2) * (4x^2 - 2)
f''(0) = -2

f'''(x) = e^(-x^2) * (-8x^3 + 12x)
f'''(0) = 0

f''''(x) = e^(-x^2) * (16x^4 - 48x^2 + 12)
f''''(0) = 12

Then:

e^(-x^2) = 1 - 2 * x^2/2! + 12 * x^4/4! + ....
= 1 - x^2 + x^4/2 + ...

∫ e^(-x^2) dx = x -x^3/3 + x^5/10 + .... + C

3. Find the Taylor series for cos x at a = π/4 to three nonzero terms.

f(x) = cos x
f(π/4) = √2/2

f'(x) = - sin x
f'(π/4) = -√2/2

f''(x) = -cos x
f''(π/4) = -√2/2

Then:

cos x = √2/2 - √2/2 * (x - π/4) + √2/2 * (x - π/4)^2/2! + ....

That concludes our section on Taylor and Maclaurin series. The next and last entry will be our "catch all" entry.

Thank you as always,

Eddie

This blog is property of Edward Shore. © 2012

HP 15C: The I Squared Rule and HHC 2026

HP 15C: The I Squared Rule and HHC 2026 HHC 2026 Videos Before we start, the videos for HHC 2026 are up! Please take a look, ev...