You are on page 1of 46

CO-1: Differential Equations

Significance of the Differential Equations

Introduction
Ordinary differential equations involve functions, which have only one independent variable.
Thus they contain only ordinary derivatives.
general linear first-order differential equation can be written as follows.

dy
+f ( x ) y=g( x )
dx
This equation has the following solution, where the constant, C, is determined from the initial
condition.

y=e
−∫ f ( x)dx
[ C+∫ ( g( x)e
∫ f (x)dx )
dx ]
First order differential equations are often used to model rate processes. For example,
radioactive decay where the content of radioactive nuclei is denoted by the symbol, n, is modeled
by the following first-order differential equation.

1
dn
=−kn
dt .
The above equation is an example of a separable differential equation. This is a differential
equation that can be separated into two sides, each of which is a function of one variable only.

Many physical laws and relations can be expressed mathematically in the form of differential
equations. Indeed, many engineering problems appear as differential equations.

A current I in the circuit causes a voltage drop RI across the resistor (Ohm’s law) and a voltage
drop across the conductor, and the sum of these two voltage drops equals the EMF.

Session-1: Modeling of L-R circuits and analytical solution


Problems to be discussed by the instructor

1. A series circuit contains a resistor and an inductor. Determine a differential equation for
the current i(t) if the resistance is R, the inductance is L, and the impressed voltage is E(t).
Sol: Here applying Kirchhoff’s voltage law, we have
dI
VL  VR  E  t   L  RI  E  t 
dt , which is the differential equation

1
2. A 12-volt battery is connected to a series circuit in which the inductance is 2H and the
I  t
resistance is 10Ω. Determine the current if the initial current is zero.
Sol: Here
E  t   12 V , R  10, L  0.5 H
dI
VL  VR  E  t   L  RI  E  t  , which is linear
dt
dI
 0.5  10 I  12, I  0   0
dt
G.S I  t   1.2  1  e 20 t 
MATLAB CODE: >> syms t I
>> dsolve('0.5*DI+10*I-12','I(0)=0',t)
ans = 6/5 - (6*exp(-20*t))/5

2
Tutorial problems

3. In a circuit with no capacitor, the inductance is 4H, resistance is 20Ω, and


E=20sin5t.Given that i=0 when t=0 , determine the relationship between i and t.

4. Model the RL-circuit and solve the resulting ODE for the current I  t  A (amperes), where
t is time. Assume that the circuit contains as an EMF E  t  (electromotive force) a battery
of E  48 V (volts), which is constant, a resistor of R  11 (ohms), and an inductor of
L  0.1 H (henrys), and that the current is initially zero.

Assignment problems
5. A 30-volt electromotive force is applied to an LR-series circuit in which the inductance is
0.1 henry and the resistance is 50 ohms. Find the current i(t) if i(0)= 0. Determine the
current as t  
6. In a circuit with no capacitor, the inductance is 4H, resistance is 20Ω, and
E=20scos5t.Given that i=0 when t=0 , determine the current I at any time t.

Session bank

7. A resistance of 100 ohms, an inductance of 0.5 Henry is connected in series with a


battery of 20 volts. Find the current in a circuit as a function of t.

8. An e.m.f. is connected in series with resistance R an inductance L, where


L=640,R=250,E=500. i)Form the differential equation for the circuit. ii)show that current
will approaches 2 amps as t increases. iii)Find in how many seconds i will approach 90%
of its maximum value.

9. A circuit containing resistance of 20 ohms and all inductance 10 henries is connected to


100 volts supply. Determine current after 2 seconds.

10. The equation of L-R series circuit is given by L didt +Ri=4 sin3t if i=0 at t=0 then
express i as function of t.

11. A constant emf E volts is applied to an electrical circuit containing resistance R and
inductance L in series. If the initial current is zero show that the time for current to build
up to half of its maximum is Llog2/Rsec .

Session 2 : Modeling R-C circuits and analytical solution


Problems to be discussed by the instructor

1. A series circuit contains a resistor and a capacitor. Determine a differential equation for
the charge q(t) on the capacitor if the resistance is R, the capacitance is C, and the
impressed voltage is E(t).
Sol: Here applying Kirchhoff’s voltage law, we have

3
dq 1
VR  VC  E  t   R  q  E t
dt C , which is the differential equation

2. An RC circuit has an emf given (in volts) by 400 cos 2t, a resistance of 100 ohms and a
capacitance of 10-2 farads. Initially there is no charge on the capacitor. Evaluate the
current in the circuit at any time.
Tutorial problems

3. An RC circuit has an emf given (in volts) by 100 cos t, a resistance of 10 ohms and a
capacitance of 10-1 farads. Evaluate the current in the circuit at any time.
4. The equation of e.m.f in terms of current I for an electrical circuit having resistance R
and condenser of capacity C in a series is given by E=E sint

Assignment problems

5. An RC circuit has an emf given (in volts) by cos t, a resistance of 100 ohms and a
capacitance of 10-1 farads. Initially there is no charge on the capacitor. Evaluate the
current in the circuit at any time.
6. An RC circuit has an emf given (in volts) by cos 3 t, a resistance of 50 ohms and a
capacitance of 10-2 farads. Initially there is no charge on the capacitor. Evaluate the
current in the circuit at any time.
Session bank

7. The equation of the electromotive force in terms of current i for an electrical circuit
having resistance R , and a condenser of capacity C in series is : E=Ri+∫ iCdt.Find the
current i, when E=Em sinωt .

8. A condenser of capacity c is charged through a resistance R by steady voltage V, show


that the charge q on the plate is given by : R dq/ dt +q/c =v hence show that if q=0 at
t=0 , q=cv[1-e-t/Rc]

9. A series RC circuit with R = 5 W and C = 0.02 F is connected with a battery of E = 100


V. At t = 0, the voltage across the capacitor is zero.

(a) Obtain the subsequent voltage across the capacitor.

(b) As t → ∞, find the charge in the capacitor.


4
10. Find the charge and the current for t > 0 in a series RC circuit where R = 10 W, C = 4 ×
10-3 F and E = 85 cos 150t V.

Session 3 : Modeling of Exponential growth / decay and analytical solution

Problems to be discussed by the instructor

Introduction to Exponential Decay and Growth


.
Experiments show that at each instant a radioactive substance decomposes—and is thus
decaying in time—proportional to the amount of substance present.

Exponential growth occurs when the growth rate of the value of a mathematical function is
proportional to the function's current value.

1. If the growth rate of the number of bacteria at any time t is proportional to the number
present at t and doubles in 1 week, how many bacteria can be expected after 2 weeks?
After 4 weeks?
According to natural growth, we have
N  Ae kt  t  0, N  N 0  A  N 0
when t  1 , N  2 N 0  2 N 0  N 0 e k  k  log 2
when t  2 , N  ?  N  N 0 elog 2 2  4 N 0

Sol: when t  4 , N  ?  N  N 0 elog 2 4  16 N 0

2. A culture initially has P0 number of bacteria. At t = 1 h the number of bacteria is


3
P0 P t
measured to be 2 If the rate of growth is proportional to the number of bacteria
present at time t, determine the time necessary for the number of bacteria to triple.
3. A radioactive material has an initial mass 300mg, which two years later is 100mg. Find
the expression for the amount of the isotope remaining at any time. What is its half-life?

4. Let population of country be decreasing at the rate proportional to its population. If the

population has decreased to 15% in 10 years, how long will it take to be half?

5.
6.

Tutorial problems
7. If a wet sheet in a dryer loses its moisture at a rate proportional to its moisture content,
and if it loses half of its moisture during the first 10 min of drying, when will it be

5
practically dry, say, when will it have lost 99% of its moisture? First guess, then
calculate.
8. The population of a community is known to increase at a rate proportional to the number
of people present at a time t. If the population has doubled in 4 years, how long it will
take to triple?

Assignment problems

9. The efficiency of the engines of subsonic airplanes depends on air pressure and is usually
maximum near 35000 ft. Find the air pressure y  x  at this height. Physical information.
The rate of change y  x  is proportional to the pressure. At 18000ft it is half its value

y  0   y0
at sea level.
10. The concentration of the potassium in a kidney is 0.0025mg/cm3 The kidney is placed in
a vat in which the potassium concentration is 0.0040mg/cm 3 .In 2hours, the potassium
concentration in the kidney is found to be 0.0030mg/cm 3. What would be the
concentration of potassium in the kidney 4 hours after it was placed in the vat? How long
that its take for the concentration to reach 0.0035/cm 3? Assume that the vat is sufficiently
large and that the vat concentration a=0.0040mg/cm3 remains constant.
Session bank

11. The population of a community is known to increase at a rate proportional to the number
of people present at a time t. If the population has doubled in 6 years, how long it will
take to triple?

12. Let population of country be decreasing at the rate proportional to its population. If the

population has decreased to 25% in 10 years, how long will it take to be half?

13. A radioactive isotope has an initial mass 200mg, which two years later is 50mg. Find the

expression for the amount of the isotope remaining at any time. What is its half-life?

14. The number of bacteria in a liquid culture is observed to grow at a rate proportional to the

number of cells present. At the begining of the experiment there are 10,000 cells and after

three hours there are 500,000. How many will there be after one day of growth if this

unlimited growth continues? What is the doubling time of the bacteria?

Session – 4 : Modeling of moving body by Newton’s second law of motion and analytical
solution

6
Introduction
Newton's second law of motion can be formally stated as follows: The acceleration of an object
as produced by a net force is directly proportional to the magnitude of the net force, in the same
direction as the net force, and inversely proportional to the mass of the object.

Problems to be discussed by the instructor

1. Determine a differential equation for the velocity v(t) of a falling body of mass m if air resistance
is proportional to the square of the instantaneous velocity.
2. An object of mass m is dropped from a hovering helicopter. The air resistance is proportional to
the velocity of the object. Find the velocity of the object as a function of time t.

Sol:The velocity ' v ' satisfies the equation

dv k
 vg
dt m
, where ‘g’ is the gravitational constant and k is the constant of
proportionality.

Letting b  k / m.
dv 1
dv   g  bv  dt     dt  log  g  bv   t  C1
g  bv b
 log  g  bv   bt  bC1  g  bv  Ce  bt
Because the objectwas dropped, v  0 when t  0;
thus g  C.
g  ge bt mg
v 
b

k
 1  e  kt / m 
MATLAB:

>> dsolve('Dy+(k/m)*y-g','y(0)=0','t')

ans = (g*m - g*m*exp(-(k*t)/m))/k

Tutorial problems

3. In dropping a stone or an iron ball, air resistance is practically negligible. Experiments show that
the acceleration of the motion is constant (equal to g=9.80 m/sec 2=32 ft/sec2 called the
y t
acceleration of gravity). Model this as an ODE for , the distance fallen as a function of time

t. If the motion starts at time t  0 from rest (i.e., with velocity v  y  0) show that you obtain
1 2
y gt
the familiar law of free fall 2
4. A particle of mass `m ’ moves under gravity in a medium whose resistance is k times its velocity,
where k is a constant. If the particle is projected vertically upwards with a velocity v, show that
m kv
the time to reach the highest point is
k (
log 1+
mg
. )
Assignment problems

7
5. A moving body is opposed by a force per unit mass of value cx and resistance per unit mass of
value bv2, where x and v are the displacement and velocity of the particle at that instant. Find the
velocity of the particle in terms of x.

6. A steel ball weighing 2 lb is dropped from a height of 3000 ft with no velocity as it falls, the ball
v
encounters air resistance numerically equal to 8 (in pounds),where v denotes the velocity of the
ball (in feet per second). Find the limiting velocity for the ball.

Session bank

7. A 50 kg mass is shot from a cannon straight up with an initial velocity of 10m/s off a
bridge that is 100 meters above the ground.  If air resistance is given by 5v determine the
velocity of the mass.

8. set up the IVP that will give the velocity of a 60 kg sky diver that jumps out of a plane with no initial velocity

and an air resistance of .  For this example assume that the positive
direction is downward.

9. Suppose that a sky diver falls from rest towards earth and the parachute opens at an
instant, call at t=0, when the sky diver’s speed is v(0)=10m/sec. Find the velocity sky
diver at any time.

Session – 5 : Modeling of Newton’s law of cooling and analytical solution

Introduction
Newton's Law of Cooling states that the rate of change of the temperature of an object is
proportional to the difference between its own temperature and the ambient temperature
(i.e. the temperature of its surroundings).

Problems to be discussed by the instructor

1. A thermometer, reading 50C, is brought in a room whose temperature is 22 0C. One minute
later the thermometer reading is 120C.How long does it take until the reading is practically
220C, say 21.90C?
Sol:
According to Newton's law f cooling, we have
   0  Ae  kt  t  0,   50 C and  0  220 C  A  17
10
when t  1 ,   120 C  k  log
17
when   22 C , t  ?
0
 t  9.7 min .

8
2. If the temperature of a cake is 3000F when it leaves the oven and is 200 0F ten minutes
later, when will it be practically equal to the room temperature of 60 0F say, when will it
be 610F ?
Sol:
According to Newton's law f cooling, we have
  0  Ae  kt  t  0,   3000 F and  0  600 F  A  240
1 24
when t  10 ,   2000 F  k  log
10 14
when   61 F , t  ?
0
 t  1hr 43min .

Tutorial problems

3. A hard-boiled egg at 98°C is put in a pan under running 18°C water to cool. After 5
minutes, the egg’s temperature is found to be 38°C. How much longer will it take the egg
to reach 20°C?
4. The body of a murder victim was discovered at 8.00pm. The doctor took the temperature
of the body at 8.30pm. which was 94.6°F. He again took the temperature after one hour
when it was showed 93.4°F, and noticed that the temperature of the room was 70°F.
Estimate the time of death. (Normal temperature of human body 98.6°F).

Assignment problems

5. A metal ball whose temperature is 20oC is placed in boiling water. How long does it take
to heat the bar to practically 100oC, say to 99.9oC, If the temperature of the bar after 1
min of heating is 51.5oC?
6. A body originally at 800C cools down to 600C in 20 minutes, the temperature of the air
being 400C. What will be the temperature of the body after 40 minutes.
Session Bank

7. When a chicken is removed from an oven, its temperature is measured at 3000F. Three

minutes later its temperature is 200o F. How long will it take for the chicken to cool off to

a room temperature of 70oF.

8. A thermometer is taken from a room that is 20_C to the outdoors where the temperature is
5_C. After one minute, the thermometer reads 12_C. Use Newton.s Law of Cooling to
answer the following questions.
a. What will the reading on the thermometer be after one more minute?
b. When will the thermometer read 6_C?

9
9. At midnight, with the temperature inside your house at 70_F and the temperature outside at
20_F, your furnace breaks down. Two hours later, the temperature in your house has fallen to
50_F. Assume that the outside temperature remains constant at 20_F. At what time will the
inside temperature of your house reach 40_F?

10. In a murder investigation, a corpse was found by a detective at exactly 8 P.M. Being alert,
the detective also measured the body temperature and found it to be 70_F. Two hours later,
the detective measured the body temperature again and found it to be 60_F. If the room
temperature is 50_F, and assuming that the body temperature of the person before death was
98:6_F, at what time did the murder occur?

Session – 6 : Modeling of mixture problems and analytical solution

Introduction

Mixing problems occur quite frequently in chemical industry. We explain here how to solve the
basic model involving a single tank. We set up the model by using the Balance law.
y = Inflow rate – out flow rate.

Problems to be discussed by the instructor

1. A tank contains 400 gal of brine in which 100 lb of salt are dissolved. Fresh water runs
into the tank at a rate of 2gal/min. The mixture, kept practically uniform by stirring, runs
out at the same rate. How much salt will there be in the tank at the end of 1 hour?

10
2. Mixing problems occur quite frequently in chemical industry. The tank contains 1000 gal
of water in which initially 100 lb of salt is dissolved. Brine runs in at a rate of 10 gal min,
and each gallon contains 5 lb of dissolved salt. The mixture in the tank is kept uniform by
stirring. Brine runs out at 10 gal min. Find the amount of salt in the tank at any time t.

Tutorial problems

3. A tank contains 300 litres of fluid in which 20 grams of salt are dissolved. Brine
containing 1 gm of salt per litre is then pumped into the tank at a rate of 4 L/min; the well-
mixed solution is pumped out at the same rate. Estimate the amount Q(t) of grams of salt
in the tank at time t.
4. A tank initially contains 50 gallons of fresh water. Brine, containing 2 pounds per gallon
of salt, flows into tank at the rate of 2 gallons per minute and the mixture kept uniform by
stirring , runs at the same rate. Determine the time required for the quantity of salt to
increase from 40 to 80pounds.

Assignment problems

5. A tank contains 100lts of fresh water. Two liters of brine, each containing 1gm of
dissolved salt, run into the tank per minute, and the mixture kept uniform by stirring runs
out at the rate of 1lt per minute. Find the amount of salt present when the tank contains
150lts of brine.
6. A tank contains 1000 gallons of brine in which 500lt of salt are dissolved .Fresh water
runs into the tank at the rate of 10 gallons/minute and the mixture kept uniform by
stirring, runs out at the same rate. How long will it be before only 50lt of salt is left in the
tank.
Session bank

7. A 1000 gallon holding tank that catches runoff from some chemical process initially has
800 gallons of water with 2 ounces of pollution dissolved in it.  Polluted water flows into
the tank at a rate of 3 gal/hr and contains 5 ounces/gal of pollution in it. A well mixed
solution leaves the tank at 3 gal/hr as well.  When the amount of pollution in the holding
tank reaches 500 ounces the inflow of polluted water is cut off and fresh water will enter
the tank at a decreased rate of 2 gal/hr while the outflow is increased to 4 gal/hr. 
Determine the amount of pollution in the tank at any time t.

8. A 200-gallon tank is full of a solution containing 25 pounds of concentrate. Starting at


time distilled water is admitted to the tank at a rate of 10 gallons per minute, and the well-
stirred solution is withdrawn at the same rate.

11
(a) Find the amount of concentrate Q in the solution as a function of t.
(b) Find the time at which the amount of concentrate in the tank reaches 15 pounds.

Session – 7&8 : Solution of First order differential equations by Euler’s Method

Introduction

Euler’s method is a numerical technique to solve ordinary differential equations of the form

dy
 f  x, y  , y  0   y0
dx (1)

So only first order ordinary differential equations can be solved by using Euler’s method.

At x=0 , we are given the value of y= y 0 . Let us call x=0 as x 0 . Now since we
know the slope of y with respect to x , that is, f ( x , y ) , then at x  x 0 , the slope is
f ( x0 , y0 ) x y y x =y
. Both 0 and 0 are known from the initial condition ( 0 ) 0 .

True value

y1, Predicted
( x0 , y 0 ) Φ value

Step size, h

1 method.
Figure 1 Graphical interpretation of the first step of Euler’s
x
So the slope at
x=x 0 as shown in Figure 1 is
Rise
=
Slope Run
y 1− y 0
=
x 1 −x0
=f ( x 0 , y 0 )
From here
y 1 = y 0 + f ( x 0 , y 0 )( x 1 −x 0 )

Calling
x 1−x 0 the step size h , we get

12
y 1= y 0+ f ( x 0 , y 0) h
(2)
One can now use the value of y 1 (an approximate value of y at x=x 1 ) to
calculate y 2 , and that would be the predicted value at x 2 , given by
y 2 = y 1 + f ( x1 , y 1 ) h
x 2=x 1 + h
Based on the above equations, if we now know the value of
y= y
i at x
i , then
y i +1 = y i + f ( x i , y i ) h
(3)
This formula is known as Euler’s method and is illustrated graphically in Figure 2. In
some books, it is also called the Euler-Cauchy method.

Problems to be discussed by the instructor

1. Obtain by Euler’s method the value of y at x=0.1 and x=0.2 to five places of decimals
dy
 xy 1, y(0) 1
from dx .
2. Intensity of radiation is directly proportional to the amount of remaining radioactive
dy
  ky
substance. The differential equation is dt , where k = 0.01, t0 = 0, y0 = 100g.
Determine how much substance will remain at the moment t = 100sec. Find the solution
by applying Euler’s method with h = 25.

Tutorial problems

3. The open loop response, that is the speed ω of the motor at voltage input is 20V,

=1000−3 ω
assuming a system without damping is dt . If the initial speed is zero,
estimate the speed levels of the motor by applying Euler’s method method, at t=0.4 sec
and t=0.8sec.
4. The governing equation for the free-falling bungee jumper with linear drag was given by,
dv c
g d v
dt m . Compute the velocity at 10 seconds of a free-falling parachutist of mass
80kg and drag coefficient 10 kg/s, with initial velocity 20 m/s, using Euler’s method.

Assignment problems

5. The concentration of salt x in a home made soap maker is given as a function of time by
dx /dt =37.5 – 3.5 x , At the initial time t=0, the salt concentration in the tank is 50 g/l.
Using Euler’s method and a step size of h=1.5 minutes. obtain the salt concentration
after 3 minutes.

13
Session Bank

6. Intensity of radiation is directly proportional to the amount of remaining radioactive


dy
  ky
substance. The differential equation is dt , where k = 0.01, t0 = 0, y0 = 100g.
Determine how much substance will remain at the moment t = 100sec. Find the solution
by applying Euler’s method with h = 25.

7. Determine y(0) and y(0.3) if h=0.1 from the initial value problem y  x  y, y (0) 1

Session – 9&10 : Solution of First order equations by Modified Euler’s Method


Introduction

The Euler method can have a serious deficiency in problems where the variables are rapidly
changing because the method assumes the variables are constant over the time interval Δt .
One way of improving the method is to use a better approximation to the right side of the
equation

dy
=f (t , y )
dt
The Euler approximation is
y (t k +1 )= y(t k )+Δt⋅f [ t k , y (t k )]
Suppose instead we use the average of the right side of equation on the interval (t k ,t k +1 ) . This
gives
Δt
y (t k +1 )= y(t k )+ ⋅ f +f
2 ( k k +1 )
where
f k=f (t k , y(t k ))
f k +1 =f (t k +1 , y(t k+1 ))
So, use Euler method to obtain y(t k+1 ) such that predictor-error method can be
implemented.
In summary,
Euler predictor: x k +1= y k +h⋅f (t k , y k )
h
y k +1= y k + ⋅[ f (t k , y k )+ f (t k +1 , x k +1 ) ]
Predictor-error: 2

14
Problems to be discussed by the instructor

1
1 Calculate the value of y at x = 1.2 from y =xy with h =0.6 and y(0) = 2 by using
Modified Euler’s method
2 A polluted lake has an initial concentration of a bacteria 10 parts/m3. While the
acceptable level is only 5×106 parts/m3. The concentration of bacteria will reduce as fresh
water enters the lake. The differential equation that governs the concentration of the
dc
+0 . 06 c= 0 , c (0 ) = 10 .
pollutant as a function of time (in weeks) is given by dt Using
the modified Euler method a step size of 3.5 weeks, find the concentration of pollutant
after 7weeks.

Tutorial problems

3. A tank contains 400 gal of brine in which 100 lb of salt are dissolved. Fresh water runs
into the tank at a rate of 2gal/min. The mixture, kept practically uniform by stirring, runs
out at the same rate. How much salt will there be in the tank at the end of 1 hour? Apply
modified Euler method to determine salt content at the end of 1 hour.

4. Obtain by modified Euler’s method the value of y at x=0.1 and x=0.2 to five places of
dy 2
 x y  1, y (0) 1
decimals from dx .
Assignment problems

5. Intensity of radiation is directly proportional to the amount of remaining radioactive


dy
 ky
substance. The differential equation is dt , where k = 0.01, t0 = 0, y0 = 100g.
Determine how much substance will remain at the moment t = 100sec. Find the solution by
applying Modified Euler’s method with h = 25.
Session bank

6. The concentration of salt x in a home made soap maker is given as a function of time by
dx /dt =37.5 – 3.5 x , At the initial time t=0, the salt concentration in the tank is 50 g/l.
Using Modified Euler’s method and a step size of h=1.5 minutes. obtain the salt
concentration after 3 minutes.

dy
 y  2 x, y (0) 1
7. Determine the solution of the initial value problem dx at x=0.2 if h=0.2
using modified Euler’s method.

Session – 11&12 : Solution of First order differential equations by Runge-Kutta Method

15
Introduction

The Runge-Kutta algorithm lets us solve a differential equation numerically (ie. approximately)
without require the calculation of partial derivatives. Consider the single variable problem x' = f
(t, x) with initial condition x(0) = x0.  Suppose that xn is the value of the variable at time tn. 

The Runge-Kutta formula takes xn and tn and calculates an approximation for xn+1 at a brief time
later, tn+h.  It uses a weighted average of approximated values of f (t, x) at several times within
the interval (tn, tn+h).  The formula is given by

xn+1 = xn + h⁄6 (k1 + 2k2 + 2k3 + k4)

where k1 = f (tn, xn)


k2 = f (tn + h⁄2, xn + h⁄2 k1)
k3 = f (tn + h⁄2, xn + h⁄2 k2)
k4 = f (tn + h, xn + h k3)
To run the simulation, we simply start with x0 and find x1 using the formula above.  Then we plug
in x1 to find x2 and so on.

The Runge-Kutta algorithm is known to be very accurate and well-behaved for a wide range of
problems.

Problems to be discussed by the instructor

dy y
1. Applying R-K method of fourth order to find y (0.2) y(0.1) given that =3 x+ ,
dx 2
y (0)=1, taking h=0.1.
2. A cup of a coffee originally has temperature of 68oC. The temperature of the ambient is
21oC and the thermal constant is 0.017oC/min. Determine the temperature of the coffee
from t = 0 to 10 minutes insteps of 5 minutes, applying 4thorder Runge-Kutta method.

Tutorial problems

3. A hard-boiled egg at 98°C is put in a pan under running 18°C water to cool. After 5
minutes, the egg’s temperature is found to be 38°C. Estimate the egg’s temperature after
10 minutes applying R-K method.
dy y
4. Applying R-K method of fourth order to find y (0.2) y(0.1) given that =3 x+ ,
dx 2
y (0)=1, taking h=0.1.

Assignment problems

16
dy
  xy , y (0)  2 dy =−xy 2 , y ( 0 )=2
5. If dx dx , then compute y(0.2) in steps of 0.1 using
Euler’s method.
6. The governing equation for the free-falling bungee jumper with linear drag was given by,
dv c
g d v
dt m . Compute the velocity at 10 seconds of a free-falling parachutist of mass
80kg and drag coefficient 10 kg/s, with initial velocity 20 m/s, using R-K method.
Session bank

7. A cup of a coffee originally has temperature of 68oC. The temperature of the ambient is
21oC and the thermal constant is 0.017oC/min. Determine the temperature of the coffee
from t = 0 to 10 minutes insteps of 5 minutes, applying 4thorder Runge-Kutta method.

dy
 x  y , y (0)  0
8. Obtain the solution of the IVP dx at x= 1 with h=0.5

CO -2

Section – 13 : Modeling Free oscillations of a spring and solution


Introduction

Linear ODEs with constant coefficients have important applications in mechanics. We take an
ordinary coil spring that resists extension as well as compression. We suspend it vertically from a
fixed support and attach a body at its lower end, for instance, an iron ball, as shown in Fig. 33.
We let denote the position of the ball when the system is at rest (Fig. 33b). Furthermore, we
choose the downward direction as positive, thus regarding downward forces as positive and
upward forces as negative.

We now let the ball move, as follows. We pull it down by an amount (Fig. 33c).
This causes a spring force F1=-ky
proportional to the stretch y, with called the spring constant. The minus sign indicates that
points upward, against the displacement. It is a restoring force: It wants to restore the system,
17
that is, to pull it back to y _ 0. Stiff springs have large k. The motion of our mass–spring system
is determined by Newton’s second law, Force = Mass x Acceleration

Problems to be discussed by the instructor

1. If a mass–spring system with an iron ball of weight W=22 lb can be regarded as


undamped, and the spring is such that the ball stretches it 1.09 m (about 43 in.), how
many cycles per minute will the system execute? What will its motion be if we pull
the ball down from rest by 16 cm (about 6 in.) and let it start with zero initial
velocity?

2. If a weight of 4.5 lb stretches a certain spring by 2 cm, obtain the frequency and
period of the corresponding harmonic oscillation.
Sol: Here
w 4.5
w  4.5lb  w  ke  k   kg / m 2
e 2
1 k 1 2.25
Frequency   ?
2 m 2 4.5 / 2

Practice problems

3. A mass weighing 24 pounds, attached to the end of a spring, stretches it 4 inches.


Initially, the mass is released from rest from a point 3 inches above the equilibrium
position. Find the equation of motion.
4. A mass weighing 20 pounds, attached to the end of a spring, stretches it 2 inches.
Initially, the mass is released from rest from a point 2 inches above the equilibrium
position. Find the equation of motion.

Assignment problems

5 A mass weighing 8 pounds is attached to a 5-foot-long spring. At equilibrium the spring


measures 8.2 feet. If the mass is initially released from rest at a point 2 feet above the
equilibrium position, find the displacements x(t).

18
6 A mass weighing 10 pounds is attached to a 2-foot-long spring. At equilibrium the spring
measures 8.2 feet. If the mass is initially released from rest at a point 3 feet above the
equilibrium position, find the displacements x(t).

Session bank

7 An 8 lb weight is placed at one end of a spring suspended from the ceiling. The weight is
raised to 5 inches above the equilibrium position and left free . Assuming the spring
constant 12lb/ft, find the equation of motion , displacement function x(t).

8 An 8lb weight is placed at the lower end of a coil spring suspended from the ceiling. The
weight comes to rest in its equilibrium position , thereby stretching the spring 6 inches.
The weight is then pulled down 3 inches below its equilibrium position and released at
t=0 with an initial velocity of 1ft/sec directed downward. Find the displacement at any
time t.

Session – 14 : Modeling Free oscillations of a spring with damping and solution


Introduction

In real oscillatory motion, energy is dissipated because of some type of frictional force. A mass
on a spring left alone will eventually stop oscillating. When the mechanical energy of motion
decreases with time, the motion is said to be damped. Damped motion still remains periodic if
the damping forces are small.

Consider a damped mass-spring system as shown in the figure. The oscillation of the mass is
damped because of air resistance.The governing ODE of the phenomena is
d 2x r dx k
  x 0
2 m dt m
dt .

Here m = mass of the weight, k= spring constant

Problems to be discussed by the instructor

1 A mass weighing 16 pounds is attached to a 5-foot-long spring. At equilibrium the spring


measures 8.2 feet. If the mass is initially released from rest at a point 2 feet above the
equilibrium position, find the displacements x(t) if it is further known that the
surrounding medium offers a resistance numerically equal to the instantaneous velocity.

2 A mass weighing 8 pounds stretches a spring 2 feet. Assuming that a damping force
numerically equal to 2 times the instantaneous velocity acts on the system, determine the
equation of motion if the mass is initially released from the equilibrium position with an
upward velocity of 3 ft/s.

19
Tutorial problems

3 A mass weighing 16 pounds is attached to a 5-foot-long spring. At equilibrium the spring


measures 8.2 feet. If the mass is initially released from rest at a point 2 feet above the
equilibrium position, find the displacements x(t) if it is further known that the
surrounding medium offers a resistance numerically equal to the instantaneous velocity.

4 A mass weighing 24 pounds is attached to a 6-foot-long spring. At equilibrium the spring


measures 9.2 feet. If the mass is initially released from rest at a point 3 feet above the
equilibrium position, find the displacements x(t) if it is further known that the
surrounding medium offers a resistance numerically equal to the instantaneous velocity.

Assignment problems

5 A mass weighing 6 pounds stretches a spring 1 feet. Assuming that a damping force
numerically equal to the instantaneous velocity acts on the system, determine the
equation of motion if the mass is initially released from the equilibrium position with an
upward velocity of 2 ft/s.

6 A mass weighing 7 pounds stretches a spring 2 feet. Assuming that a damping force
numerically equal to the instantaneous velocity acts on the system, determine the
equation of motion if the mass is initially released from the equilibrium position with an
upward velocity of 5 ft/s
Session bank
7 A 32 lb weight is suspended from a coil spring streathes the spring to 2ft. The weight is
then pulled down 6 inches from the equilibrium position and released at t=0. Find the
motion of the weight if the resistance of the medium is 4v.

8 A weight of 980 gm is attached to a spring with spring constant k=20gm/sec. The


resistance is 1/4 v. Determine the motion of the weight if it pulled down ¼ cm below the
equilibrium position and then released.

Session -15 : Modeling Forced oscillations without damping and solution

Introduction

If F(t) is the external periodic force applied for the free oscillations of the spring which is free
from the damping then the corresponding equation which governs the phenomenon is
d 2x k
 x  F (t )
dt 2 m

20
Problems to be discussed by the instructor

1 When a mass of 2 kg is attached to a spring whose constant is 32 Newton’s/min., it


comes to rest in the equilibrium position. Starting at t = 0, a force f(t) = 68cos 4t is
applied to the system. Solve the equation of motion in the absence of damping.

2 When a mass of 1 kg is attached to a spring whose constant is 32 Newton’s/min., it


comes to rest in the equilibrium position. Starting at t = 0, a force f(t) = cost is applied to
the system. Solve the equation of motion in the absence of damping.

Tutorial problems

3 Find the motion of the mass spring system with mass 0.5 kg, damping 0, spring constant
1.5 kg/sec2 and driving force cos t  4sin t Nt. Assuming zero initial Displacement and
velocity.

4 The motion of a mass on a certain vertical spring is described by


d 2x
 20 x  cos 8t , x  0   0, x  0   3
dt 2 , where x is the distance of the mass from the
equilibrium position, downward being taken as positive direction. Determine the
displacement of the motion,

Assignment problems

5 A 50 N weight is attached to a spring having a spring constant of 5N/m. the weight is


started in motion with no initial velocity by displacing it 3 cm above the equilibrium
F  t   sin 2t
position by simultaneously applying to the weight an external force
Assuming no air resistance, find the expression for motion of the weight.
Session bank

6 If a weight 6 lb hangs from a spring with constant k=12 and no damping force exists, find
the motion of weight when an external force cos 8t acts . Initially x=0 and dx/dt=0.

7 A 64 lb weight is attached to the lower end of a coil spring with spring constant 18 lb/ft.
An external force cos2t is applied to the system. If the weight is pulled down to 6 inches
below its equilibrium position and released from rest at t=0, determine the displacement
at any time.

Section – 16 : Modeling Forced oscillations with damping and solution


Introduction

21
If F(t) is the external periodic force applied for the free oscillations of the spring along with the
damping force then the corresponding equation governing the phenomenon is
d 2x r dx k F (t )
  x
dt 2 m dt m m

Problems to be discussed by the instructor

1 Determine the displacement of the motion, if mass m  1, spring constant k  9, damping


F  t   cos 6t , x  0   3, x  0   0
force c  8, and external force and initial conditions are
.
m  1Kg , c  4kg / sec, k  24 kg / sec 2 , r  t   100 cos t
2 Let Nt. Determine  such that
you get the steady-state vibration of maximum possible amplitude. Determine this
amplitude. Then find the general solution .

Tutorial problems

3 A vertical spring having a constant 24 N/m has 32 N weight suspended from it. An
F  t   sin 5 t , t  0
external force is applied. A damping force given by 2v is assumed
to act. Set up the differential equation.
4 Determine the displacement of the motion, if mass m  1, spring constant k  5 damping
c  2, F  t   cos 2t ,
force and external force and initial conditions are
x  0   2, x  0   0
.
Assignment problems

1 Construct the differential equation with mass m  10 kg , spring constant k  80 N / m and


F  t   2 cos10t
damper constant c  10kg / sec along with external force

2 Determine the displacement of the motion, if mass m  1, spring constant k  9,


F  t   2 cos t ,
damping force c  8, and external force and initial conditions are .
Session bank
3 If weight w=16 lb, spring constant k=10lb/ft, damping force 2 dx/dt, external force is 5
cos2t, find the motion of the weight given x(0)=dx/dt(0)=0, then write the transient and
steady state solutions.

22
4 Determine the transient and steady state solutions of mechanical system with weight
w=6lb, stiffness constant k=12, damping force 1.5 v, external force 24cos8t and initial
conditions x=1/3ft, dx/dt=0 at t=0.

Session – 17 : Modeling of L-C-R circuits without E.M.F and solution

Introduction

An RLC-circuit is obtained from an RL-circuit by adding a capacitor.

Name Symbol Notation Unit Voltage


drop
Ohms R Ohms RI
resister

Inductor L Henry di
L
dt

Capacitor C Farads q
c

Kirchoff’s Voltage law states the sum of voltage drops is equal to the electromotive force (e.m.f)
di q dq
L I
i.e RI + dt + c = E(t), where dt
Problems to be discussed by the instructor

3
1. Given R  2k , L  1H , C  4  10 F and E  0 Volts , Obtain the steady state
current in the RLC-circuit.
R  10, L  1H , C  4 103 F and E  t   0 Volts
2. Given , Obtain the current in
the RLC-circuit, when t  0, i  0, q  0 .

Tutorial problems

I  t 2
3. Find the current in an RLC-circuit R  11 , L  0.1H , C  10 F , which
is connected to a source of EMF  
E t 0
Assume that current and capacitor charge
are zero when t  0.

23
4. Given R  4, L  0.5H , C  0.1F and E  0 V , Obtain the steady state current in
the RLC-circuit.

Assignment problems
5. Given R  4, L  0.5H , C  0.05F and E  0 V , Obtain the current in the RLC-circuit,
when t  0, i  0, q  0
1
I  t C F
6. Find the current in an RLC-circuit R  2 , L  1H , 20 , which is

connected to a source of EMF  


E t 0
Assume that current and capacitor charge are
zero when t  0.

Session – 18 : Modeling of L-C-R circuits with E.M.F and solution

Problems to be discussed by the instructor

R  10, L  1H , C  4  103 F and E  t   E0 sin t Volts


1. Given , Obtain the
current in the RLC-circuit, when t  0, i  0, q  0 .
3
2. Given R  2k , L  1H , C  4 10 F and E  sin15t Volts , Obtain the steady
state current in the RLC-circuit.

Tutorial problems

I  t 2
3. Find the current in an RLC-circuit R  11 , L  0.1H , C  10 F , which
is connected to a source of EMF  
E t  sin 3t
Assume that current and capacitor
charge are zero when t  0.
4. Given R  4, L  0.5H , C  0.1F and E  500sin 2t V , Obtain the steady state
current in the RLC-circuit.
Assignment problems

5. Given R  4, L  0.5 H , C  0.05F and E  110 V , Obtain the current in the
RLC-circuit, when t  0, i  0, q  0

24
1
I  t C F
6. Find the current in an RLC-circuit R  2 , L  1H , 20 , which is

connected to a source of EMF  


E t  15si n 3t
Assume that current and capacitor
charge are zero when t  0.
Session bank

7. A circuit cosists of an inductance of 0.05 henrys , a resistance of 5ohms and a


condenser of capacitance 4x10-4farad. If q=i=0 when t=0 find q(t) and i(t) at any
time t, if there is a constant emf of 110volts.

8. Assuming q=i=0 at t=0, in an RLC circuit having a source of voltage E(t)=155


sin3t, R=100ohms, L= 0.1 H,C=10-3farad. Determine the current at any time.

Session – 19 : Fourier Series and its significance

Introduction

In many physical and engineering problems, particularly those connected with vibrations
and conduction of heat, it is more useful to be able to express a real valued function in series of
sines and co-sines. Most of the single-valued functions which occur in applied mathematics can
be expressed in the form.

a1+a2 Cos x +a2 Cos 2x+……. + b1 Sin x + b2 Sin 2x +……

Let f(x) be represented in the interval (c, c+2π) by the Fourier series.

a0
+ ∑ ( an Cos nx+bn Sin nx )
f(x) = 2 n=1 .
Putting c=- π , the interval becomes - π <x< π ,and
π
1
a0 = ∫ f (x ) dx
π −π
π
1
a n = ∫ f ( x ) Cos nx dx
π −π
π
1
b n = ∫ f ( x ) Sin nx dx
π −π

Problems to be discussed by the instructor


25
1. Determine the Fourier series expansion of periodic wave sin(x) in the interval (-π, π)
2. Find a Fourier series to represent x in (-π, π)

Tutorial problems
3. Obtain Fourier series expansion for f(x) defined as follows
π
f ( x )=x+ , −π < x≤0
2
π
−x , 0≤x≤π
2
Assignment problems
 0    x  0 
f  x  
1. Expand    x  0  x   
in a Fourier series.
2. Find the Fourier series expansion for the standard square wave,
 1  1  x  0 
f  x  
 1  0  x  1
3. Find the Fourier series expansion for the standard square wave,
 1  1  x  0 
f  x  
 1  0  x  1
Session bank
 x, when    x  0
f  x  
4. Determine the Fourier series expansion of 2 x, when 0  x  
  
 x, when  2  x  2
f  x  
0, when   x  3
5. Expand  2 2 as Fourier series

Session – 20&21 : Fourier series expansion of periodic functions


Introduction

If the function f(x) satisfies for all values of x the relation

f (x+T) = f(x), where T is a real number, the function is said to be periodic if T is the
smallest positive number for which such a relation is satisfied then T is called period of
the function.

Problems to be discussed by the instructor

26
1. Deduce the Fourier series expansion of the periodic rectangular wave
f ( x ) = −2 , if −π < x <0
2 , if 0< x < π and f ( x +2 π ) = f ( x )
2. Deduce the Fourier series expansion of the periodic rectangular wave
f (x ) = −K , if −π <x<0
K , if 0<x<π
Tutorial problems
1. Deduce the Fourier series expansion of the periodic rectangular wave
π
f ( x ) = −1 , for − π < x<−
2
π π
0 , for − < x<
2 2
π
1 , for <x<π
2

Assignment problems
1. Deduce the Fourier series expansion of the periodic rectangular wave
f (x ) = −0 , for −2<x<−1
k , for −1<x<1
0 , for 1<x <2
Session bank
 0, when    x  0
f  x   2
2. Expand  x , when 0  x   as Fourier series which is assumed to be of period
2 .

f  x   x in   ,  
3. Obtain the Fourier series of saw toothed wave form

Session - 22 : Fourier series of the periodic signal rectangular wave


Problems to be discussed by the instructor

1 Deduce the Fourier series expansion of the periodic rectangular wave


f ( x ) = −2 , if −π < x <0
2 , if 0< x < π and f ( x +2 π ) = f ( x )

Tutorial problems

2 Determine the Fourier series expansion of a periodic square wave

27
f ( x )   2, for  4  x  2

x, for  2  x  2

2, for 2 x4

Assignment problems

1 . Determine the Fourier series expansion of a periodic square wave

f ( x )   1, for  2  x  1

x, for  1  x  1

2, for 1 x  2

Session – 23 : Fourier series for odd and even functions

(i) A function f(x) is said to be odd, if f(x-)= -f(x).


e.g., Sin x Tan x, x2 all odd functions. Graphically , an odd function is symmetrical about

the origin.

(ii) A function f(x) is said to be even, if f(-x)= f(x).

e.g., Cos x, Sin x2, x2 all even functions. Graphically , an even function is symmetrical

about the y-axis.

∫ f ( x)dx=0, when f ( x) is an odd function,


−c

c
=2 ∫ f ( x )dx , when f ( x) is an even function ,
−c

Expansion of Odd or Even Functions

We know that a periodic function f(x) defined in (−π , π) can be represented by the Fourier
series
a ∞ nπx nπx
f (x )= 0 + ∑ a n cos + bn sin
2 n=1 c c

28
c
1
a0 = ∫ f ( x ) dx
where c −c
c
1 nπx
an = ∫ f ( x ) Cos dx
c −c c
c
1 nπx
bn = ∫ f ( x ) Sin dx
c −c c
Case I. When f(x) is an odd function.
c
1
a0 = ∫ f ( x ) dx =0
c −c
nπx nπx
Cos Cos
Since c is an even function, therefore f(x) c is an odd function.
c
1 nπx
an = ∫ f ( x ) Cos dx
∴ c −c c =0
nπx nπx
Again, Since Sin c is an odd function, therefore f(x) .Sin c is an even function.

c
1 nπx
∫ f ( x)
∴ bn = c −c Sin c dx
c
2
c
∫ f ( x ) Sin nπx
c
dx
= 0
Hence, if a periodic function f(x) is odd, its Fourier expansion contains only Sin e terms and
c
2 nπx
∫ f ( x)
bn = c 0 Sin c dx .

Case II. When f(x) is an even function.


c c
1 2
a0 = ∫ f ( x ) dx = ∫ f ( x ) dx
c −c c0
nπx
Since f(x) Cos c is also an even function
c
1 nπx
an = ∫ f ( x ) Cos dx
∴ c −c c .
c
2 nπx
∫ f ( x ) Cos dx
= c 0 c

29
nπx
Again, Since f(x) Sin c is an odd function
c
1 nπx
∫ f ( x)
∴ bn = c −c Sin c dx =0

Thus if a periodic function f(x) is even, its Fourier expansion contains only cosine terms,
and
c
2
c
∫ f ( x) dx
a0 = 0

c
2 nπx
∫ f ( x)
a0 = c 0 Cos c dx.

Problems to be discussed by the instructor

π
1. Obtain Fourier series expansion for f(x) defined as follows
2. Obtain the Fourier series expansion of saw tooth wave
{
f (x)=¿ x + ,− π<x≤0 ¿ ¿¿¿
2
f (x ) = x +π , if −π <x <π and f (x +2 π ) = f ( x )

Tutorial problems

3. Obtain the Fourier series expansion of saw tooth wave


f ( x)  x, if    x  

Assignment problems

4. Obtain the Fourier series expansion of


f ( x )  x 2 , if    x  

Session bank

3
5. Expand f ( x )  x , if    x   as Fourier series
6. Expand f ( x )  x, if    x   as Fourier series

Session- 24&25 : Half range Fourier cosine and sine series

30
Introduction

In some problems it is desired to expand a function in a Fourier series of a function f(x)


for the interval (0,c) which is half the period of the Fourier series. In addition, we may be forced
by the conditions of the problem to expand a given function in a series of sines alone or a series
of consines only. As it is immaterial whatever the function may be outside the range 0<x<c, we
extent the function to cover the range –c<x<c so that the new function may be odd or even. The
Fourier expansion of such a function of half the period, therefore, consists of Sine or cosine
terms only.

Sine series: If it be required to expand f(x) as series of since in 0<x<c, then we extend the
function reflecting it in the origin, so that
F(-x)=-f(x)
Then extended function is odd in (-c,c) and its expansion will give the Fourier series :

nπx
f (x )= ∑ b n Sin
n=1 c
where
c
2 nπx
bn = ∫ f ( x )Sin dx .
c0 c
Cosine series. If it be required to express f(x) as a cosine series in 0<x<c, we extend the function
reflecting it in the y-axis, so that
f(x) = +f(x)
Then the extended function is even in (-c, c) and its expansion will give fourier cosine series:

a0 nπx
+ ∑ an
f(x) = 2 n=1   Cos   c
where
c
2
c
∫ f ( x) dx
a0 = 0
c
2 nπx
c
∫ f ( x)
and an = 0 Cos c dx.
Problems to be discussed by the instructor
1. Find the Fourier series half-range Cosine series for the function f(x)=x, 0<x< π .
f  x   1  x, 0  x  
2. Obtain the half range Fourier sine series of
Tutorial problems

3. Find the Fourier series half-range Sine series for the function f(x)=x, 0<x< π .
4. Obtain half range cosine series for f(x)=ex in 0<x<1.

Assignment problems
5. Obtain half range sine series for f(x)=1 in 0<x<1.
6. Obtain half range Sine series for f(x)=ex in 0<x<1.
Session bank

31
7. If f(x)=1-x in the interval 0<x< π
8. Represent f ( x)  sin  x in the interval
 0,  

f ( x )  x, 0  x 
2

 x ,  x 
9. Obtain the half range Fourier sine and cosine series for 2

Session - 26 : Steady state solution of ODE through Fourier series


Introduction
Fourier series have important applications for both ODEs and PDEs. In this section we shall
focus on ODEs. we know that forced oscillations of a body of mass m on a spring of
d 2 x r dx k F (t )
  x
2 m dt m m
modulus k are governed by the ODE dt -------- (1), where y(t) is the
displacement from rest, r the damping constant, k the spring constant (spring modulus), and the
external force depending on time t. An RLC-circuit governed by
di q dq
L I
RI + dt + c = E(t), where dt ------- (2). If r(t) is a sine or cosine function and if there is
damping , then the steady, state solution is a harmonic oscillation with frequency equal to that of
r(t). However, if is not a pure sine or cosine function but is any other periodic function, then the
steady-state solution will be a superposition of harmonic oscillations with frequencies equal to
that of and integer multiples of these frequencies. And if one of these frequencies is close to the
(practical) resonant frequency of the vibrating system, then the corresponding oscillation may be
the dominant part of the response of the system to the external force. This is what the use of
Fourier series will show us. Of course, this is quite surprising to an observer unfamiliar with
Fourier series, which are highly important in the study of vibrating systems and resonance.

Problems to be discussed by the instructor


1. Determine the steady state solution of ODE y  4 y  sin(t )
r (t )   1if    t  0
2
2. Obtain the particular solution of ODE y   y  r (t ) , if 1 if 0  t  

Tutorial problems
x  3x  2 x  r  t 
3 Determine the transient and steady state oscillations of where
1, if    t  
r t   and r  t  2   r  t 
1, if 0  t  

Assignment problems

4 Determine the steady state current I(t) in the LCR circuit with R=10 Ω , L=1H, c=10-1
and e.m.f E(t) is periodic with period 2 π given as

32
E(t ) =−50 t 2 , if −π <t<0
50 t 2 , if 0<t <π
Session – 27: Introduction to matrices

Introduction

Matrices are everywhere. If you have used a spreadsheet such as Excel or written numbers in a
table, you have used a matrix. Matrices make presentation of numbers clearer and make
calculations easier to program. A matrix is a rectangular array of elements. The elements can be
symbolic expressions or/and numbers. Matrix [ A] is denoted by

a 11 a12 .. .. . .. a1 n

[
[ A ]= a21 a22 .. .. . .. a2 n
⋮ ⋮
a m1 am 2 .. .. . .. a mn
Row i of [ A] has n elements and is
]
[ ai 1 a i2 .. . .a in]
and column j of [ A] has m elements and is
a1 j

[]
a2 j

amj
Each matrix has rows and columns and this defines the size of the matrix.
Problems to be discussed by the instructor

1 1 1 
A   0 2 5 
 2 5 1
Determine the rank of the matrices by reducing into echelon form
Tutorial problems

 4 2 6 
A   1 1 3
15 3 9 
Determine the rank of the matrices by reducing into echelon form

33
Assignment problems

 2 3 7 
A   3 1 3 
 2 19 47 
Determine the rank of the matrices by reducing into echelon form
Session bank

4 2 3 
A   8 4 6 
 2 1 1.5 
Determine the rank of the matrices by reducing into echelon form

1 2 3 
A   2 3 1 
 3 1 2 
Determine the rank of the matrices by reducing into echelon form
Session – 28 : Modeling of electrical networks by system of linear equations and solving

Introduction

Matrix algebra is used to solve a system of simultaneous linear equations. We can frame the
electrical network problem as a set of linear equations and we can solve by a choosing a suitable
method whichever is suitable.

Gaussian elimination is one popular method of solving linear equations. We illustrate this
technique by means of an example.

Example 1. Find x, y and z that satisfy the following three equations at the same time.

x - y + 3z = 4
(1) 2x - y + 2z = 6
3x + y - 2z = 9
Write the augmented matrix M = . We apply the row transformations so that the
matrix get the form

Augmented matrix

(3) M2 = .

By solving the above set of equations we get the values of x y and z.

34
Problems to be discussed by the instructor
1 Determine the current flowing in each branch of the following circuits

2 A dietitian wishes to plan a meal around three foods. The percentage of the daily
requirements of proteins, carbohydrates, and iron contained in each ounce of the three
foods is summarized in the following table

Food-I Food-II Food-III


Proteins (%) 5 3 4
Carbohydrates (%) 5 6 3
Iron(%) 5 4 12
Determine how many ounces of each food the dietitian should include in the meal to
meet exactly the daily requirement of proteins, carbohydrates, and iron (100% of each)
by applying Gauss elimination method.
Tutorial problems
1. Determine the current flowing in each branch of the following circuits

2. Determine the current in each loop of the following electrical circuit using Gauss
elimination method

35
Session - 29: Modeling of civil construction problems by system of linear equations and
solving
Introduction
In certain cases, such as when a system of equations is large, iterative methods of solving
equations are more advantageous. Elimination methods, such as Gaussian elimination, are prone
to large round-off errors for a large set of equations. Iterative methods, such as the Gauss-Seidel
method, give the user control of the round-off error. Also, if the physics of the problem are well
known, initial guesses needed in iterative methods can be made more judiciously leading to
faster convergence. For example consider the system of equations

12 x 1 +3 x 2 −5 x3 =1
x 1 +5 x2 +3 x3 =28
3 x1 + 7 x2 +13 x 3 =76
Use
x1 1

[ ][]
x2 = 0
x3 1
as the initial guess and conduct two iterations.
The coefficient matrix
12 3 −5

[
[ A ]= 1 5 3
3 7 13
is diagonally dominant as
]
|a11|=|12|=12≥|a12|+|a 13|=|3|+|−5|=8
|a 22|=|5|=5≥|a21|+|a 23|=|1|+|3|=4
|a33|=|13|=13≥|a31|+|a 32|=|3|+|7|=10

36
and the inequality is strictly greater than for at least one row. Hence, the solution should
converge using the Gauss-Seidel method.
Rewriting the equations, we get
1−3 x 2 +5 x 3
x 1=
12
28−x 1−3 x 3
x 2=
5
76−3 x 1−7 x 2
x 3=
13
Assuming an initial guess of
x1 1

[ ][]
x2 = 0
x 3
1

1.1 Iteration #1
1−3 ( 0 ) +5 ( 1 )
x 1=
12
=0 .50000
28−( 0 . 50000 )−3 ( 1 )
x 2=
5
=4. 9000
76−3 ( 0 .50000 )−7 ( 4 . 9000 )
x 3=
13
=3 . 0923
The absolute relative approximate error at the end of the first iteration is
1.2 Iteration #2
1−3 ( 4 . 9000 )+ 5 ( 3 . 0923 )
x 1=
12
=0 .14679
28−( 0 . 14679 )−3 ( 3 .0923 )
x 2=
5
=3 . 7153
76−3 ( 0 .14679 )−7 ( 3 .7153 )
x 3=
13
=3. 8118
This is close to the exact solution vector of
x1 1

[ ][]
x2 = 3
x3 4

37
Problems to be discussed by the instructor

3. A civil engineer involved in construction requires 4800, 5800, 5700 m3 of sand, fine
gravel, coarse gravel respectively for a building project. There are 3 pits from which
these materials can be obtained. The composition of these pits is

Sand % Fine gravel % Coarse gravel %

Pit 1 55 30 15

Pit2 20 50 30

Pit3 25 20 55

How many cubic meters must be hauled from each pit in order to meet the engineer’s
needs using gauss elimination method.

4. A firm can produce three types of cloths A, B and C. Three kinds of wool are required for
it, say red, green and blue wool. One unit of type ‘A’ cloth needs 2 yards of red wool, 8
yards of green and one yard of blue wool; one unit length of type ‘B’ cloth needs one
yard of red, 3 yards of green and 5 yards of blue wool; one unit length of type ‘C’ cloth
needs 6 yards red, 2 yards of green and one yard of blue wool. The firm has only a stock
of 9 yards red, 13 yards green and 7 yards of blue wool. If total stock is used, then
determine the number of units of cloth A, B and C.

Tutorial problems

1. The following system of equations is designed to determine concentrations (the c’s in


g/m3) in a series of coupled reactors as a function of the amount of mass input to each
reactor(the right-hand sides in g/day); 15c1 – 3c2 – c3 = 3800, -3c1 + 18c2 – 6c3 = 1200,-
4c1 – c2 + 12c3 =2350. Determine the concentrations using Gauss-Seidel method.

2. Generate the solution to the following system of linear equations by Gauss elimination
method x− y −z=−2, − y + z=−1 , −x + y + z=6.

Assignment problems

5. Solve the following equations by using Gauss – seidel method 10x+y+z = 12; 2x+10y+z
= 13; 2x+2y+10z = 14

6. The following system of equations is designed to determine concentrations (the c’s in


g/m3) in a series of coupled reactors as a function of the amount of mass input to each
reactor(the right-hand sides in g/day); 15c1 – 3c2 – c3 = 3800, -3c1 + 18c2 – 6c3 = 1200,-
4c1 – c2 + 12c3 =2350. Determine the concentrations using Gauss-Seidel method.

38
Session – 30 : Solving system of linear equations by Jacobi’s method

Introduction

The procedure of the Jacobi method is same as that of Gauss –seidel method. But we don’t use
the latest values of x y and z in each iteration as in Gauss –seidel method. We use the values of
previous iteration in the present iteration.

Problems to be discussed by the instructor

1. Solve the following equations by using Gauss – Jacobi method 10x+y+z = 12; 2x+10y+z
= 13; 2x+2y+10z = 14
2. Generate the solution to the following system of linear equations by Gauss elimination
method x− y −z=−2, − y + z=−1 , −x + y + z=6.

Tutorial problems

Fertilizer Lawnco produces three grades of commercial fertilizers. A 100 – kg bag of


grade –A fertilizer contains 18 kg of nitrogen, 4 kg of Phosphate and 5 kg of potassium.
A 100- kg bag of grade – B fertilizer contains 20 kg of nitrogen and 4 kg of phosphate
and potassium. A 100 – kg bag of gtade C fertilizer contains 24 kg of nitrogen, 3kg of
phosphate and 6 kg of potassium. How many 100-kg of bags of each of the three grades
of fertilizer should Lawnco produce if 26,400 Kg of Nitrogen, 4900 Kg of phosphate ,
and 6200Kg of potassium are available and all the neutrients are used.

Assignment problems

Cantwell Associates , a real estate developer, is planning to buld a new apartment


complex consisting of one – bed room units and two and three bed room town houses. A
total of 192 units is planned, and the number of family units will equal the number of one
bed room units will be 3 times the number of three bed room units, determine how many
units of each type will be in the complex.

Session – 31 : Find Power and inverse of a square matrix by Cayley – Hamilton Theorem
Introduction

It was named after the famous mathematician Arthur cayley which states that, Every square
matrix A satisfies its own characteristic equation. By using this theorem we can find the inverse
of a given matrix and powers of given matrices.

Problems to be discussed by the instructor


1 Using Cayley -Hamilton Theorem, find the inverse of
1 0 3 1 1 3

[2 1 −1
1 −1 1 ] ii) 1
[ 3 −3
−2 −4 −4 ]
39
1 2 
A  
2 Using Cayley Hamilton Theorem obtain A8, if  2 1
Tutorial problems
 2 1 3
A   0 1 0 
 1 1 2
3 Determine the characterstic equation of the matrix
 2 1 3
A   0 1 0 
 1 1 2
4 Compute inverse of

Assignment problems
 8 6 2 
A   1 2 1
 1 1 2 
1 Applying Hamilton theorem, obtain A4,if
2 1 1
2

8 7 6 5 4 3
[ ]
Find the characteristic equation of the matrix A = 0 1 0 and hence find the matrix
1 1 2
represented by A −5 A +7 A −3 A + A −5 A +8 A 2−2 A+ I .

Session – 32&33:To determine Eigen values and Eigen vectors


Introduction

The eigenvectors of a square matrix are the non-zero vectors which, after being multiplied by the
matrix, remain proportional to the original vector, i.e. any vector x that satisfies the equation:

Ax=λx ,

where A is the matrix in question, x is the eigenvector and λ is the associated


eigenvalue.

In order to find the eigenvectors of a matrix we must start by finding the eigenvalues. To do this
we take everything over to the LHS of the equation:

Ax−λx=0,
then we pull the vector x outside of a set of brackets:

( A− λI ) x=0 .

40
The only way this can be solved is if A− λI does not have an inverse1, therefore we find
values of λ such that the determinant of A− λI is zero:

|A−λI|=0.
Once we have a set of eigenvalues we can substitute them back into the original equation to find
the eigenvectors. We illustrate this with one example.
Find the eigenvalues and eigenvectors of the matrix:

A= (21 12 ) .
A)

First we start by finding the eigenvalues, using the equation derived above:

|A−λΙ|=| 2 1 − λ 0 |=|2−λ 1 |.
( )( )
1 2 0 λ 1 2−λ

If you like, just consider this step as, “subtract λ from each diagonal element of the matrix in
the question”.

Next we derive a formula for the determinant, which must equal zero:

2− λ 1
| |=( 2− λ ) (2−λ ) −1×1= λ2 −2 λ+3=0.
1 2−λ

We now need to find the roots of this quadratic equation in λ .

In this case the quadratic factorises straightforwardly to:

2
λ −2 λ+3=( λ−3 ) ( λ−1 ) =0 .

The solutions to this equation are λ1 =1 and λ2 =3 . These are the eigenvalues of the matrix
A .

We will now solve for an eigenvector corresponding to each eigenvalue in turn. First we will
solve for λ=λ1 =1 :

1
If A− λI does have an inverse we find x=( A−λI )−1 0=0 , i.e. the only solution is the zero vector.

41
x1

To find the eigenvector we substitute a general vector


()
x=
x2
into the defining equation:

Ax=λx ,
2 1 x 1 =1× x 1 .
( )( ) ( )
1 2 x2 x2

By multiplying out both sides of this equation, we form a set of simultaneous equations:

2 x1 + x 2 x
( x 1 +2 x 2)( )
= 1 ,
x2

or

2 x 1 +x 2 =x 1 ,
x 1 +2 x 2 =x 2 .

x 1 +x 2=0 ,
x 1 +x 2=0 ,

where we have taken everything over to the LHS. It should be immediately clear that we have a
problem as it would appear that these equations are not solvable! However, as we have already
mentioned, the eigenvectors are not unique: we would not expect to be able to solve these
equation for one value of x 1 and one value of x 2 . In fact, all these equations let us do is
specify a relationship between x 1 and x 2 , in this case:
x 1 +x 2=0 ,
or,
x 2=−x 1 ,

so our eigenvector is produced by substituting this relationship into the general vector x :

x1
x=
( )
−x1
.

This is a valid answer to the question, however it is common practice to put 1 in place of x 1
and give the answer:

x= 1 .
( )
−1

42
We follow the same procedure again for the second eigenvalue, λ1 =λ 2=3 . First we write out
the defining equation:

Ax=λx ,
2 1 x 1 =3× x 1 ,
( )( ) ( )
1 2 x2 x2

and multiply out to find a set of simultaneous equations:

2 x 1 +x 2=3 x 1 ,
x 1 +2 x 2=3 x 2 .

Taking everything over to the LHS we find:

−x 1 +x 2=0 ,
x1 −x 2 =0 .

This time both equations can be made to be the same by multiplying one of them by minus one.
This is used as a check: one equation should always be a simple multiple of the other; if they are
not and can be solved uniquely then you have made a mistake!

Once again we can find a relationship between x 1 and x 2 , in this case x 1=x 2 , and form
our general eigenvector:

x1
x=
()x1
.

As before, set x 1=1 to give:

x= 1 .
()
1

Therefore our full solution is:

(−11 );
λ1 =1 , x 1 =

1
λ =3 , x =( ) .
2 2
1

43
Problems to be discussed by the instructor
 2 2 3
A   2 1 6 
 1 2 0 
1. Determine the Eigen values and Eigenvectors of
6 5 2 
A   2 0 8
 5 4 0 
2. Determine the Eigen values and Eigen vectors of
Tutorial problems
2 1 3
A   0 1 0 
 1 1 2 
1. Determine the Eigen values and Eigenvectors of
1 1 3
A  1 5 1
3 1 1 
2. Determine the Eigen values and Eigen vectors of
Assignment problems

 4 2 2 
A   2 5 0 
 2 0 3 
3. Determine the Eigen values and Eigenvectors of
 8 6 2 
A   6 7 4 
 2 4 3 
4. Determine the Eigen values and Eigenvectors of
Session – 34 : Some problems on orthogonal, symmetric, skew-symmetric and unitary
matrices
Introduction

If the at least one entry of a matrix is a complex number, then the matrix is complex. In this
session we see different types of such matrices like unitrary , Hermitian , Skew – Hermitian ,
Orthoganal matrices with certain properties.

Problems to be discussed by the instructor

0 1+2 i
1. Given that A = [−1+2i 0 ], show that (1-A) (1+ A)-1 is a Unitary matrix.
2. If A is a Hermitian matrix, (iA) is a skew – Hermitian matrix.

44
Tutorial problems

3 7−4 i −2+5i
1. Show that
[
7+ 4 i −2
−2−5 i 3−i
1 1 1
4 ]
3+ i is a Hermitian matrix.

[ ] 1
2. If S = 1 a2 a , where a = e2iπ/3, prove that S-1 = Ś.
1 a a2
3

Assignment problems
1 1  i 1  i 
 
Prove that 2 1  i 1  i  is a Unitary matrix

 2 3  4i 
3  4i 5  is a Hermitian matrix
Prove that 
Session - 35&36 :Reducing the quadratic form into canonical form and finding nature of
the quadratic form
Introduction
Let {x1, x2 , ..., xn} be n (non random) variables. A quadratic form Q is, by definition, an
expression such as :

Q = ij aij xi xj
where the aij (the coefficients of the form) are real numbers.
So a quadratic form is a second degree, homogenous (no constant term) polynom in the xi.
A quadratic form Q is then defined by the matrix equation :
 

Q = x'Ax
 
 
A is called the matrix of the quadratic form.
It is easily shown that A may be assumed to be symmetric without loss of generality. By
finding the eigen values of the matrix of the given quadratic form say a b c we can write
the canonical form ax2+by2+cz2

45
Definitions

1 The number of positive terms in a given canonical form is called index


2 The excess number of positive terms over negative terms in the Canonical form is
called signature
3 If all the eigen values of the matrix of the Qadratic form are
a. Positive it is +ve definite
b. Negative it is –ve definite
c. If all are +ve and at least one is zero it is +ve semi-definite
d. If all are –ve and atleast one is zero it is negative semi definite

Problems to be discussed by the instructor


1 Reduce the quadratic form 3 x 2+ 5 y 2 +3 z 2−2 yz+ 2 zx−2 xy to the canonical form.

2 Reduce the quadratic form x 2+ 2 y 2 +3 z 2−2 yz+ 2 zx−2 xy to the canonical form. Also
specify the matrix of transformation and find the index and signature
Tutorial problems

1. Reduce the quadratic form x 2+ 2 y 2 +3 z 2−2 yz+ 2 zx−2 xy to the canonical form. Also
specify the matrix of transformation and find the index and signature.

2. Express the following Quadratic form as “sum of squares” Q =


10 x 2+ y 2 + z 2−6 xy −2 yz + xz .
Assignment problems

1. Reduce to sum of squares form Q=x 21+ 2 x 22−7 x 23−4 x 1 x 2+ 8 x2 x 3.

46

You might also like