You are on page 1of 60

ABSTRACT

The main aim of this project is to explain the concept of inclusion of glucose

into the blood stream using Runge-Kutta method.

This project is divided into three chapters.

Chapter 1 is introduction, in which i discuss the existing literature that is

needed to develop the project.

In chapter 2 I discuss the definitions and examples which support to the

chapter 3.

In chapter 3, I discuss about the uses of glucose and applications of glucose

using Runge-Kutta method.

1
CHAPTER-1
INTRODUCTION
INTRODUCTION

Differential equation: An equation involving differential (or) one

dependent variable and its derivatives with respect to one (or) more

independent variables is called a differential equation

Ordinary Differential equation: A differential equation is said to be


ordinary, if the derivatives in the equation have reference to only a single

independent variable.

𝑑𝑦
i. (𝑑𝑦)3 −4( )2 + 7y = cosx
𝑑𝑥 𝑑𝑥

ii. y ‘+ 5x(𝑑𝑦)2 – 6y = l
𝑑𝑥

iii. ogx

iv. (x2 + y2 – x)dy + (yey – 2xy)dx =0

The general form of an ordinary differential equation

is F(x, y, 𝑑𝑦, d2y/dx2, _ _ _ dny/dxn) = 0 (or)


𝑑𝑥

F(x, y, y1, y11, _ _ _ yn) = 0

Partial Differential Equation:A differential equation is said to be

partial, if the derivatives in the equation have reference to two or more

independent variables
i. ( y + z )∂z/∂x + ( z + x )∂z/∂y = x + y

ii. (∂z/∂x)2 + (∂z/∂y)2 = 4z

Order of a differential equation: A differential equation is said to be


of order n, if the nth derivative is the highest derivative in that equation.

i. (x2 + 1)𝑑𝑦 + 2xy + 4x2


𝑑𝑥

The first derivative 𝑑𝑦


𝑑𝑥
is the highest derivative in the above equation.

Therefore the order of the above differential equation is one.

ii. Xd2y/dx2 − (2x – 1 )𝑑𝑦 + (x – 1)y = ex


𝑑𝑥

The second derivative d2y/dx2 is the highest derivative in the above equation.

Therefore the order of the above equation is two.

 A differential equation of order one is of the form

F(x, y, 𝑑𝑦) = 0
𝑑𝑥

 A differential equation of order two is of the form

F(x, y,𝑑𝑦, 𝑑2𝑦) = 0


𝑑𝑥 𝑑𝑥2

 In general differential equation of order n is of the form

F(x, y, ,
𝑑𝑦 𝑑2𝑦
, _ _ _dny/dxn) = 0
𝑑𝑥 𝑑𝑥2
Degree of a Differential Equation:

Let F(x, y′, y″, y‴, _ _ _y(n)) = 0 be a differential equation of order n. If the given

differential equation is a polynomial in y(n), then the highest degree of y(n) is

defined as the degree of the differential equation.

𝑑𝑦
1. y = x √1 + (𝑑𝑦/𝑑𝑥)2
𝑑𝑥

(y ˗ x𝑑𝑦 )2 = 1 + (𝑑𝑦)2
𝑑𝑥 𝑑𝑥

y2 + x2(y′)2 – 2xyy′ = 1 + (y′)2

x2(y′))2 ˗ (y′))2= 1 + 2(xyy′) ˗ y2

(x2 ˗ 1 )(( y′))2= 1 + 2xyy′˗ y2

this is a polynomial equation in𝑑𝑦. The highest degree of𝑑𝑦 is two. Hence the
𝑑𝑥 𝑑𝑥

degree of the above diferential equation is two.

2. ad2y/dx2 = [ 1 + (𝑑𝑦)2]3/2 → a2(d2y/dx2) = [ 1 + (𝑑𝑦)2]3 this is a polynomial


𝑑𝑥 𝑑𝑥

equation in d2y/dx2. The highest degree of d2y/dx2 is two. Hence the

degree of above differential equation is two.

3. y = cos(𝑑𝑦) and x = y + log𝑑𝑦.The above equation cannot be expressed as


𝑑𝑥 𝑑𝑥

polynomial equation in 𝑑𝑦
. Hence the degree of the above differential
𝑑𝑥

equations cannot be determined and hence undefined.


Formation of a Differential Equation:

Let Ø(x, y, c1, c2,….cn) = 0

Where c1, c2, ….cn are n arbitrary constants. Differentiating successively n

times with respect to x, we get

f1(x, y,y(1), c1, c2, …..cn) = 0

f2(x, y, y(1), y(2), c1,c2, ….cn) = 0 ……..

fn(x, y, y(1), y(2), …..y(n), c1, c2, …..cn) = 0...........(n + 1)

Working rule to form a differential equation:

1. Let the given equation contains ‘n’ arbitrary constants

2. Differentiate the given equation n times to get n additional equations.

3. Eliminate the n constants from (n+1) equations given by 1 and 2.

4. Then we obtain required differential equation of order ‘n’.


CHAPTER 2
DIFFERENTIAL EQUATIONS OF FIRST
ORDER AND FIRST DEGREE, RUNGE-
KUTTA METHOD PROBLEMS
DIFFERENTIAL EQUATIONS OF FIRST
ORDER AND FIRST DEGREE
An equation of the form 𝑑𝑦 = f(x,y) is called a differential equation of first order
𝑑𝑥

and of the first degree. We studt the following four methods for solving 𝑑𝑦
=
𝑑𝑥

f(x,y)

1. Variable separable

2. Homogenous equations and equations reducible to homogenous form

3. Exact equations and which can be made exact by the use of integrating factors.

4. Linear equations and Bernouli’s form.

Variable separable:

If the differential equation 𝑑𝑦 = f(x,y) can be expressed in the form 𝑑𝑦= f(x)/g(y)
𝑑𝑥 𝑑𝑥

or 𝑑𝑦 = f(x).g(y) where f and g are continuous functions of a single variable, it is


𝑑𝑥

said to be of the form variable separable.

Working rule to find the General Solution(G.S.):

1.The given equation 𝑑𝑦


= f(x)/g(y) can be written by separating variables as
𝑑𝑥

f(x)dx = g(y)dy.
2. Integrate both sides of the above equation and add an arbitrary constant of

integration to any one of the two sides.

3. General solution of equation one is ∫ 𝑓(𝑥)𝑑𝑥 = ∫ 𝑔(𝑦)𝑑𝑦 + 𝑐

Example:

Solve: log𝒅𝒚 = ax + by
𝒅𝒙

Sol: Given equation is log(𝑑𝑦) = ax +by


𝑑𝑥

𝑑𝑦
𝑑𝑥 = eax + by

𝑑𝑦
𝑑𝑥 = eax.eby

eaxdx = e-bydy (separating the variables)

∫ 𝑒axdx = ∫ 𝑒-bydy

+ c eax/a = e-by/-b + c

Therefore the given solution of equation is beax + ae-by = c

Homogeneous Differential equation:

A differential equation𝑑𝑦= f(x, y) of first order and first degree is called


𝑑𝑥

homogenous in x and y if the function f(x, y) is a homogenous function of degree

zero in x and y.
Working rule to solve a homogenous differential equation

1. Let 𝑑𝑦 = f(x,y) be the homogenous equation then express it in the form 𝑑𝑦 =


𝑑𝑥 𝑑𝑥

Ø(y/x) …(i)

2. To solve (i) , put y/x = v → y = vx ….(ii)

3. Differentiating (ii) with respect to x: 𝑑𝑦= v+ x𝑑𝑣….(iii)


𝑑𝑥 𝑑𝑥

4. Now (i), (ii), (iii) → v +x𝑑𝑦 = Ø(v)→ x𝑑𝑣 =Ø(v) –v


𝑑𝑥 𝑑𝑥

Separating the variables 𝑑𝑥= dv/Ø(v) – v


𝑥

Integrating on both sides and replace v by (y/x) then we get the general solution

of the given homogenous equation

Example:

Solve: x𝒅𝒚= y + xey/x


𝒅𝒙

Sol: Given equation is x𝑑𝑦 = y + xey/x


𝑑𝑥

𝑑𝑦
= y/x +ey/x ….(i)
𝑑𝑥

Since f(kx,ky) = f(x,y), (i) is homogenous equation put y=vx in (i)

𝑑𝑦
= v + x𝑑𝑣….(ii)
𝑑𝑥 𝑑𝑥
Then (i) and(ii) → v +x𝑑𝑣 = v + ev → x𝑑𝑣 = ev
𝑑𝑥 𝑑𝑥

Separating the variables: 𝑑𝑣=𝑑𝑥 → e-vdv =𝑑𝑥


𝑒𝑣 𝑥 𝑥

𝑑𝑥
∫ 𝑒-vdv = ∫ + c → -e-v = log│x│ + c ….(iii)
𝑥

Putting y=vx in (iii), the general solution of (i) is e-(y/x) +log│x│+ c=0

Equations reducible to Homogenous form:

Non-homogenous equations of the first degree in x and y:

 If the equation 𝑑𝑦
𝑑𝑥 =f(x,y) is of the form (a2x+b2y+c2) 𝑑𝑦 = a1x+b1y+c1
𝑑𝑥

where a1,b1,c1,a2,b2,c2 are real numbers and c1≠0 or c2≠0, then it is called

non-homogenous differential equation of the first degree in xand y.

General solution of non-homogenous(a2x+b2y+c2)𝑑𝑦 = a1x+b1y+c1


𝑑𝑥

The above equation can be reduced to homogenous form or variable separable

form by some transformation


Exact Differential equations and equations which can be

made exact by the use of integrating factors

Exact Differential equation:The type of differential equation that can be

solved directly without the use of any of special techniques in the subject. A

first order differential equation of one variable is called exact or an exact

differential, if it is the result of a simple differentiation.

Working rule for solving an Exact Differential Equation:

1. Compare the given equation with Mdx + Ndy =0 and find out M and N. Then

find out 𝜕𝑀 and 𝜕𝑁


𝜕𝑦 𝜕𝑥

2. Given equation will be exact if 𝜕𝑀 = 𝜕𝑁


𝜕𝑦 𝜕𝑥

3. Integrate M partially with respect to x, treating y as constant, denote this by


𝑥
∫ 𝑀𝑑𝑥

4. Integrate only; those terms of N, which do not contain x, with respect to y.

5. Equate the sum of the results obtained from (3) and (4) to a constant to obtain

the required solution.

Therefore the general solution of the given exact differential equation is


𝑥
∫ 𝑀𝑑𝑥 + ∫(𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑁 𝑖𝑛𝑣𝑜𝑙𝑣𝑖𝑛𝑔 𝑥)𝑑𝑦 = 𝑐
Example:

Solve: (ey + 1)cosxdx + eysinxdy = 0

Sol: Given equation is : (ey+1)cosxdx + eysinxdy = 0 …(1)

(1) Is in the form Mdx + Ndy =0 where M= (ey + 1 )cosx and

N = eysinx

Now 𝜕𝑀 = eycosx, 𝜕𝑁
= eycosx
𝜕𝑦 𝜕𝑥

𝜕𝑀
= 𝜕𝑁 is an exact equation
𝜕𝑦 𝜕𝑥

𝑥 𝑥
∫ 𝑀𝑑𝑥 =∫ (𝑒 y+1)cosxdx = (ey+ 1)sinx(integrating M w.r.t x, treating y

as constant) ….(2)

∫(𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑁 𝑛𝑜𝑡 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑖𝑛𝑔 𝑥 )𝑑𝑦 =0 ….(3)

(2) + (3) The general solution of (1) is

(ey +1)sinx + 0 =c

Therefore (ey+1)sinx = c is the required general solution


Equations reducible to Exact Form:

Non-exact differential equations can be reduced to exact differential

equation with the help of integrating factors. Methods to find

integrating factors of Mdx+Ndy=0

Method 1: By Inspection:

An integrating factor (I.F) of given equation Mdx+Ndy can be found by

inspection as explained below.

By rearranging the terms of the given equation or and by dividing with a

suitable function of x and y, the equation thus obtained will contain several

parts integrable easily.

Example:

Solve: xdy-ydx = xy2dx

Sol: Given equation is xdy-ydx =xy2dx …..(1)

Dividing (1) by y2: 𝑥𝑑𝑦−𝑦𝑑𝑥 = xdx


𝑦2

𝑦𝑑𝑥−𝑥𝑑𝑦
xdx + 𝑦2 =0

xdx + d(x/y) = 0
Integrating: x2/2 + x/y =c

Therefore the general solution of (1) is (x2/2) +(x/y) = c

Method 2: To find an Integrating Factor of Mdx+Ndy=0

M(x,y)dx+N(x,y)dy =0 is a homogenous differential equation and Mx+Ny≠0,

then 1/Mx+Ny is an integrating factor of Mdx+Ndy = 0.

Working Rule to solve Mdx +Ndy =0

1. General equation is Mdx + Ndy = ….(1) observe 𝜕𝑀


≠ 𝜕𝑁
𝜕𝑦 𝜕𝑥

2. Observe M and N are homogenous functions of same order

3. Find Mx+Ny and observe it ≠ 0. Then 1


𝑀𝑥+𝑁𝑦 is an I.F of (1)

Multiply (i) with I.F to transform it into an exact equation of (i) M1dx+N1dy=0

….(ii)

Solve (ii) to get the general solution of (i)

Example:

Solve: x2ydx-(x3+y3)dy =0

Sol:Comparing the given equation with Mdx+Ndy=0

then M=x2y,N=-(x3 + y3)

𝜕𝑀
= x2 and 𝜕𝑁= -3x2 which is not exact equation
𝜕𝑦 𝜕𝑥
The above given equatin is a homogenous equation in x andy .

Now Mx+Ny= x3y-x3y-y4=-y4≠0

Therefore integrating factor = 1


𝑀𝑥+𝑁𝑦 = -1
𝑦4

Multiplying (1) by (-1/y4) → -x2/y3dx + (x3/y4 + 1/y)dy =0 ….(2)

(2) is in the form M1dx+N1dy =0 where M1 = -x2/y3 and N1= x3/y4+1/y

Integrating M1 w.r.t to x treating y as constant

𝑥 𝑥
∫ 𝑀1 𝑑𝑥= ∫ (−𝑥2/y3)dx = -x3/3y3 ….(3)

1
∫(𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑁1 𝑛𝑜𝑡 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑖𝑛𝑔 𝑥)𝑑𝑦= ∫ dy=log|y| …. (4)
𝑦

Therefore the G.S. of (2) is (3) + (4) =c → -x3/3y3 + log|y| =c

log|y/c| = x3/3y3

Method 3: To find an Integrating Factor of Mdx+Ndy=0

If the equation Mdx+Ndy=0 is of the form yf(xy)dx+xg(xy)dy=0 and Mx-

Ny≠0,then 1/Mx-Ny is an integrating factor of Mdx+Ndy =0.

Working Rule to solve Mdx+Ndy=0

1. General equation is Mdx+Ndy=0....(i). Observe 𝜕𝑀≠ 𝜕𝑁 ...(i) is not eact.


𝜕𝑦 𝜕𝑥

2. Observe (i) is of the form 𝑦 𝑓(𝑥𝑦)𝑑𝑥 + 𝑥 𝑔(𝑥𝑦)𝑑𝑦 = 0


3. Find Mx-Ny and observe it ≠0. Then 1 𝑀𝑥−𝑁𝑦
is an I.F of (i)

4. Multiply (i) with I.F. to transform it into an exact equation

of (i)M1dx+N1dy=0...(ii)

5. Solve (ii) to get the general solution of (i)

Example:

Solve: y(xy+2x2y2)dx+x(xy-x2y2)dy=0

Sol.Given y(xy+2x2y2)dx+x(xy-x2y2)dy=0

Comparing (1) with Mdx+Ndy=→ M = y(xy+2x2y2), N = x(xy-x2y2)

𝜕𝑀
= 2xy+6x2y2, 𝜕𝑁 = 2xy-3x2y2 → 𝜕𝑀 ≠ 𝜕𝑁
𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥

(1)is not an exact equation. But (1) is of the form

f(xy)dx+g(xy)dy=0 Also Mx-Ny = x2y2+2x23y3-x3y3=3x3y3≠0

Therefore I.F. = 1
= 1/3x3y3. Multiplying (1) by 1/3x3y3
𝑀𝑥−𝑁𝑦

xy2+2x2y3/3x3y3 dx + x2y-x3y2/3x3y3 dy=0.....(2) which is of the form

M1dx+N1dy=0

where M1=xy2+2x3y3/3x3y3 = 1/3x2y+ 2/3x and

N1=x2y-x3y2/3x3y3=1/3xy2-1/3y

∂M1/∂y= -1/3x2y2, ∂N1/∂x= -1/3x2y2→ ∂M1/∂y= ∂N1/∂x→(2) is exact


Now (2) can be solved by rearranging terms:

1/x2y dx+2/x dx+1/xy2 dy-1/y dy = 0

ydx+xdy/x2y2 + 2. /x dx-1/y dy=0 → d(xy)/x2y2+2/xdx-1/y dy=0

𝑑(𝑥𝑦)
∫ +2 ∫ 1/𝑥 dx – ∫ 1/𝑦 dy = c → - + 2log│x│-log│y│=c is the G.S.
1

(𝑥𝑦)2 𝑥𝑦

Method 4: To find an Integrating Factor of Mdx+Ndy=0

If there exists a continuous single variable function f(x) such that

𝜕𝑀 𝜕𝑁
1
( − ) = f(x) or K(real number), then 𝑒∫ 𝑓(𝑥)𝑑𝑥 or 𝑒∫ 𝑘𝑑𝑥 Is an integrating
𝑁 𝜕𝑦 𝜕𝑥

factor of Mdx+Ndy=0.

Working Rule to solve Mdx+Ndy=0

1. General equation is Mdx+Ndy=0 ……(i) observe ≠


𝜕𝑀 𝜕𝑁
(i) is not exact.
𝜕𝑦 𝜕𝑥

𝜕𝑀 𝜕𝑁
2. Find 1 ( − ) and observe it as a function of x alone =f(x) or a real
𝑁 𝜕𝑦 𝜕𝑥

constant k.

3. Then 𝑒∫ 𝑓(𝑥)𝑑𝑥 or 𝑒∫ 𝑘𝑑𝑥 is an I.F

4. Multiply (i) with I.F to transform it into an exact equation of (i),

M1dx+N1dy=0

5. Solve (ii) to get the general solution of (i)


Example:

Solve: (y+y3/3 +x2/2)dx +1/4(x+xy2)dy=0

Sol:From the above equation M=y+y3/3+x2/2, N=1/4(x+xy2)dy

𝜕𝑁
𝜕𝑀
= 1+y2, 𝜕𝑁=1/4(1+y2) →𝜕𝑀 ≠ ….(1)
𝜕𝑦 𝜕𝑥 𝜕𝑦 𝜕𝑥

𝜕𝑀 𝜕𝑁
Now 1 ( − )= 4
[(1+y2)-1(1+y2)]= 4
.3(1+y2)=3=f(x)
𝑁 𝜕𝑦 𝜕𝑥 𝑥(1+𝑦2) 4 𝑥(1+𝑦2) 4 𝑥

3
I.F= exp[∫ ( ) 𝑑𝑥]=exp(3logx)=𝑒𝑙𝑜𝑔𝑥3=x3
𝑥

Multiplying(1) by x3 →( y+ y3/3+x2/2)x3dx+1(x+xy2)x3dy=0 …(2)


4

Now (2) is an exact equation verify where M1=x3y+x3y3/3+x5/2

N1=1/4x4+1/4x4y2

The G.S of (2) is∫ 𝑀1dx+∫(𝑡𝑒𝑟𝑚𝑠 𝑜𝑓 𝑁1 𝑛𝑜𝑡 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑖𝑛𝑔 𝑥)𝑑𝑦=c

→∫ 𝑥3y+1x3y3+1x5dx + ∫ 0𝑑𝑦=c1
3 2

→x4y/4+x4y3/12+x6/12=c/12

→3x4y+x4y3+x6=c
Method 5: To find an Integrating factor of Mdx+Ndy=0

If there exists a continuous and differentiable single variable function of g(y) such
𝜕𝑁 𝜕𝑀
that 1
( − ) = g(y) or real number k then 𝑒∫ 𝑔(𝑦)𝑑𝑦 or 𝑒∫ 𝑘𝑑𝑦 is an
𝑀 𝜕𝑥 𝜕𝑦

integrating factor of Mdx_ndy=0.

Working rule to solve Mdx+Ndy=0

1. General equation is Mdx+Ndy=0…..(i) observe𝜕𝑀≠𝜕𝑁 is not exact.


𝜕𝑦 𝜕𝑥

𝜕𝑁 𝜕𝑀
2. Find 1
( − ) and observe it a a function of y alone=g(y)
𝑀 𝜕𝑥 𝜕𝑦

3. Then 𝑒∫ 𝑔(𝑦)𝑑𝑦 is an I.f of (i)

4. Multiply (i0 with I.F to transform it into an exact equation of (i),

M1dx+N1dy=0 …..(ii)

Solve (ii) to get the general solution of (i)

Example:

Solve: (y4+2y)dx+(xy3+2y4-4x)dy=0

Sol:from the above equation M=y4+2y, N=xy3+2y4-4x

𝜕𝑀
=4y3+2, 𝜕𝑁
=y3-4
𝜕𝑦 𝜕𝑥
since, it is not an exact equation

𝜕𝑀 𝜕𝑁
𝜕𝑦 𝜕𝑥

𝜕𝑁 𝜕𝑀
but 1 ( − )= 1
(y3-4-4y3-2)=-3(y3+2)/y(y3+2)=-3/y
𝑀 𝜕𝑥 𝜕𝑦 𝑦(𝑦3+2)

I.F=exp(∫ −3/𝑦dy)=exp(-3logy)=exp(logy-3)=1/y3

Multiplying (1) with 1/y3→(y+2/y2)dx+(x=2y-4x/y3)dy=0 ….(2)

(2) is an exact equation where M1=y+2/y2, N1=x+2y-4x/y3

2
Therefore, the G.S of (2) is ∫ (𝑦 + )dx+∫ 2𝑦𝑑𝑦=c → (y+2/y2)x+y2=c
𝑦2

Linear Differential Equations:

An equation of the form𝑑𝑦 +Py = Q where P and Q are constants or functions


𝑑𝑥

of x defined over an interval I alone is called a linear differential equation of

first order in y.

Working Rule to solve linear equation 𝒅𝒚+py=Q where p=f(x) and


𝒅𝒙

Q=g(x)

 If Q=0 for all x in I, then the corresponding equation 𝑑𝑦+Py=0 is called a


𝑑𝑥

homogenous linear equation of first order.

 If Q≠0 for all x in I, then𝑑𝑦+Py=Q is called a non-homogenous linear


𝑑𝑥

equation of first order.


 If P and q are differentiable functions of x over an interval I, then y𝑒∫ 𝑝𝑑𝑥=
𝑑𝑦
∫ 𝑄(𝑒∫ 𝑝𝑑𝑥)dx +c is the general solution of the equation +Py=Q.
𝑑𝑥

Solve:(x2+1) 𝒅𝒚 +4xy= 𝟏

𝒅𝒙 𝒙𝟐+𝟏

Sol: Reducing the given equation to standard form , by dividing with (𝑥2+ 1 )

𝑑𝑦 4𝑥
+ y= 1
where p = 4𝑥
, Q= 1

𝑑𝑥 1+𝑥2 (1+𝑥2)2 1+𝑥2 (1+𝑥2)2

ʃ p d x =ʃ 4𝑥
1+𝑥2 d x=2 log (𝑥2+1)2

Then I.F =exp [ ʃ𝑝𝑑𝑥] = exp [log(x2+1)] = (𝑥2+1)2

G.S of (1) is y ( I .f)=ʃ Q (I .f) d x +c

y( (𝑥2 + 1)2 =ʃ 1
(𝑥2+1)2 .( (𝑥2 + 1)2d x

y( (𝑥2 + 1)2 =x +c

An equation of the form 𝑑𝑥+p1x=Q1 where p1and Q1 are constants or functions of


𝑑𝑦

y alone is called a linear differential equation of first order in x.

 If p1and Q1 are derivable functions of y over interval I then

x 𝑒∫ 𝑝𝑑𝑦 = ∫ 𝑄(𝑒∫(𝑝𝑑𝑦) )dy +c is the general solution of the linear differential

equation of first order in y.


Working rule for solving linear equation dx/dy+p1x=Q1

1. First reduce the given equation to the standard form and then identify P1

and Q1.

2. Find ∫ 𝑃1dy and then I.F = exp[∫ 𝑃1dy]

3. Then obtain G.S by using x(I.F)=∫ 𝑄1(I.F)dy +c

Solve: (1+y2) d x=(tan -1y –x)dy

sol:Given differential equation can be written as (1+y2)𝑑𝑥+x=tan-1y


𝑑𝑦

dividingby (1+y2) to reduce this to standard form :

𝑑𝑦 1 −1 𝑦........
𝑑𝑥
+ 1+𝑦2x=tan
1+𝑦2 (1)

Where p 𝑦
= 1
and Q1=tan−1 are functions of y alone .
1
1+𝑦2 1+𝑦2

Now∫ 𝑝1 d y=tan−1 𝑦

I.F =exp(∫ 𝑝𝑑𝑦)

G.S of (1) is x(I.F)=∫ 𝑄1(I.F)dy +c

tan 𝑦
x𝑒tan−1 𝑦= ʃ −1 𝑒tan−1 𝑦 dy +c
1+𝑦2

put tan-1 =u→ 𝑑𝑦


=du
1+𝑦2
G.S is x𝑒tan−1 𝑦= ʃ u𝑒𝑢 - 𝑒𝑢+c

x𝑒tan−1 𝑦 = x 𝑒tan−1 𝑦(tan−1 𝑦 -1)+c

Equations reducible to Linear Form:

Bernoulli’s Equation:An equation of the form 𝑑𝑦+Py=Qyn where P and Q


𝑑𝑥

are real numbers or functions of x alone and n is a real number such that n≠0

and n≠1 is called a Bernoulli’s differential equation. We can solve Bernoulli’s

equation by reducing ot to linear differential equation in y.

BERNOULLI’S EQUATION:

An equation of the form 𝑑𝑦+Py=Qyn where P and Q are real numbers or


𝑑𝑥

functions of x alone and ‘n’ is a real number such that n≠0 and n≠1,it is called a

Bernoulli’s differential equation. We can solve Bernoulli’s equation by

reducing it to linear differential equation in y as follows:

........................
Given equation is 𝑑𝑦+Py=Qyn (1)
𝑑𝑥

Multiplying (1) by y-n , we get: y-n𝑑𝑦+Py-n+1=Q.................(2)


𝑑𝑥

......................
Let y-n=u →(1-n)y-n𝑑𝑦=𝑑𝑢→ y-n𝑑𝑦= 1 𝑑𝑢
(3)
𝑑𝑥 𝑑𝑥 𝑑𝑥 1−𝑛 𝑑𝑥

(2) and (3), we get 1 𝑑𝑢


+Pu=Q → 𝑑𝑢+(1-n)Pu=(1-n)Q.........(4)
1−𝑛 𝑑𝑥 𝑑𝑥
(4) is a linear equation of first order in u and x.

∴I.F = exp[∫(1-n)Pdx]. Hence the general solution of (4)

is u exp[∫(1-n)Pdx]=(1-n) ∫Q. exp[∫(1-n)Pdx]+c.......(5)

substitution of u =y1-n,we get the general solution of (1).

Example:

𝒚
Solve 𝒅𝒚 + =y2xsinx,x>0
𝒅𝒙 𝒙

𝑦
Sol:Given equation is 𝑑𝑦 + =y2xsinx.........(1) is Bernoulli’s eqn.
𝑑𝑥 𝑥

𝑦
Multiplying (1) by y-2,we get: y-2𝑑𝑦 + −1=x sinx........(2)
𝑑𝑥 𝑥

Let y-1=u → (-1) y-2𝑑𝑦=𝑑𝑢


𝑑𝑦 𝑑𝑢 ..................(3)
𝑑𝑥 𝑑𝑥 → y-2𝑑𝑥 =-𝑑𝑥

(2) and (3), we get

-𝑑𝑢 +𝑢 =x sinx → 𝑑𝑢
- 𝑢 = -x sinx...............................(4)
𝑑𝑥 𝑥 𝑑𝑥 𝑥

(4) is a linear equation in u and x where P=-1, Q=-x sinx


𝑥

∴I.F = exp(∫Pdx)=exp(∫-1dx)=𝑒−𝑙𝑜𝑔𝑥 =1
𝑥 𝑥

General solution of (4) is

u (I.F)= ∫Q(I.F)dx+c → u(1 )= ∫(-x sinx) (1 )dx+c


𝑥 𝑥
u = ∫(-sinx) dx+c → u(1 )=cosx+c
𝑥

u= x cosx+cx............................................................(5)

substitution u=1 in (5), the general solution of (1) is


𝑦

1
=x cosx+cx
𝑦

∴xy cosx+c xy=1

Solution of a Differential Equation: The solution of an ordinary


differential equation in which x is the independent variable and y is the

dependent variable usually means finding an explicit expression for y in terms

of a finite number of elementary functions of x; for example, polynomial,

trigonometric or exponential functions. If such an explicit relation is found,

then the solution is known as the closed form or finite form of solution. In the

absence of such a solution, we have to resort to numerical methods of solution.

In this chapter we mainly concentrate on the numerical solution of ordinary

differential equations. Ordinary differential equation consists of the following

methods.

1. Taylor’s series method

2. Euler’s method

3. Modified Euler method


4. Picard’s method of successive approximation

5. Runge-kutta method

6. Predictor Corrector method: Adams Moulton method

We will use Runge-Kutta method for the inclusion of glucose into the blood

stream. For that we have to know about the concept of Runge-Kutta method.

Runge-Kutta Method:
First order of Runge-Kutta method:Consider the differential
equation 𝑑𝑦
= f(x,y) and the initial condition y(x0) = y0, y(x1) = y1 suppose
𝑑𝑥

we want y at x1 = x0 +h, where h is small the equation of the tangent at (x0,


y0) is y-y0 =( )(x0,y0)(x-x0)
𝑑𝑦
𝑑𝑥

y- y0= f(x0,y0)(x-x0)( since 𝑑𝑦 = f(x,y) )


𝑑𝑥

y= y0 + f(x0,y0)(x-x0)

this is the value of y on the tangent at x = x0 then the value of y at x = x1 is given

by

y = y0 + (x1-x0)hf(x0,y0)

y = y0 + hf(x0,y0)

this gives the approximate value of y at x=x1 we shall denote this by y1

y1 = y0 +hf(x0, y0)
After determining y1 at x = x1 we start with this point (x1, y1) in the place of

(x0, y0) and find (x2, y2) where y2 is the approximate value of y at x = x2 and this

is given by y2 = y1 + hf(x1,y1)

y3 = y2 + hf(x2,y2)------yn + 1 = yn+ hf(xn,yn)

Second order of Runge-Kutta method:

Since by modified Euler’s formula

y1 (0)= y0+hf(x0,y0)

y1(1) = y0 + ℎ[ f(x0,y0) + f(x1, y1(0)) ]


2

y1(1) = y0 +ℎ [f(x0, y0) + f(x0 + h , y0 +hf(x0, y0)]


2

y1(1) = y0 + 1[hf(x0, y0) + hf( x0 + h, y0 + hf(x0, y0))]


2

y1(1) = y0 + 1[ k1 + k2 ] where k1 = hf(x0, y0)


2

k2 =hf(x0 +h, y0 + k1)

Therefore Euler’s modified method is the RK method of second order

Third order of Runge – Kutta method:

The third order of RK method is defined by

y1 = y0 + 1[ k1 + 4k2 + k3 ]
6
Where k1 = hf(x0, y0)

k2 =hf(x0 +h/2 , y0 + k1/2 )

k3 = hf(x0 +h , y0 +2k2 – k1 )

Fourth order of Runge – Kutta method:

The fourth order of Rk method is defined by the equation

y1 = y0+ 1[ k1 + 2k2 + 2k3 + k4]


6

Where k1 = hf(x0,y0)

k2 = hf(x0 +h/2, y0 +k1/2)

k3 = hf(x0 +h/2, y0 + k2/2)

k4 = hf(x0 +h , y0 + k3)

(1) Apply the Fourth Order: y(0.1) and y(0.2) given that y =xy+y2

and y(0)=1

𝑑𝑦
= f(x,y)=xy+y2 and y(0)=1, x0 = 0 and y0 = 1
𝑑𝑥

Take h = 0.1

To find y1 = y0+1/6[k1+2k2+2k3+k4]

Where k1=hf(x0,y0) = (0.1)f(0,1) = (0.1)((0)(1)+(1)2)


k1 = 0.1

k2 = hf(x0+h/2, y0+k1/2)

= (0.1)f(0+0.1/2, 1+0.1/2)

= (0.1)f(0.05, 1.05)

= (0.1)[(0.05)(1.05)+(1.05)2]

= 0.1155

k3 = hf(x0+h/2, y0+k/2)

= hf(0+0.1/2, 1+0.1155/2)

= hf(0.1/2, 1.05775)

= (0.1)f(0.05, 1.05775)

= (0.1)[(0.05)(1.05775)+(1.05775)2]

= 0.1171

k4 = hf(x0+h, y0+k3)

= (0.1)f(0+0.1, 1+0.1171)

= (0.1)f(0.1, 1.1171)

= (0.1)[(0.1)(1.1171)+(1.1171)2]

k4 = 0.13596
Therefore y1= y0+1[k1+2k2+2k3+k4]
6

y1= 1+1[0.1+2(0.1155)+2(0.1171)+(0.13596)]
6

y1 = 1.1168= y(0.1)

To find y2:

y2 = y1+1[k1+2k2+2k3+k4]
6

Where k1 = hf(x1, y1)

= (0.1)f(0.1, 1.11686)

= (0.1)[(0.1)(1.11686)+(1.11686)2]

= 0.1359

k2 = hf(x1+h/2, y1+k1/2)

= hf(0.1+0.1/2, 1.11686+0.13596/2)

= (0.1)(0.15, 1.18481)

= 0.15814

k3 = hf(x0+h/2, y0+k3)

= (0.1)(0.1+0.1/2, 1.11686+0.15814/2)

= (0.1)(0.15, 1.19593)
= (0.1)[(0.15)(1.19593)+(1.19593)2]

= 0.16096

k4 = hf(x0+h, y0+k3)

= (0.1)f(0.1+0.1, 1.11686+0.16096)

= (0.1)f(0.1+0.1, 1.11686+0.16096)

k4 = (0.1)f(0.2, 1.27282)

k4= 0.188

Therefore y2 = y1+1/6[k1+2k2+2k3+k4]

y2= 1.11686+1/6[0.13590+2(0.15814)+2(0.160956)+0.1888]

y2 = 1.27734

(2) Using R.K.method find y(0.4) find the equation

𝑑𝑦
= y-x/y+x, y(0)=1 take h=0.2
𝑑𝑥

Given x0=0, y0=0, h=0.2

To find y1:

y1=y0+1/6[k1+2k2+2k3+k4]

Where k1= hf(x0,y0)


k1= (0.2)(y0-x0)/(y0+x0)

= (0.2)(1-0)/(1+0)

= (0.2)(1)

= 0.2

k2= hf(x0+h/2, y0+k1/2)

= (0.2)f(0+0.2/2,1+0.2/2)

= (0.2)f(0.1, 1.1)

= (0.2)(1.1-0.1/1.1+0.1)

= 0.1666

k3 = hf(x0+h/2, y0+k2/2)

= (0.2)f(0+0.2/2, 1+0.1666/2)

= (0.2)f(0.1, 1.0833)

= 0.16619

k4 = hf(x0+h, y0+k3)

= (0.2)f(0+0.2, 1+0.1661)

= (0.2)f(0.2, 1.1661)

= 0.1414
y1= y0+1/6[k1+2k2+2k3+k4]

y1= 1+1/6[0.2+2(0.1666)+2(0.16619)+0.1414]

y1= 1.1678

To find y2:

y2= y1+1/6[k1+2k2+2k3+k4]

Where k1= hf(x1, y1)

= (0.2)(1.1678-0.2)/(1.678+0.2)

= 0.1415

k2= hf(x1+h/2, y1+k1/2)

= (0.2)f(0.2+0.2/2, 1.1678+0.1415

= (0.2)f(0.3, 1.2385)

= 0.1220

k3= hf(x1+h/2, y1+k2/2)

= (0.2)f(0.2+0.2/2, 1.1678+0.1415/2)

= (0.2)f(0.3, 1.2288)

= 0.1215

k 4= hf(x1+h, y1+k3)
= (0.2)f(0.2+0.2, 1.1678+0.1215)

= 0.1052

y2= y1+1[k1+2k2+2k3+k4]
6

y2 = 1.1678+1/6[0.1415+2(0.1220)+2(0.1215)+0.1052]

= 1.2900

(3) Given 𝒅𝒚=x2, y (1)=1.5 using fourth order RK method


𝒅𝒙

to find an approximate value of y when x=1.2 in steps of

0.1

Given 𝑑𝑦
𝑑𝑥 =x2+y2, x0=1,y0=1.5 and h=0.1

x1=x0+h

x1=1+0.1=1.1

y1=y0 + 1[k1+2k2+2k3+k4
6

Where k1=h f(x0, y0)

k1 = (0.1)[x02+y02]

k1 = (0.1)[(1)2+(1.5)2]

k1 = 0.325
k2 = h f (x0 + ℎ , y0+𝑘1)
2 2

= (0.1) f (1+0.1 , 1.5 +0.325)


2 2

= (0.1) f (1. 05, 1.6625)

= (0.1) [(1.05)2 + (1.6625) 2 ]

= 0.386640

k3 = h f(x0+ℎ , y0 + 𝑘2 )
2 2

= (0.1) f (1+0.1 , 1.5+0.3866 )


2 2

= (0.1) f ( 1. 051 ,1.69332)

k3 = 0.3969

k4 = h f (0.1+0.1 , 1.5+0.3969)

= (0.1) f (0.2 , 1.8969)

= 0.48082

y1 = y0 +1 [k1+2k2 +2k3+k4]
6

y1 =1.5 + 1[0.325+2(0.3866) + 2(0.3969)+0.4802]


6

y1 = 1.8954
To find y2 :

y2 = y1 + 1[k1+2k2+2k3+k4]
6

Where k1=h f( x1 ,y1)

k1 = (0.1)(x1 2+y12)

k1 = (0.1)( (1.1)2+(1.8954)2)

k1 = 0.4802

k2 = h f(x1 +ℎ ,y1+𝑘1 )
2 2

k2 = (0.1) f(1.1 +0.1 ,1.8954 +0.4802 )


2 2

k2 = (0.1) f (1.15 , 2.1355)

= 0.5882

k3 = h f ( x1+ ℎ
2 ,y1+𝑘2 )
2

k3 = (1.0) f(1.1+0.1 , 1.8954+0.5892 )


2 2

k3 = (0.1)

f(1.15,2.1895) k3

=0.6114

k4 = hf(x1+h ,y1+k3)
k4 = (0.1) f (1.1+0.1 ,1.8954+0.61164)

k4 = (0.1)f(1.2,2.50704)

k4 = 0.7725

y2 = y1 +1[k1+2k2+2k3+k4]
6

y2 = (1.8954)+1[0.4802+2(0.5882)+2(0.61162)+0.7725]
6

y2 = 1.8954+0.6087

y2 = 2.50411

(4) Obtain the values of Y at x=0.1,using R.K.

methodi)first order ii)second order iii)third order

iv)fourth order for the differential equation y1 +y =0,

y(0)=1.

i)First order:

𝑑𝑦
= −𝑦 and x0=0,y0=1,h=1
𝑑𝑥

y1= y0+hf(x0,y0)

y1= 1+(0.1)(-1)

= 1-0.1
= 0.9
x1= x0+h

= 0+0.1

= 0.1

Y2= y1+hf(x1,y1)

= 0.9+(0.1)f(0.1,0.9)

= 0.9+(0.1)(-0.9)

= 0.81

ii)Second order

y1= y0+1(k1+k2)
2

where k1= hf(x0,y0)

k1= (0.1)(-1)

= -0.1

y1= y0+1(k1+k2)
2

where k1= hf(x0,y0)

k1= (0.1)(-1)

= -0.1
k2= hf(x0+h, y0+k1)

= (0.1)f(0+0.1, 1+(-0.1))

= (0.1)f(0.1, 0.9)

= (0.1, -0.9)

= -0.09

= -0.09

y1 = y0+1(k1+k2)
2

= 1+1(-0.1-0.09)
2

= 0.905

y2= y1+1(k1+k2)
2

k1= hf(x1,y1)

= (0.1)(-0.905)

= -0.0905

k2= hf(x1+h, y1+k1)

= 0.1f(0.1+0.1, 0.905-0.0905)

= (0.1)f(0.2, 0.8145)
= -0.08145

y2= y1+1(k1+k2)
2

=0.905+1(-0.0905-0.08145)
2

=0.8190

iii)Third Order:

y1=y0+1(k1+4k2+k3)
6

k1=hf(x0,y0)

=(0.1)f(0,1)

=-0.1

k2=hf(x0+ℎ,y0+𝑘1)
2 2

=(0.1)f(0+0.1,1+−0.1)
2 2

=(0.1)f?(0.05,0.95)

=-0.095

k3=hf(x0+h,y0+2k2-k1)

=(0.1)f(0+0.1,1+2(-0.095)+0.1)

=(0.1)f(0.1,0.91)
=-0.091

y1=y0+1(k1+4k2+k3)
6

=1+1[-0.1+4(-0.095) =1-0.0951
6

=0.9048

To find y2:

y2=y1+1[k1+4k2+k3]
6

k1=hf(x1,y1)

=(0.1)f(0.1,0.9048)

=(0.1)(-0.9048)

=-0.0904

k2=hf(x1+ℎ,y1+𝑘1)
2 2

=(0.1)f(0.1+0.1,0.9048-0.0904)
2 2

=(0.1)f(0.15,0.8596)

=(0.1)(-0.8596)

=-0.0859

k3 =hf(x1+h,y1+2k2-k1)
=(0.1)f(0.1+0.1,0.9048+2(-0.0859)+0.0904)

=(0.1)f(0.2,0.8234)

=-0.0823

y2=y1+1[k1+4k2+k3]
6

=0.9048+1[-0.0904+4(-0.0859)-0.0823]
6

=0.81875

f(x2)=y(0.2)

iv)Fourth order:

To find y1:

y1=y0+1[k1+2k2+2k3+k4]
6

k1=hf(x0,y0)

=(0.1)f(0,1)

=-0.1

k2=hf(x0+ℎ,y0+𝑘1)
2 2

=(0.1)f(0+0.1,1-0.1)
2 2

=(0.1)f(0.05,0.95)
=-0.095

k3=hf(x0+ℎ,y0+𝑘2)
2 2

=(0.1)f(0+0.1,1-0.095)
2 2

=(0.1)f(0.05,0.9525)

=-0.0952

k4=hf(x0+h,y0+k3)

=(0.1)f(0+0.1,1-0.0952)

=(0.1)f(0.1,0.9048)

=-0.0904

y1=y0+1[k1+2k2+2k3+k4)
6

=1+1[-0.1+2(-0.095)+2(-0.0952)-0.0904]
6

=0.9048

f(x)1=y(0.1)

To find y2:

y2=y1+1[k1+2k2+2k3+k4]
6

k1=hf(x1,y1)
=(0.1)f(0.1,0.9048)

=-0.0904

k2=hf(x1+ℎ,y1+𝑘1)
2 2

=(0.1)f(0.1+0.1,0.9048-0.0904)
2 2

=(0.1)f(0.8596)

=-0.0859

k3=hf(x1+ℎ,y1+𝑘2)
2 2

=(0.1)f(0.1+0.1,0.9048-0.0859)
2 2

=(0.1)f(0.15,0.8618)

=-0.0861

k4=hf(x1+h,y1+k3)

=(0.1)f(0.1+0.1,0.9048-0.0861)

=(0.1)f(0.2,0.8187)

=-0.0818

y2=y1+1[k1+2k2+2k3+k4]
6

=0.9048+1[-0.0904+2(-0.0859)+2(-0.0861)-0.0818] = 0.8147
6

46
CHAPTER-3

INCLUSION OF GLUCOSE INTO THE


BLOOD STREAM USING RUNGE-KUTTA
METHOD
INCLUSION OF GLUCOSE INTO THE BLOOD
STREAM USING RUNGE-KUTTTA METHOD

Glucose:

Glucose was first isolated from raisins in 1747 by the German chemist “Andreas

Marggraf”. Glucose was discovered in grapes by “JohannTobiasLowitz” in

1792 and recognized as different from cane sugar(sucrose). “Emil Fisher”, a

German chemist who received the Nobel prize in chemistry for his findings. The

name “glucose” comes from the French and Greek words for “sweet” in

reference to must, which is the sweet press of grapes when they are used to

make wine. The – ose ending in glucose indicates the molecules is a

carbohydrate.

Glucose can be obtained by hydrolysis of carbohydrates such as milk

sugar(lactose), cane sugar(sucrose),maltose, cellulose, glycogen, etc. unbounded

glucose is one of the main ingredients of honey. All forms of glucose are

colorless and easily soluble in water and other solvents

Glucose is also called as dextrose is a simple sugar with the molecular formula

C6H12O6. Glucose is the most abundant monosaccharide, a subcategory of

carbohydrates. In energy metabolism, glucose is the most important source of

energy in all organisms. Because glucose has 6 carbon atoms, it is classified as a

hexose. Specifically, it is an example of an aldo hexose. It may be found in


either cyclic form or linear form
Other names of glucose are :

 D-Glucose

 Dextrose

 Grape sugar
Glucose may be found in either linear form (or) cyclic form. The hydrogen

and OH groups are able to rotate around the carbon atoms in glucose,

leading to isomerization. Pure glucose is a white (or) crystalline powder with

a molar mass of 180.16 grams per mole and a density of 1.54 grams per

cubic centimeter.

In the human body glucose supplies about 3.75 kilocalories of energy per

gram. It is metabolized into Carbon dioxide and water, producing energy in

chemical form as ATP. Glucose is particularly important because it supplies

nearly all the energy for the human brain.

The Melting point of glucose depends on whether it is in the alpha (or)

beta conformation. The melting point of alpha D -Glucose is 146 degree


centigrade and the melting point of beta D- Glucose is 150 degree

centigrade. Below are the structures of alpha D-Glucose and beta D-Glucose

Uses of Glucose:

Glucoses is a ubiquitous fuel in biology. It is used as an energy source in

organisms, from bacteria to humans, through either aerobic respiration,

anaerobic respiration (or) fermentation. Glucose is the human body’s key source

of energy, through aerobic respiration, providing about 3.75 kilo calories of

food energy per gram. The insulin reaction, and other mechanism, regulate the

concentration of glucose in blood. The glucose in the blood is called blood

sugar. Blood sugar levels are regulated by glucose binding nerve cells in the

hypothalamus

Some glucose is converted to lactic acid by astrocytes, which is then

utilized as an energy source by brain cells; some glucose is used by intestinal

Cells and RBC, while the rest reaches the liver, adipose tissue and muscle cells,

where it absorbed and stored as glycogen(under the influence of insulin)Glucose


is used to treat very low blood sugar, most often in people with diabetes

mellitus. Glucose is given by injection to treat insulin. Glucose is also used to

provide carbohydrates calories to a person who cannot eat because of illness,

trauma (or) other medical condition. Glucose is also used to treat hyperkalemia

(high level of potassium in your glucose

Inclusion of glucose into the blood stream using

Runge-Kutta method:

Inclusion of glucose into the blood stream is an important medical technique.

The amount of Glucose in the blood stream of a patient at time t is denoted by

G(t). Suppose Glucose is infused at constant rate of K mill moles/liter in a

minute. At the same time, the Glucose is converted and removed from the

blood stream at a rate proportional to the amount of Glucose present. The

function G(t) satisfied the equation , 𝑑𝐺=k-a(G)


𝑑𝑡
Where ‘a’ is a positive constant. Given that initially, at t=0 the amount of

Glucose present is 3.5 mill moles/liter,solve the equation using the Runge-kutta

fourth order method. Compare the solution with the exact solution. We shall

first obtain the numerical solution using the Runge-kutta fourth order method.

The given equation is

𝑑𝐺
=0.5-(0.11)G...............(1)
𝑑𝑡
With G=3.5 when t=0. In equation (1) we have choosen the constant of

proportionality ‘a’ as 0.11 on empirical basis and the same value will be used

later to obtain the exact solution by analytical method. Here t0=0,G0=3.5 and let

h=1 minute. Let right hand side of (1) denoted f(t,G) then we get

The Runge-kutta fourth order, with ‘t’ and ‘G’ in place of ‘x’ and ‘y’ becomes

Gn+1=Gn+1(k1+2k2+2k3+k4)...........(2)
6

Where with n=0, we have

K1=hf(t0,G0)

=(1)[0.5-(0.11)(3.5)]

=0.115

K2=hf(t0+ℎ,G0+𝑘1)
2 2

=(1)[0.5-(0.11)(3.5575)]

=0.108675

K3=hf(t0+ℎ,G0+𝑘2)
2 2

=(1)[0.5-(0.11)(3.5543375)]

=0.1090228

K4=hf(to+h,Go+k3)
=(1)[0.5-0.11(3.6090228)]

=0.1030074

Substitute these values in equation(2)

We get,

G1=G0+1(k1+2k2+2k3+k4)
6

=3.5+1[0.115+2(0.108675)+2(0.1090228)+0.1030074]
6

=3.5+1[0.653403
6

=3.6089005

Similarly, we can evaluate G for further values of ‘t’. The values of Gn are

tabulated at the end of the exam.

Analytical method:

The given differential equation 1 is a linear first order equation and can

be written in the form

𝑑𝐺
𝑑𝑡 + (0.11)G =0.5

The integrating factor is 𝑒∫(0.11)𝑑𝑡 =𝑒(0.11)𝑡 so that the general solution of [1] is
(0.11)

𝑒(0.11)𝑡 𝑒
(0.11)𝑡]dt
G[ (0.11) ]=∫(0.5)[ (0.11)
(or)

𝐺𝑒(0.11)𝑡 (0.5) 𝑒(0.11)𝑡


(0.11) = 0.11 (0.11)

(or)

(0.5)
G𝑒(0.11)𝑡= 0.11 𝑒(0.11)𝑡+c

G = 4.54+c𝑒−(0.11)𝑡

G = 4.54+c𝑒−(0.11)𝑡 →(3)

Initially t=20 ,G=3.5 so that from (3) we get

3.5 = 4.54 +c or c = -1.045

Substituting the values of c in equation (3) the exact solution of the initial value

in the problem is

G(t) = 4.54 –(1.045)𝑒−(0.11)𝑡 → (4)

As t→ ∞ ,the glucose content approaches a constant 4.54 we compare the

numerical solution(from the R.K method) with exact solutions (u) in the table

The value of G are given correct the six decimal places


T G G

R k fourth order method Exact solutions

0 3.5 3.5

1 3.608901 3.608901

2 3.706458 3.706458

⁰ 3.793852 3.793852

4 3.872143 3.872143

: : :

: : :

10 4.197453 4.197453

: : :

: : :

20 4.429615 4.429615

: : :

: : :

30 4.506895 4.506895
We observe that in the above table that the solution given by the Rk fourth order

method coincides with the exact solution even up to the 6th decimal places in

the case of the given problem .The variation of the glucose content in the blood

stream is shown.

G(t)
5
4.5
4
3.5
3
2.5
2
1.5 G(t)
1
0.5
0

05101520253035
REFERENCES:

Ordinary and Partial Differential equations- Nita H. Shah

Advanced Numerical analysis for Runge-Kutta method – J. C. Butcher

Structure and uses of Glucose – M. Lakshmikanth.

Differential equations of first order and first degree- S.chand

Advanced Numerical analysis methods- J. Sakthiwel

www.google.com

You might also like