0% found this document useful (0 votes)
16 views40 pages

Lec 8 - Version2improper - Simpson

Uploaded by

yousefghonim18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views40 pages

Lec 8 - Version2improper - Simpson

Uploaded by

yousefghonim18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

MATH 112i - Calculus II

and Analytical Geometry


1

Lecture 8
 Improper Integral

 Numerical Integration
➢ Trapezoidal, and Simpson’s Rule
Improper Integrals
• An improper integral is a definite integral that
has either or both limits infinite or an
integrand that approaches infinity at one or
more points in the range of integration.
• 1. Infinite Interval 2. Discontinuous Integrand

The value of the integration may be


value(convergent ) or ∞(divergent)
Improper Integrals

Forms of improper integral of Type I


Improper Integrals

Forms of improper integral of Type I


Improper Integrals

Forms of improper integral of Type I


Improper Integrals

Forms of improper integral of Type I


Improper Integrals

Forms of improper integral of Type I


Improper Integrals
Notes:-
𝒇(𝒙) 𝟎 ∞
L’hopital Rule:- 𝑰𝒇 lim
𝒙→𝒂 𝒈(𝒙)
=
𝟎
𝑶𝒓

Then,
𝒇(𝒙) 𝒇′ 𝒙
lim = lim
𝒙→𝒂 𝒈(𝒙) 𝒙→𝒂 𝒈′(𝒙)
Improper Integrals
Example– Evaluate the following integrals

𝟏
න 𝟐 𝒅𝒙
𝟏 𝒙
𝒕
𝟏 𝟏 𝒕 𝟏
න 𝟐 𝒅𝒙 = − ቚ = − + 𝟏
𝟏 𝒙 𝒙 𝟏 𝒕
𝟏
lim − + 𝟏 = 𝟏
𝒕→∞ 𝒕

Convergent integration
Improper Integrals
Example– Evaluate the following integrals

𝟏
න 𝒅𝒙
𝟏 𝒙
𝒕
𝟏 𝒕
න 𝒅𝒙 = 𝒍𝒏𝒙 ቚ = 𝒍𝒏𝒕 − 𝒍𝒏𝟏
𝟏 𝒙 𝟏
lim 𝒍𝒏 𝒕 = ∞
𝒕→∞

Divergent integration
Improper Integrals
Example– Evaluate the following integrals

𝟎
න 𝒆𝒙 𝒅𝒙
−∞
𝟎 𝟎
න 𝒆𝒙 𝒅𝒙 = 𝒆𝒙 ቚ = 𝟏 − 𝒆𝒕
𝒕 𝒕
lim 𝟏 − 𝒆𝒕 = 𝟏
𝒕→−∞

Convergent integration
Improper Integrals
Example– Evaluate the following integrals

𝟏
න 𝟐+𝟏
𝒅𝒙
−∞ 𝒙
𝟎 ∞
𝒅𝒙 𝒅𝒙
න 𝟐
+න 𝟐 = 𝑰𝟏 + 𝑰𝟐
−∞ 𝒙 + 𝟏 𝟎 𝒙 +𝟏
𝟎 𝒅𝒙 𝟎
𝑰𝟏 = lim න = 𝒕𝒂𝒏−𝟏 𝒙 ቚ = 𝝅/𝟐 𝑰𝟏 is Convergent integration
𝒕→−∞ 𝒕 𝒙𝟐 + 𝟏 𝒕
𝒕 𝒅𝒙 −𝟏 𝒕
Similarly 𝑰𝟐 = lim ‫𝟐 𝟎׬‬ ȁ
= 𝒕𝒂𝒏 𝒙 𝟎 = 𝝅/𝟐
𝒕→∞ 𝒙 +𝟏
𝑰𝟐 is Convergent integration

𝟏
∴න 𝟐
𝒅𝒙 = 𝑰𝟏 + 𝑰𝟐 = 𝝅 Convergent
−∞ 𝒙 + 𝟏
Improper Integrals
Example– Evaluate the following integrals

න 𝒙𝒆 −𝒙𝟐
𝒅𝒙
𝟎
𝑡 −𝑥 2
‫׬‬0 𝑥𝑒 𝑑𝑥➔Let 𝑧 = −𝑥 2 , dz = −2xdx
𝑥 = 0 =⇒ 𝑧 = 0 & 𝑥 = 𝑡 =⇒ 𝑧 = −𝑡 2
−𝑡 2 2
1 𝑧
1 𝑧 −𝑡 −1 −𝑡 2
− න 𝑒 𝑑𝑧 = − 𝑒 ቚ = (𝑒 − 1)
2 0 2 0 2
−1 −𝑡 2
lim (𝑒 − 1) = 0.5
𝑡→∞ 2
Convergent integration
Improper Integrals
Example– Evaluate the following integrals

න 𝒙𝒆−𝒙 𝒅𝒙 Using By Parts
𝟎
𝑡
lim − 𝒙𝒆−𝒙 − 𝒆−𝒙 ቚ
𝑡→∞ 0
lim (−𝒕 𝒆−𝒕 −𝒆−𝒕 +1)
𝑡→∞

−𝑡
lim ( 𝒕 ) + 1
𝑡→∞ 𝒆
−1
lim 𝒕
+1=0+1=1 Convergent integration
𝑡→∞ 𝒆
Improper Integrals ∞ 𝒍𝒏𝒙
Example:- Find the following integration ‫𝒙𝒅 𝟐𝒙 𝟏׬‬

𝒕
𝒍𝒏𝒙 𝒍𝒏𝒙 𝟏 𝑡
න 𝟐
𝒅𝒙 = − − ቚ
𝟏 𝒙 𝒙 𝒙 1
𝒕 𝒍𝒏𝒕 𝟏
𝒍𝒏𝒙
න 𝟐
𝒅𝒙 = − − +𝟏
𝟏 𝒙 𝒕 𝒕
𝒕 𝒍𝒏𝒕 𝟏
lim න 𝒍𝒏𝒙 lim
𝑡→∞ 𝒅𝒙 = − − +𝟏
𝟐 𝑡→∞ 𝒕 𝒕
𝟏 𝒙
Improper Integrals ∞ 𝒍𝒏𝒙
Example:- Find the following integration ‫𝒙𝒅 𝟐𝒙 𝟏׬‬
𝒍𝒏𝒕 𝟏
lim − − +𝟏
𝑡→∞ 𝒕 𝒕
𝒍𝒏𝒕
lim − −𝟎+𝟏
𝑡→∞ 𝒕

𝟏/𝒕
lim − −𝟎+𝟏
𝑡→∞ 𝟏
𝟎 −𝟎+𝟏=𝟏

Convergent integration
Improper Integrals
∞ 𝟐
Example:- Find the following integral
‫𝒙 𝟐׬‬−𝟏 (𝒙+𝟏) 𝒅𝒙
partial fractions technique
𝟐 𝑎 𝑏
= +
𝒙 − 𝟏 (𝒙 + 𝟏) 𝑥 − 1 𝑥 + 1
2 2
𝑎= ቚ =1 𝑏= ቚ = −1
(𝑥 + 1) 𝑥=1 𝑥 − 1 𝑥=−1
𝒕 𝒕
𝟐 1 1
න 𝒅𝒙 = න − 𝒅𝒙
𝟐 𝒙 − 𝟏 (𝒙 + 𝟏) 𝟐 𝑥−1 𝑥+1
𝑏
= ln 𝑥 − 1 − ln 𝑥 + 1 ቚ
2
𝑥−1 𝑡 𝑡−1 2−1
= ln ቚ = ln − ln
𝑥+1 2 𝑡+1 2+1
Improper Integrals
∞ 𝟐
Example:- Find the following integral ‫𝒙 𝟐׬‬−𝟏 (𝒙+𝟏) 𝒅𝒙

𝑡−1 1
= lim ln − ln
𝒕→∞ 𝑡+1 3
𝑡−1 1
= 𝒍𝒏 lim − ln
𝒕→∞ 𝑡 + 1 3
1 1
= 𝒍𝒏(𝟏) − ln = − ln
3 3
Convergent integration
∞ (𝒙+𝟑)𝒅𝒙
Exercise:- Find ‫𝟐𝒙 𝟐׬‬+𝟏 (𝒙−𝟏)
Part2
Numerical Integration
Trapezoidal, and Simpson’s
Rule
Numerical Integration

Remember: Area of a Trapezoid


b2

Area = (b1 + b2 )
h h
2
b1

b1 b2
Another form of trapezoid

h
Numerical Integration: Trapezoidal Rule

y = f (x )
We are going to divide the
area from a to b to 4 parts.

Approximate the area of


each part by a trapezoid

a b
x0 h x1 x2 x3 x4
The height of each trapezoid
b−a
h=
4
Numerical Integration: Trapezoidal Rule
y = f (x ) The area of the first trapezoid.

A1 = ( f ( x0 ) + f ( x1 ))
h
2
f (x1 )
the second trapezoid.
f (x0 )
A2 = ( f ( x1 ) + f ( x2 ))
A1 h
2

b
A3 = ( f ( x2 ) + f ( x3 ))
a h h
x0 x1 x2 x3 x4
2

A4 = ( f ( x3 ) + f ( x4 ))
Total area is h
2
the sum
Numerical Integration: Trapezoidal Rule
y = f (x )
A1 = ( f ( x0 ) + f ( x1 ))
h
2
f (x1 )
A2 = ( f ( x1 ) + f ( x2 ))
h
f (x0 ) 2
A3 = ( f ( x2 ) + f ( x3 ))
h
2
A4 = ( f ( x3 ) + f ( x4 ))
h
a h b
2
x0 x1 x2 x3 x4

Area = ( f ( x0 ) + 2 f ( x1 ) + 2 f ( x2 ) + 2 f ( x3 ) + f ( x4 ))
h
2
The bigger number of trapezoids, the more accurate answer .
Numerical Integration: Trapezoidal Rule

In general : for n trapezoids

b−a
h=
n
b
f ( x )dx   f ( x0 ) + 2 f ( x1 ) + 2 f ( x2 ) + ... + 2 f ( xn −1 ) + f ( xn )
h

a
2
Numerical Integration: Trapezoidal Rule
Example: Estimate
3
1
dx using trapezoidal rule
1 x
with n=4 3−1
n = 4, h = =05
4
x 1 15 2 25 3
f (x) 1 0  66667 0 5 0 4 0  33333

Area = ( f ( x0 ) + 2 f ( x1 ) + 2 f ( x2 ) + 2 f ( x3 ) + f ( x4 ))
h
2
Area =
0 .5
(1 + 2(0.66667 + 0.5 + 0.4 ) + 0.33333)
2
3 1
  dx  1  11666
1 x
Numerical Integration: Trapezoidal Rule
1
Example: Estimate  1+ x using trapezoidal rule
3
dx
0

with n=5
1− 0
n = 5, h = =02
5
x 0 0 2 0 .4 0 6 0 .8 1
f (x) 1 1 .0 0 3 9 1 .0 3 1 5 1 .1 0 2 7 1 .2 2 9 6 1 .4 1 4

Area = ( f ( x0 ) + 2 f ( x1 ) + 2 f ( x 2 ) + 2 f ( x3 ) + 2 f ( x 4 ) + f ( x5 ))
h
2

Area =
0.2
(1 + 2(1.0039 + 1.0315 + 1.1027 + 1.2296) + 1.414)
2
1
  1 + x dx  1.1149
3
0
Numerical Integration: Simpson’s Rule
• Simpson’s rule is the most
accurate method of finding the
area under a curve.
• It is better than the trapezoidal
rule because instead of using
straight lines to model the
curve, it uses parabolic arches
to approximate each part of the Thomas Simpson
curve. 1710-1761
Numerical Integration: Simpson’s Rule

x
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Numerical Integration: Simpson’s Rule

x
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.
Numerical Integration: Simpson’s Rule

x
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.
Numerical Integration: Simpson’s Rule

x
x

The rule fits a quadratic curve to the 1st 3 points at


the top edge of the strips.
Another quadratic curve is fitted to the 3rd, 4th and
5th points.

In Simpson’s Rule, n Must be even


Numerical Integration: Simpson’s Rule

Simpson’s Rule(formula)

b−a
for even n h=
n
b h
a
f ( x)dx 
3
[
f ( x0 ) + 4 f ( x1 ) + 2 f ( x 2 ) + 4 f ( x3 ) +

]
........ + 2 f ( x n − 2 ) + 4 f ( x n −1 ) + f ( x n )

Proof.. later
Numerical Integration: Simpson’s Rule
Example: Estimate
3
1
dx using Simpson’s rule
1 x
with n=4
3−1
n = 4, h = =05
4
x 1 15 2 25 3
f (x)1 0  66667 0 5 0 4 0  33333
Area = ( f ( x0 ) + 4 f ( x1 ) + 2 f ( x2 ) + 4 f ( x3 ) + f ( x4 ))
h
3

Area =
0.5
(1 + 4(0.66667) + 2(0.5) + 4(0.4) + 0.33333)
3
3 1
  dx  1  1
1 x
Numerical Integration: Simpson’s Rule
Example: Estimate 1
1
using Simpson’s rule
 1+ x dx
0
2

with n=4 1− 0
n = 4, h = = 0  25
4
x 0 0  25 05 0  75 1
y 1 0  94118 08 0  64 0 5

Area = ( f ( x0 ) + 4 f ( x1 ) + 2 f ( x2 ) + 4 f ( x3 ) + f ( x4 ))
h
3
Area =
0.25
(1 + 4(0.94118) + 2(0.8) + 4(0.64) + 0.5)
3
1
1
  dx  0.7854
0
1+ x 2
35

See you next week


Simpson’s Rule(proof)
f(x) (x, y2)

(x-h, y1)
(x+h, y3)

p(x) = ax2+bx+c
x-h x x+h

y1 = f(x-h) Three non-linear


y2 = f(x) points determine a
unique parabola.
y3 = f(x+h)
Simpson’s Rule(proof)
(x,
(0, y2)

(x-h,
(-h, y1)
(h, y3)y3)
(x+h,

p(x) = ax2+bx+c
x-h
-h x x+h
h

y1 = f(x-h) Three non-linear


y2 = f(x) points determine a
unique parabola.
y3 = f(x+h)
Simpson’s Rule(proof)
(0, y2) h
−h p ( x ) dx =
h
3

2 ah 2
+ 6c 
(-h, y1)
(h, y3)
2 − bh + c = y1
2
ah
ah − bh + c = y1
p(x) = ax2+bx+c
a0 2 + b0 + cc==yy2 2
-h x h
ah2 + bh ++ cc == yy3
2
ah + bh 3

y1 = f(x-h) 2ah2 + 2c = y1 + y3
Three non-linear
y2 = f(x) points determine a c = y2
unique parabola.
y3 = f(x+h)

−h p( x)dx = 3  y1 + 4 y2 + y3 
h h
Simpson’s Rule(proof)
f(x) (x2 , y2)

(x1 , y1)
(x3 , y3)

p(x) = ax2+bx+c
x1 x2 x3
Simpson’s Rule(proof)

b h

a
f ( x )dx 
3
[
f ( x0 ) + 4 f ( x1 ) + 2 f ( x2 ) + 4 f ( x3 ) +

• • • + 2 f ( xn −2 ) + 4 f ( xn −1 ) + f ( xn )]

You might also like