You are on page 1of 2

Indian Institute of Technology, Bombay Chemical Engineering

CL701: Computational Methods in Chemical Engineering Tutorial 5, 2022


Topics: ODE-IVP, Date last modified: 16 Oct 2022

Instructions: (i) Use only a calculator (not a computer) wherever required to solve the problems.

1. Consider integration of an ODE-IVP of the form:


dx
= f (x, t), x(t = 0) = x(0)
dt
(a) In the class we had derived the following scheme to integrate an ODE-IVP:

x(n + 1) = x(n − 1) + hf (n) (1)

Recall that we had derived this by assuming a 2nd degree (m = 2) local polynomial ap-
proximation, and then obtaining the coefficients of that polynomial using current and past
x and derivative values. Now, consider the p-step multistep method as:
p
X p
X
x(n + 1) = αi x(n − i) + h βi f (n − i)
i=0 i=−1

i. For p = 1, and m = 2, using α0 = β−1 = 0 and the exactness constraints, derive


expression 1.
ii. For p = 1, and m = 2, using α1 = β−1 = 0 and the exactness constraints, derive the
integration scheme.
(b) Consider the following multi-step method:

x(n + 1) = α1 x(n − 1) + h[β−1 f (n + 1) + β0 f (n) + β1 f (n − 1)]

Derive the coefficients in the above method, so that it becomes equivalent to the a local
interpolating polynomial approximation of the form:

x(τ ) = a0 (n) + a1 (n)τ + a2 (n)τ 2 + a3 (n)τ 3

2. Consider the initial value problem


dx
= −2tx2 , x(0) = 1
dt
Consider h = 0.2.

(a) Obtain the analytical solution x(t)?


(b) Use implicit Euler to obtain x(t1 ) where t1 = 0 + h = 0.2. Use Newton Raphson (use
calculator) to solve the resulting nonlinear equation. You can take the given x(0) value as
initial guess.
(c) Consider the integration method: x(n + 1) = x(n − 1) + 2hf (n) which was derived in the
class. This is also called mid-point method. Using this, obtain x(t2 ) where t2 = 0+2h = 0.4.
To obtain x(t1 ), write it as x(t0 + h) and then use Taylor series approximation upto second
order. The resulting scheme is explicit.
(d) Obtain x(t1 ) using Heun’s modified method.
(e) Obtain x(t1 ) using Euler-Cauchy method.
(f) Obtain x(t1 ) using fourth order Runge Kutta method.
Note: (i) Both Heun’s modified method and Euler-Cauchy method are Runge Kutta 2nd order
methods, with b = 1/2 in Heun’s modified method, and b = 1 in Euler-Cauchy method. Recall
that parameters a, b, α, β were used in the lecture notes while deriving 2nd order Runge Kutta
methods. We had obtained a = 1 − b, α = β = 1/(2b). (ii) For each of the above cases, you can
compare results with the analytical (true) solution.

3. Consider the following system of equations:


du
= −3u + 2v, u(0) = 0
dt
dv
= 3u − 4v, v(0) = 0.5
dt
With step length h = 0.2, obtain u, v at t = 0.2 using (i) Euler-Cauchy method, and (ii) Runge-
Kutta fourth order method.
Following problems from Module 4 (ODE-IVP; Exercise at the end)

4. Problems 15, 16: Just express the given 2nd order differential equation in the standard first
dx
order ODE (vector case) form as = F(x, z) where x, F are vectors.
dz

You might also like