Numerical Methods Notes: Numerical Integration and ODE Solutions, Study notes of Engineering Mathematics

Comprehensive study notes on Numerical Methods covering Numerical Integration and Numerical Solutions of Ordinary Differential Equations (ODEs). Topics include Trapezoidal Rule, Simpson's 1/3 Rule, Simpson's 3/8 Rule, Euler Method, Modified Euler Method, and Runge-Kutta Fourth Order Method. The document contains theory, formulas, derivations, solved examples, numerical computations, and practice exercises with answers. Suitable for undergraduate students studying Engineering Mathematics, Numerical Analysis, Applied Mathematics, and computational methods. Topics: Numerical Integration, ODE Solutions, Trapezoidal Rule, Simpson's Rule, Euler Method, Modified Euler Method, Runge-Kutta Method, Numerical Analysis.

Typology: Study notes

2025/2026

Available from 06/14/2026

anmay-chavan
anmay-chavan 🇮🇳

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MODULE IV: NUMERICAL DIFFERENTIATION & INTEGRATION
AND SOLUTIONS TO ORDINARY DIFFERENTIAL EQUATIONS (ODE)
Numerical Integration
The process of evaluating a definite integral from a set of tabulated values of integrand
𝑓(𝑥) is called numerical integration.
1. Trapezoidal Rule
Let 𝐼= 𝑓(𝑥) 𝑑𝑥
𝑏
𝑎 where 𝑓(𝑥) takes the values 𝑦₀, 𝑦₁,𝑦₂, . .. ,𝑦 for 𝑥 = 𝑥₀, 𝑥₁,. . ., 𝑥.
𝑓(𝑥) 𝑑𝑥=
𝑏
𝑎 𝑓(𝑥) 𝑑𝑥=
𝑥0+𝑛ℎ
𝑥0
2[(𝑦0+𝑦𝑛)+2(𝑦1+𝑦2++𝑦𝑛−1)]
2. Simpson's 𝟏
𝟑𝒓𝒅 Rule
𝑓(𝑥) 𝑑𝑥=
𝑏
𝑎
3[(𝑦0+𝑦𝑛)+4(𝑦1+𝑦3+𝑦5++𝑦𝑛−1)
+2(𝑦2+𝑦4+𝑦6++𝑦𝑛−2)]
Number of subintervals must be even.
3. Simpson's 𝟑
𝟖𝒕𝒉 Rule
𝑓(𝑥) 𝑑𝑥=
𝑏
𝑎3ℎ
8[(𝑦0+𝑦𝑛)+3(𝑦1+𝑦2+𝑦4+𝑦5+𝑦7+𝑦8++𝑦𝑛−1)
+2(𝑦3+𝑦6+𝑦9++𝑦𝑛−3)]
Number of subintervals must be multiples of 3.
Example 1: Evaluate ∫ 𝑑𝑥
1+𝑥2
6
0 using:
(i) Trapezoidal rule (ii) Simpson's 1/3rd rule (iii) Simpson's 3/8th rule
Solution: Divide the interval (0,6) into six parts of width ℎ=1.
The value of 𝑓(𝑥)=1
1+𝑥2 is given by:
𝑥
0
1
2
3
4
5
6
𝑓(𝑥)
1
0.5
0.2
0.1
0.05884
0.0385
0.027
(i) Trapezoidal Rule:
𝑑𝑥
1+𝑥2
6
0=
2[(𝑦0+𝑦6)+2(𝑦1+𝑦2+𝑦3+𝑦4+𝑦5)]
= 1
2[(1+0.027)+2(0.5+0.2+0.1+0.05884+0.0385)]=1.41084
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Numerical Methods Notes: Numerical Integration and ODE Solutions and more Study notes Engineering Mathematics in PDF only on Docsity!

MODULE IV: NUMERICAL DIFFERENTIATION & INTEGRATION

AND SOLUTIONS TO ORDINARY DIFFERENTIAL EQUATIONS (ODE)

Numerical Integration

The process of evaluating a definite integral from a set of tabulated values of integrand

𝑓(𝑥) is called numerical integration.

  1. Trapezoidal Rule

Let 𝐼 = ∫ 𝑓(𝑥) 𝑑𝑥

𝑏

𝑎

where 𝑓(𝑥) takes the values 𝑦₀, 𝑦₁, 𝑦₂,... , 𝑦 for 𝑥 = 𝑥₀, 𝑥₁,... , 𝑥 .

𝑏

𝑎

𝑥 0

+𝑛ℎ

𝑥 0

[(𝑦

0

𝑛

1

2

𝑛− 1

)]

  1. Simpson's

𝟏

𝟑

𝒓𝒅

Rule

𝑏

𝑎

[

0

𝑛

1

3

5

𝑛− 1

2

4

6

𝑛− 2

]

Number of subintervals must be even.

  1. Simpson's

𝟑

𝟖

𝒕𝒉

Rule

𝑏

𝑎

[

0

𝑛

1

2

4

5

7

8

𝑛− 1

3

6

9

𝑛− 3

]

Number of subintervals must be multiples of 3.

Example 1: Evaluate ∫

𝑑𝑥

1 +𝑥

2

6

0

using:

(i) Trapezoidal rule (ii) Simpson's 1/3rd rule (iii) Simpson's 3/8th rule

Solution: Divide the interval ( 0 , 6 ) into six parts of width ℎ = 1.

The value of 𝑓

1

1 +𝑥

2

is given by:

(i) Trapezoidal Rule:

2

6

0

[(𝑦

0

6

1

2

3

4

5

)]

[( 1 + 0. 027 ) + 2 ( 0. 5 + 0. 2 + 0. 1 + 0. 05884 + 0. 0385 )] = 1. 41084

(ii) Simpson's 1/

rd

Rule:

2

6

0

[(𝑦

0

6

1

3

5

2

4

)]

[( 1 + 0. 027 ) + 4 ( 0. 5 + 0. 1 + 0. 0385 ) + 2 ( 0. 2 + 0. 05884 )] = 1. 3662

(iii) Simpson's 3/

th

Rule:

2

6

0

[(𝑦

0

6

1

2

4

5

3

)]

[( 1 + 0. 027 ) + 3 ( 0. 5 + 0. 2 + 0. 05884 + 0. 0385 ) + 2 ( 0. 1 )] = 1. 3571

Example 2: Use trapezoidal rule to estimate the integral ∫ 𝑒

𝑥

2

2

0

𝑑𝑥 taking 10

subintervals.

Solution: Let 𝑦 = 𝑒

𝑥

2

, ℎ = 0. 2 and 𝑛 = 10

𝑥

2

𝑥

2

𝑥

2

2

0

[(𝑦

0

10

1

2

3

4

5

6

7

8

9

)]

Example 3: Use (𝑖) Trapezoidal (𝑖𝑖) Simpson's 1/3rd rule for ∫ 𝑒

−𝑥

2

  1. 6

0

𝑑𝑥 with h=0.1 (or

by taking 7 ordinates)

Solution:

(i) Trapezoidal Rule:

−𝑥

2

  1. 6

0

[(𝑦

0

6

1

2

3

4

5

)] = 0. 5344

(ii) Simpson's 1/

rd

Rule:

−𝑥

2

  1. 6

0

3

[(𝑦

0

6

1

3

5

2

4

)]=0.

Numerical Solution of Ordinary Differential Equations

  1. Euler's Method

Consider the equation

𝑑𝑦

𝑑𝑥

= 𝑓(𝑥, 𝑦) given 𝑦(𝑥

0

0

. To find an approximate value of y

corresponding to 𝑥, by Euler’s method we have:

𝑖

𝑖− 1

𝑖− 1

𝑖− 1

i.e., 𝑛𝑒𝑤 𝑦 = 𝑜𝑙𝑑 𝑦 + ℎ (𝑑𝑦/𝑑𝑥)

Example 1: Using Euler's method, find 𝑦( 1 ) given

𝑑𝑦

𝑑𝑥

Solution: Divide the interval ( 0 , 1 ) into 10 subintervals with ℎ = 0. 1

The approximate value of 𝑦( 1 ) is 3.18.

Example 2: Given

𝑑𝑦

𝑑𝑥

𝑦−𝑥

𝑦+𝑥

, 𝑦( 0 ) = 1 , find 𝑦( 0. 1 )

Solution: Divide the interval ( 0 , 0. 1 ) into 5 subintervals with ℎ = 0. 02

Thus 𝑦( 0. 1 ) ≈ 1. 0928

  1. Modified Euler's Method

By Euler’s Method:

𝑖

𝑖− 1

𝑖− 1

𝑖− 1

i.e., for first iteration: 𝑦 1

0

0

0

By Modified Euler’s Method:

1

is computed initially by Euler’s formula above and 𝑓(𝑥

0

0

) is replaced by

𝑓

( 𝑥

0

𝑦

0

) +𝑓

( 𝑥

1

𝑦

1

)

2

to obtain first modification 𝑦

1

( 1 )

i.e. 𝑦

1

( 1 )

0

+ ℎ [

𝑓(𝑥

0

,𝑦

0

)+𝑓(𝑥

1

,𝑦

1

)

2

]

Second modification is given by:

1

( 2 )

0

+ ℎ [

0

0

1

1

( 1 )

]

𝑡ℎ

modification is given by:

1

(𝑛)

0

+ ℎ [

0 ,

0

1

1

(𝑛− 1 )

]

The procedure is terminated when successive modification does not show any change.

Same procedure is repeated to find 𝑦 2

3

, and so on…

𝑡ℎ

modification of 𝑦

𝑘

is given by:

𝑘

(𝑛)

𝑘− 1

+ ℎ [

𝑘− 1

𝑘− 1

𝑘

𝑘

( 𝑛− 1

)

]

Example 1: Using modified Euler’s method find 𝑦( 0. 2 ) and 𝑦( 0. 4 ) for 𝑦

𝑥

𝑦( 0 ) = 0. Let ℎ = 0. 2

Solution: Given 𝑦

𝑥

0

0

i) To find 𝑦( 0. 2 )

By Euler’s Method: 𝑦

1

0

0

0

= 0. 2468 + 0. 2 [

] = 0. 6031

Fifth modification of 𝑦

2

2

( 4

)

1

+ ℎ [

1

1

2

2

( 4

)

]

= 0. 2468 + 0. 2 [

] = 0. 6031

Thus 𝑦

2

Example 2: Solve the following by Euler’s modified method

𝑑𝑦

𝑑𝑥

= log(𝑥 + 𝑦),

= 2 , find 𝑦

considering ℎ = 0. 2

Solution: Given 𝑦

= log(𝑥 + 𝑦), 𝑥

0

0

By Euler’s Method: 𝑦 1

0

0

0

First modification of 𝑦 1

1

( 1 )

0

+ ℎ [

0

0

1

1

] = 2 + 0. 2 [

] = 2. 0655

Second modification of 𝑦

1

1

( 2 )

0

+ ℎ [

0

0

1

1

( 1

)

] = 2 + 0. 2 [

] = 2. 0656

Third modification of 𝑦 1

1

( 3 )

0

+ ℎ [

0

0

1

1

( 2

)

] = 2 + 0. 2 [

] = 2. 0656

Thus 𝑦 1

Exercise:

  1. Using modified Euler’s method, find an approximate value of 𝑦 when 𝑥 = 0. 3 given

that

𝑑𝑦

𝑑𝑥

= 𝑥 + 𝑦 and 𝑦( 0 ) = 1 Ans: y(0.3) ≈ 1.

  1. Runge-Kutta Method

Consider the differential equation

𝑑𝑦

𝑑𝑥

0

0

Let ℎ be increment in 𝑥 and 𝑘 be the increment in 𝑦 i.e.,

0

0

0

0

Then for finding the increment 𝑘 by Runge-Kutta method, calculate:

1

0

0

2

0

0

1

3

0

0

2

4

0

0

3

1

2

3

4

And 𝑦

1

0

The above method is also called fourth-order Runge Kutta method and is applicable to

linear or non-linear differential equation

Example 1: Apply Rune-Kutta fourth order method, to find an approximate value of

𝑦( 0. 2 ) given that

𝑑𝑦

𝑑𝑥

= 𝑥 + 𝑦 and 𝑦( 0 ) = 1.

Solution:

Given 𝑥 0

0

= 1 , ℎ = 0. 2. To find 𝑘:

1

0

0

= 0. 2 × 𝑓( 0 , 1 ) = 0. 2 × 1 = 0. 2000

2

0

0

1

) = 0. 2 × 𝑓( 0. 1 , 1. 1 ) = 0. 2 × 1. 2 = 0. 2400

3

0

0

2

) = 0. 2 × 𝑓( 0. 1 , 1. 12 ) = 0. 2 × 1. 22 = 0. 2440

4

0

0

3

) = 0. 2 × 𝑓( 0. 2 , 1. 244 ) = 0. 2888

1

2

3

4

Thus, 𝑦

0

Example 2: Using Runge-Kutta method of fourth order, solve

𝑑𝑦

𝑑𝑥

𝑦

2

−𝑥

2

𝑦

2

+𝑥

2

, with 𝑦( 0 ) = 1 ,

find 𝑦( 0. 2 ).

Solution:

Given 𝑥 0

0

= 1 , ℎ = 0. 2. To find 𝑘:

1

0

0

) = 0. 2 × 𝑓( 0 , 1 ) = 0. 2000

2

0

0

1

) = 0. 2 × 𝑓( 0. 1 , 1. 1 ) = 0. 19672