Nothing Special   »   [go: up one dir, main page]

Author: Dr. K. GURURAJAN: Class Notes of Engineering Mathematics Iv Subject Code: 06mat41

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 122

CLASS NOTES OF ENGINEERING MATHEMATICS IV

SUBJECT CODE: 06MAT41

Author: Dr. K. GURURAJAN


Designation: Professor
Department: MATHEMATICS
Malnad College of Engineering, Hassan

UNIT 7: Hypothesis Testing


Introduction:
Statistical Inference is a branch of Statistics which uses probability concepts to deal with
uncertainty in decision making. There are a number of situations where in we come
across problems involving decision making. For example, consider the problem of buying
1 kilogram of rice, when we visit the shop, we do not check each and every rice grains
stored in a gunny bag; rather we put our hand inside the bag and collect a sample of rice
grains. Then analysis takes place. Based on this, we decide to buy or not. Thus, the
problem involves studying whole rice stored in a bag using only a sample of rice grains.

Another example is consider the experiment of finding how far this e – learning program
started by VTU yielding results. Usually the authorities visit the colleges and collect the
information about the programme from a sample of students. Later study will be done,
based on this sample study, suitable actions will be taken. Like this, one can give a
number of examples. With these in view, this chapter focuses a detailed discussion of
statistical inference.
This topic considers two different classes of problems
1. Hypothesis testing – we test a statement about the population parameter from which the
sample is drawn.
2. Estimation – A statistic obtained from the sample collected is used to estimate the
population parameter.

(Dr. K. Gururajan, MCE, Hassan Page 1 - 3/5/2011)


First what is meant by hypothesis testing?

This means that testing of hypothetical statement about a parameter of population.


Conventional approach to testing:
The procedure involves the following:
1. First we set up a definite statement about the population parameter which we call it as

null hypothesis, denoted by H0 . According to Professor R. A. Fisher, Null Hypothesis


is the statement which is tested for possible rejection under the assumption that it is
true. Next we set up another hypothesis called alternate statement which is just opposite

of null statement; denoted by H1 which is just complimentary to the null hypothesis.

Therefore, if we start with H0 : µ = µ0 then alternate hypothesis may be considered as

either one of the following statements; H1 : µ ≠ µ0 , or H1 : µ > µ0 or H1 : µ < µ0 .

As we are studying population parameter based on some sample study, one can not do the
job with 100% accuracy since sample is drawn from the population and possible sample
may not represent the whole population. Therefore, usually we conduct analysis at
certain level of significance (lower than 100%. The possible choices include 99%, or
95% or 98% or 90%. Usually we conduct analysis at 99% or 95% level of

significance, denoted by the symbol α . We test H0 against H1 at certain level of

significance. The confidence with which a person rejects or accepts H0 depends upon

the significance level adopted. It is usually expressed in percentage forms such as 5% or


1% etc. Note that when α is set as 5%, then probability of rejecting null hypothesis
when it is true is only 5%. It also means that when the hypothesis in question is accepted
at 5% level of significance, then statistician runs the risk of taking wrong decisions, in the
long run, is only 5%. The above is called II step of hypothesis testing.
(Dr. K. Gururajan, MCE, Hassan Page 3 - 3/5/2011)
Critical values or Fiducial limit values for a two tailed test:
Sl. No Level of significance Theoretical Value

1 α = 1% 2.58

2 α = 2% 2.33

3 α = 5% 1.96

Critical values or Fiducial limit values for a single tailed test (right and test)

Tabulated value α = 1% α = 5% α = 10%

Right – tailed test 2.33 1.645 1.28

Left tailed test -2.33 -1.645 -1.28

Setting a test criterion: The third step in hypothesis testing procedure is to construct a
test criterion. This involves selecting an appropriate probability distribution for the
particular test i.e. a proper probability distribution function to be chosen. Some of the
distribution functions used are t, F, when the sample size is small (size lower than 30).
However, for large samples, normal distribution function is preferred. Next step is the
computation of statistic using the sample items drawn from the population. Usually,
samples are drawn from the population by a procedure called random, where in each and
every data of the population has the same chance of being included in the sample. Then
the computed value of the test criterion is compared with the tabular value; as long the
calculated value is lower then or equal to tabulated value, we accept the null hypothesis,
otherwise, we reject null hypothesis and accept the alternate hypothesis. Decisions are
valid only at the particular level significance of level adopted.
During the course of analysis, there are two types of errors bound to occur. These are (i)
Type – I error and (ii) Type – II error.
(Dr. K. Gururajan, MCE, Hassan Page 3 - 3/5/2011)
Type – I error: This error usually occurs in a situation, when the null hypothesis is true,
but we reject it i.e. rejection of a correct/true hypothesis constitute type I error.
Type – II error: Here, null hypothesis is actually false, but we accept it. Equivalently,
accepting a hypothesis which is wrong results in a type – II error. The probability of
committing a type – I error is denoted by α where
α = Probability of making type I error = Probability [Rejecting H0 | H0 is true]
On the other hand, type – II error is committed by not rejecting a hypothesis when it is
false. The probability of committing this error is denoted by β . Note that
β = Probability of making type II error = Probability [Accepting H1 | H1 is false]
Critical region:
A region in a sample space S which amounts to Rejection of H0 is termed as critical

region.
One tailed test and two tailed test:
This depends upon the setting up of both null and alternative hypothesis.
A note on computed test criterion value:

1. When the sampling distribution is based on population of proportions/Means,


then test criterion may be given as
( Expected results - Observed results )
Z cal =
Standard error of the distribution

Application of standard error:


1. S.E. enables us to determine the probable limit within which the population
parameter may be expected to lie. For example, the probable limits for population

of proportion are given by p ± 3 pqn . Here, p represents the chance of


achieving a success in a single trial, q stands for the chance that there is a failure
in the trial and n refers to the size of the sample.
2. The magnitude of standard error gives an index of the precision of the parameter.
(Dr. K. Gururajan, MCE, Hassan Page 4 - 3/5/2011)
ILLUSTRATIVE EXAMPLES
1. A coin is tossed 400 times and the head turned up 216 times. Test the
hypothesis that the coin is un– biased?
Solution: First we construct null and alternate hypotheses set up H0 : The coin is not a

biased one. Set up H1 : Yes, the coin is biased. As the coin is assumed be fair and it is
tossed 400 times, clearly we must expect 200 times heads occurring and 200 times tails.
Thus, expected number of heads is 200. But the observed result is 216. There is a

difference of 16. Further, standard error is σ = npq . With p = ½, q = ½ and n = 400,

difference 216 − 240


clearly σ = 10 . The test criterion is zcal = = = 1.6 If we
standard error 10
choose α = 5% , then the tabulated value for a two tailed test is 1.96. Since, the
calculated value is lower than the tabulated value; we accept the null hypothesis that coin
is un – biased.
2. A person throws a 10 dice 500 times and obtains 2560 times 4, 5, or 6. Can this be
attributed to fluctuations in sampling?
Solution: As in the previous problem first we shall set up H0 : The die is fair and H1 :
The die is unfair. We consider that problem is based on a two – tailed test. Let us choose
level of significance as α = 5% then, the tabulated value is 1.96. Consider computing test

Expected value - observed result


criterion, zcal = ; here, as the dice is tossed by a person
standard error
5000 times, and on the basis that die is fair, then chance of getting any of the 6 numbers
is 1/6. Thus, chance of getting either 4 or 5, or 6 is p = ½. Also, q = ½. With n = 5000,

standard error, σ = npq = 35.36. Further, expected value of obtaining 4 or 5 or 6 is

2500 - 2560
2500. Hence, zcal = = 1.7 which is lower than 1.96. Hence, we conclude
35.36
that die is a fair one.
(Dr. K. Gururajan, MCE, Hassan Page 5 - 3/5/2011)
3. A sample of 1000 days is taken from meteorological records of a certain district
and 120 of them are found to be foggy. What are the probable limits to the
percentage of foggy days in the district?
Solution: Let p denote the probability that a day is foggy in nature in a district as

120
reported by meteorological records. Clearly, p = = 0.12 and q = 0.88. With n =
1000

1000, the probable limits to the percentage of foggy days is given by p ± 3 pqn .
Using the data available in this problem, one obtains the answer as

0.12 ± 3 0.12 ⋅ 88 ⋅ 1000 . Equivalently, 8.91% to 15.07%.

4. A die was thrown 9000 times and a throw of 5 or 6 was obtained 3240 times. On
the assumption of random throwing, do the data indicate that die is biased? (Model
Question Paper Problem)
Solution: We set up the null hypothesis as H0 : Die is un - biased. Also,

H1 : Die is biased. . Let us take level of significance as α = 5% . Based on the


assumption that distribution is normally distributed, the tabulated value is 1.96. The
chance of getting each of the 6 numbers is same and it equals to 1/6 therefore chance of
getting either 5 or 6 is 1/3. In a throw of 9000 times, getting the numbers either 5 or 6 is

1
×9000 = 3000 . Now the difference in these two results is 240. With p = 1/3, q = 2/3,
3

Difference
n = 9000, S.E . = npq = 44.72. Now consider the test criterion zcal = =
S.E.

240
= = 5.367 which is again more than the tabulated value. Therefore, we reject null
44.72
hypothesis and accept the alternate that die is highly biased.
(Dr. K. Gururajan, MCE, Hassan Page 6 - 3/5/2011)
Tests of significance for large samples:
In the previous section, we discussed problems pertaining to sampling of attributes. It is
time to think of sampling of other variables one may come across in a practical situation
such as height weight etc. We say that a sample is small when the size is usually lower
than 30, otherwise it is called a large one.
The study here is based on the following assumptions: (i) the random sampling
distribution of a statistic is approximately normal and (ii) values given by the samples are
sufficiently close to the population value and can be used in its place for calculating

σp
standard error. When the standard deviation of population is known, then S.E (X) =
n

where σ p denotes the standard deviation of population . When the standard deviation of

σ
the population is unknown, then S.E (X) = where σ is the standard deviation of
n
the sample.
Fiducial limits of population mean are:
σ
95% fiducial limits of population mean are X ± 1.96
n

σ .
99% fiducial limits of population mean are X ± 2.58
n

x -µ
Further, test criterion z cal =
S.E.

LLUSTRATIVE EXAMPLES
1. A sample of 100 tyres is taken from a lot. The mean life of tyres is found to be 39,
350 kilo meters with a standard deviation of 3, 260. Could the sample come from a
population with mean life of 40, 000 kilometers? Establish 99% confidence limits
within which the mean life of tyres is expected to lie.
Solution: First we shall set up null hypothesis, H0 : µ = 40, 000 , alternate hypothesis as

H1 : µ ≠ 40, 000 . We consider that the problem follows a two tailed test and

(Dr. K. Gururajan, MCE, Hassan Page 7 - 3/5/2011)


chose α = 5% . Then corresponding to this, tabulated value is 1.96. Consider the

x -µ
expression for finding test criterion, zcal = . Here, µ =40, 000, x = 39, 350 and
S.E.

σ 3,260
σ = 3, 260 , n = 100. S.E. = = = 326 . Thus, z cal = 1.994. As this value is
n 100
slightly greater than 1.96, we reject the null hypothesis and conclude that sample has not
come from a population of 40, 000 kilometers.
The 99% confidence limits within which population mean is expected to lie is given as

x ± 2.58×S.E. i.e. 39,350±2.58×326 = (38, 509, 40, 191) .


2. the mean life time of a sample of 400 fluorescent light bulbs produced by a
company is found to be 1, 570 hours with a standard deviation of 150 hours. Test
the hypothesis that the mean life time of bulbs is 1600 hours against the alternative
hypothesis that it is greater than 1, 600 hours at 1% and 5% level of significance.
Solution: First we shall set up null hypothesis, H0 : µ = 1, 600 hours , alternate hypothesis

as H1 : µ > 1, 600 hours . We consider that the problem follows a two tailed test and chose
α = 5% . Then corresponding to this, tabulated value is 1.96. Consider the expression

x -µ
for finding test criterion, zcal = . Here, µ =1, 600, x = 1, 570, n = 400 ,
S.E.

σ = 150 hours so that using all these values above, it can be seen that z cal = 4.0 which is
really greater than 1.96. Hence, we have to reject null hypothesis and to accept the
alternate hypothesis.
Test of significance of difference between the means of two samples
Consider two populations P1 and P2. Let S1 and S2 be two samples drawn at random
from these two different populations. Suppose we have the following data about these
two samples, say

(Dr. K. Gururajan, MCE, Hassan Page 8 - 3/5/2011)

Samples/Data Sample size Mean Standard Deviation

S1 n1 x1 σ1

S2 n2 x2 σ2

then standard error of difference between the means of two samples S1 and S2
σ 12 σ 22 Difference of sample means
is S.E = + and the test criterion is Zcal = . The
n1 n2 Standard error
rest of the analysis is same as in the preceding sections.

When the two samples are drawn from the same population, then standard error is

1 1 Difference of sample means


S.E = σ + and test criterion is Zcal = .
n1 n2 Standard error

When the standard deviations are un – known, then standard deviations of the two
s12 s22
samples must be replaced. Thus, S.E = + where s1 and s2 are standard
n1 n2
deviations of the two samples considered in the problem.

ILLUSTRATIVE EXAMPLES

1. Intelligence test on two groups of boys and girls gave the following data:

Data Mean Standard Sample size


deviation
Boys 75 15 150

Girls 70 20 250

Is there a significant difference in the mean scores obtained by boys and girls?

(Dr. K. Gururajan, MCE, Hassan Page 9 - 3/5/2011)

Solution: We set up null hypothesis as H0 : there is no significant difference between


the mean scores obtained by boys and girls. The alternate hypothesis is considered as
H1 : Yes, there is a significant difference in the mean scores obtained by boys and girls.
We choose level of significance as α = 5% so that tabulated value is 1.96. Consider
Difference of means
z cal = . The standard error may be calculated as
Standard Error
152 202 75 - 70
S.E = + =1.761 , The test criterion is z cal = = 2.84 . As 2.84 is more
150 250 1.761
than 1.96, we have to reject null hypothesis and to accept alternate hypothesis that there
are some significant difference in the mean marks scored by boys and girls.

2. A man buys 50 electric bulbs of “Philips” and 50 bulbs of “Surya”. He finds that
Philips bulbs give an average life of 1,500 hours with a standard deviation of 60
hours and Surya bulbs gave an average life of 1, 512 hours with a standard
deviation of 80 hours. Is there a significant difference in the mean life of the two
makes of bulbs?

Solution: we set up null hypothesis, H0 : there is no significant difference between the


bulbs made by the two companies, the alternate hypothesis can be set as H1 : Yes, and
there could be some significant difference in the mean life of bulbs. Taking
α = 1% and α =5% , the respective tabulated values are 2.58 and 1.96. Consider
2
60 80 2
1512 - 1500
standard error is S.E = + =14.14 so that z cal = = 0.849 . Since the
50 50 14.14
calculated value is certainly lower than the two tabulated values, we accept the
hypothesis there is no significant difference in the make of the two bulbs produced by the
companies.

A discussion on tests of significance for small samples


So far the problem of testing a hypothesis about a population parameter was based on the
assumption that sample drawn from population is large in size (more than 30) and the
probability distribution is normally distributed. However, when the size of the sample is
small, (say < 30) tests considered above are not suitable because the assumptions on
which they are based generally do not hold good in the case of small samples. IN
particular, here one cannot assume that the problem follows a normal distribution
function and those values given by sample data are sufficiently close to the population
values and can be used in their place for the calculation of standard error. Thus, it is a
necessity to develop some alternative strategies to deal with problems having sample size

(Dr. K. Gururajan, MCE, Hassan Page 10 - 3/5/2011)

relatively small. Also, we do see a number of problems involving small samples. With
these in view, here, we will initiate a detailed discussion on the same.

Here, too, the problem is about testing a statement about population parameter; i.e. in
ascertaining whether observed values could have arisen by sampling fluctuations from
some value given in advance. For example, if a sample of 15 gives a correlation
coefficient of +0.4, we shall be interested not so much in the value of the correlation in
the parent population, but more generally this value could have come from an un –
correlated population, i.e. whether it is significant in the parent population. It is widely
accepted that when we work with small samples, estimates will vary from sample to
sample.

Further, in the theory of small samples also, we begin study by making an assumption
that parent population is normally distributed unless otherwise stated. Strictly, whatever
the decision one takes in hypothesis testing problems is valid only for normal
populations.

Sir William Gosset and R. A. Fisher have contributed a lot to theory of small samples.
Sir W. Gosset published his findings in the year 1905 under the pen name “student”. He
gave a test popularly known as “t – test” and Fisher gave another test known as “z – test”.
These tests are based on “t distribution and “z – distribution”.

Student’s t - distribution function

Gosset was employed by the Guinness and Son, Dublin bravery, Ireland which did not
permit employees to publish research work under their own names. So Gosset adopted
the pen name “student” and published his findings under this name. Thereafter, the t –
distribution commonly called student’s t – distribution or simply student’s distribution.

The t – distribution to be used in a situation when the sample drawn from a population is
of size lower than 30 and population standard deviation is un – known. The t – statistic,
i =n

∑( x )
2
 x−µ −x
t cal is defined as t cal =  ⋅ n where i
, x is the
γ = n − 1 = 12  S  S= i =1

n −1
sample mean, n is the sample size, and x i are the data items.

The t – distribution function has been derived mathematically under the assumption of a
normally distributed population; it has the following form

(Dr. K. Gururajan, MCE, Hassan Page 11 - 3/5/2011)


 γ +1 
− 
 t 2
where C is a constant term and γ = n - 1 denotes the number of
 2 
f (t ) = C  1 + 
 γ 
degrees of freedom. As the p.d.f. of a t – distribution is not suitable for analytical
treatment. Therefore, the function is evaluated numerically for various values of t, and for
particular values of γ . The t – distribution table normally given in statistics text books
gives, over a range of values of γ , the probability values of exceeding by chance value
of t at different levels of significance. The t – distribution function has a different value
for each degree of freedom and when degrees of freedom approach a large value, t –
distribution is equivalent to normal distribution function.

The application of t – distribution includes (i) testing the significance of the mean of a
random sample i.e. determining whether the mean of a sample drawn from drawn from a
normal population deviates significantly from a stated value (i.e. hypothetical value of
the populations mean) and (ii) testing whether difference between means of two
independent samples is significant or not i.e. ascertaining whether the two samples comes
from the same normal population? (iii) Testing difference between means of two
dependent samples is significant? (iv) Testing the significance of on observed correlation
coefficient.

Procedures to be followed in testing a hypothesis made about the


population parameter using student’s t - distribution:

• As usual first set up null hypothesis,

• Then, set up alternate hypothesis,

• Choose a suitable level of significance,

• Note down the sample size, n and the number of degrees of freedom,

• Compute the theoretical value, t tab by using t – distribution table.


• t tab value is to be obtained as follows: If we set up α = 5% = 0.05 , suppose γ = 9
then, t tab is to be obtained by looking in 9th row and in the column α = 0.025
(i.e. half of α = 0.05) .
 x−µ
• The test criterion is then calculated using the formula, t cal =  ⋅ n
 S 
• Later, the calculated value above is compared with tabulated value. As long as
the calculated value matches with the tabulated value, we as usual accept the null
hypothesis and on the other hand, when the calculated value becomes more than
tabulated value, we reject the null hypothesis and accept the alternate hypothesis.

(Dr. K. Gururajan, MCE, Hassan Page 12 - 3/5/2011)


ILLUSTRATIVE EXAMPLES

1. The manufacturer of a certain make of electric bulbs claims that his bulbs have a
mean life of 25 months with a standard deviation of 5 months. Random samples of 6
such bulbs have the following values: Life of bulbs in months: 24, 20, 30, 20, 20, and
18. Can you regard the producer’s claim to valid at 1% level of significance? (Given
that t tab = 4.032 corresponding to γ = 5 ).

Solution: To solve the problem, we first set up the null hypothesis H0 : µ = 25 months ,
alternate hypothesis may be treated as H0 : µ < 25 months . To set up α = 1% , then
tabulated value corresponding to this level of significance is t tab |α =1% and γ =5 = 4.032
(4.032 value has been got by looking in the 5th row ) . The test criterion is given by
i =n

∑( x )
2
 x−µ −x
t cal =  ⋅ n where i
. Consider
 S  S= i =1

n −1

xi
(x )
2
x xi − x −x
i

24 1 1

26 3 9

30 7 49

20 23 -3 9

20 -3 9

18 -5 25

Total = 138 - Total = 102


102 23 − 25
Thus, S = = 20.4 = 4.517 and t cal = 6 = 1.084 . Since the calculated
5 4.517
value, 1.084 is lower than the tabulated value of 4.032; we accept the null hypothesis as
mean life of bulbs could be about 25 hours.

(Dr. K. Gururajan, MCE, Hassan Page 13 - 3/5/2011)


2. A certain stimulus administered to each of the 13 patients resulted in the
following increase of blood pressure: 5, 2, 8,-1, 3, 0, -2, 1, 5, 0, 4, 6, 8. Can it be
concluded that the stimulus, in general, be accompanied by an increase in the blood
pressure? (Model Question Paper Problem)

Solution: We shall set up H0 : µbefore = µafter i.e. there is no significant difference in the
blood pressure readings before and after the injection of the drug. The alternate
hypothesis is H0 : µbefore > µafter i.e. the stimulus resulted in an increase in the blood
pressure of the patients. Taking α = 1% and α = 5% , as n = 13, γ = n − 1 = 12 ,
respective tabulated values are t tab |α =1% and γ =12 = 3.055 and t tab |α =5% and γ =12 = 2.179 . Now,
we compute the value of test criterion. For this, consider

xi
(x )
2
x xi − x −x
i

5 2 4

2 -1 1

8 5 25

-1 -4 16

3 0 0

0 -3 9

-2 -5 25

1 -2 4
3
5 2 4

0 -3 9
4 1 1

6 3 9

8 5 25

Total = 39 - Total = 132

(Dr. K. Gururajan, MCE, Hassan Page 14 - 3/5/2011)


i =n

∑( x )
2
−x 132 x−µ
Consider i
= = 11 = 3.317 . Therefore, t cal = ⋅ n may
S= i =1
12 S
n −1
0−3
be obtained as t cal = 13 = 3.2614 . As the calculated value 3.2614 is more than
3.317
the tabulated values of 3.055 and 2.179, we accept the alternate hypothesis that after the
drug is given to patients, there is an increase in the blood pressure level.

3. the life time of electric bulbs for a random sample of 10 from a large consignment
gave the following data: 4.2, 4.6, 3.9, 4.1, 5.2, 3.8, 3.9, 4.3, 4.4, 5.6 (in ‘000 hours).
Can we accept the hypothesis that the average life time of bulbs is 4, 000 hours?

Solution: Set up H0 : µ = 4, 000 hours , H1 : µ < 4, 000 hours . Let us choose that
α = 5% . Then tabulated value is t tab |α =5% and γ =9 = 2.262 . To find the test criterion,
consider

xi
(x )
2
x xi − x −x
i

4.2 -0.2 0.04

4.6 0.2 0.04

3.9 -0.5 0.25

4.1 -0.3 0.09

5.2 0.8 0.64


4.4
3.8 -0.6 0.36

3.9 -0.5 0.25

4.3 -0.1 0.01


4.4 0.0 0.0
5.6 1.2 1.44

Total = 44 - Total = 3.12

(Dr. K. Gururajan, MCE, Hassan Page 15 - 3/5/2011)


i =n

∑( x )
2
−x 3.12 x−µ
Consider i
= = 0.589 . Therefore, t cal = ⋅ n is computed
S= i =1
9 S
n −1
4.4 − 4.0
as t cal = ⋅ 10 = 2.148. As the computed value is lower than the tabulated
0.589
value of 2.262, we conclude that mean life of time bulbs is about 4, 000 hours.

A discussion on χ 2 test and Goodness of Fit

Recently, we have discussed t – distribution function (i.e. t – test). The study was based
on the assumption that the samples were drawn from normally distributed populations, or,
more accurately that the sample means were normally distributed. Since test required
such an assumption about population parameters. For this reason, A test of this kind is
called parametric test. There are situations in which it may not be possible to make any
rigid assumption about the distribution of population from which one has to draw a
sample.

Thus, there is a need to develop some non – parametric tests which does not require any
assumptions about the population parameters.

With this in view, now we shall consider a discussion on χ 2 distribution which does
not require any assumption with regard to the population. The test criterion
∑ ( Oi − Ei )
2

corresponding to this distribution may be given as χ 2 = i where


Ei
RT ⋅ CT
• Ei : Oi : Observed values , Ei : Expected values .
N

When Expected values are not given, one can calculate these by using the following
RT ⋅ CT
relation; E i : . Here, RT means the row total for the cell containing the row, CT
N
is for the column total for the cell containing columns, and N represent the total number
of observations in the problem.
The calculated χ2 value (i.e. test criterion value or calculated value) is compared
with the tabular value of χ 2 value for given degree of freedom at a certain prefixed
level of significance. Whenever the calculated value is lower than the tabular value, we
continue to accept the fact that there is not much significant difference between expected
and observed results.

(Dr. K. Gururajan, MCE, Hassan Page 16 - 3/5/2011)

On the other hand, if the calculated value is found to be more than the value suggested in
the table, then we have to conclude that there is a significant difference between observed
and expected frequencies.

As usual, degrees of freedom are γ = n − k where k denotes the number of independent


constraints. Usually, it is 1 as we will be always testing null hypothesis against only one
hypothesis, namely, alternate hypothesis.

This is an approximate test for relatively a large population. For the usage of test, the
following conditions must checked before employing the test. These are:

1. The sample observations should be independent.


2. Constraints on the cell frequencies, if any, must be linear.
3. i.e. the sum of all the observed values must match with the sum of all the expected
values.
4. N, total frequency should be reasonably large
5. No theoretical frequency should be lower than 5.
6. It may be recalled this test is depends on χ 2 test: The set of observed and
expected frequencies and on the degrees of freedom, it does not make any
assumptions regarding the population.

ILLUSTRATIVE EXAMPLES

1. From the data given below about the treatment of 250 patients suffering from a
disease, state whether new treatment is superior to the conventional test.

Data Number of patients

Favourable Not favorable Total

New one 140 30 170

Conventional 60 20 80
Total 200 50 280

Solution: We set up null hypothesis as there is no significance in results due to the two
procedures adopted. The alternate hypothesis may be assumed as there could be some
difference in the results. Set up level of significance as
 ( 112 − 100 )   ( 71 − 50 )   ( 32 − 10 ) 
2 2 2

+ +  +  α = 5% then tabulated value is


 100   50   10 
     
χ |α = 0.05,γ =1 = 3.841 .
2

(Dr. K. Gururajan, MCE, Hassan Page 17 - 3/5/2011)


RT ⋅ CT
Consider finding expected values given by the formula, Expectation(AB) =
N
where RT means that the row total for the row containing the cell, CT means that the total
for the column containing the cell and N, total number of frequencies. Keeping these in
view, we find that expected frequencies are

136 34 170

A 64 16 80

200 50 250

170 ⋅ 200 170 ⋅ 50 80 ⋅ 200 80 ⋅ 50


= 136 = 34 = 64 = 16
Note: 250 ; 250 , 250 and 250 .

Oi Ei Oi − Ei ( Oi − Ei ) ( Oi − Ei )
2 2

Ei
140 136 4 16 0.118

60 64 -4 16 0.250

30 34 -4 16 0.471

20 16 4 16 1.000

Total 1.839
As the calculated value 1.839 is lower than the tabulated value χ |α = 0.05,γ =1 = 3.841 , we
2

accept the null hypothesis, namely, that there is not much significant difference between
the two procedures.

(Dr. K. Gururajan, MCE, Hassan Page 18 - 3/5/2011)


2. A set of five similar coins is tossed 320 times and the result is

No. of heads 0 1 2 3 4 5
Frequency 6 27 72 112 71 32

Test the hypothesis that the data follow a binomial distribution function.

Solution: We shall set up the null hypothesis that data actually follows a binomial
distribution. Then alternate hypothesis is, namely, data does not follow binomial
distribution. Next, to set up a suitable level of significance, α = 5% , with n = 6, degrees
of freedom is γ = 5. Therefore, the tabulated value is χ |α = 0.05,γ =5 = 11.07 . Before
2

proceeding to finding test criterion, first we compute the various expected frequencies.
As the data is set to be following binomial distribution, clearly probability density
 n  k n −k
function is b ( n, p, k ) =   p q . Here, n = 320, p = 0.5, q = 0.5 , and k
k 
takes the values right from 0 up to 5. Hence, the expected frequencies of getting 0, 1, 2,
3, 4, 5 heads are the successive terms of the binomial expansion of 320 ⋅ ( p + q ) . Thus,
5

expected frequencies E i are 10, 50, 100, 100, 50, 10. Consider the test criterion given
∑( O − Ei )
2
i
by χ 2 | = i ;
cal
Ei
Here, observed values are: Oi : 6, 27, 72, 112, 71, 32

The expected values are: E i : 10, 50, 100, 100, 50, 10 . Consider

 ( 6 − 10 ) 2   ( 27 − 50 ) 2   ( 72 − 100 ) 2 
χ |cal = 
2
+  + 
 10   50   100 
     
 ( 112 − 100 ) 2   ( 71 − 50 ) 2   ( 32 − 10 ) 2 
+ + +  = 78.68. As the calculated
 100   50   10 
     
value is very much higher than the tabulated value of 3.841, we reject the null hypothesis
and accept the alternate hypothesis that data does not follow the binomial distribution.
(Dr. K. Gururajan, MCE, Hassan - page 19, 23 – 05 – 2008)
Subject: Engineering Mathematics IV
Subject Code: 06MAT41
Author: Dr. K. Gururajan
Assistant Professor
Department of Mathematics
Malnad College of Engineering, Hassan – 573 201

PART – B CLASS NOTES OF THE TOPIC RANDOM VARIABLE


AND PROBABILITY DISTRIBUTION FUNCTIONS

UNIT 6:

Introduction: The previous chapter was devoted to a detailed study of basic probability
concepts. The following were taught to you:
• Random Experiment, Sample Space.
• Events in a Sample Space
• Definition of probability, Axioms
• Addition Law, Multiplication Rule
• Independent and Exclusive Events
• Bayes Rule
• Mainly computation of probability of events
From these analyses, it is clear that calculation of probability of events to be treated
individually. However, in a practical situation, one may be interested in finding the
probabilities of all the events and may wishes to have the results in a tabular form for any
future reference. Since for an experiment having n outcomes, totally, there are 2n totally
events; finding probabilities of each of these and keeping them in a tabular form may be
an interesting problem.

Thus, if we develop a procedure, using which if it is possible to compute the probability


of all the events, is certainly an improvement. The aim of this chapter is to initiate a
discussion on the above.

(Dr. K. Gururajan, MCE, Hassan page 1)


Also, in many random experiments, outcomes may not involve a numerical value. In such
a situation, to employ mathematical treatment, there is a need to bring in numbers into the
problem. Further, probability theory must be supported and supplemented by other
concepts to make application oriented. In many problems, we usually do not show
interest on finding the chance of occurrence of an event, but, rather we work on an
experiment with lot of expectations

Considering these in view, the present chapter is dedicated to a discussion of random


variables which will address these problems.

First what is a random variable?

Let S denote the sample space of a random experiment. A random variable means it is a
rule which assigns a numerical value to each and every outcome of the experiment.
Thus, random variable may be viewed as a function from the sample space S to the set of
all real numbers; denoted as f :S →R. For example, consider the random
experiment of tossing three fair coins up. Then S = {HHH, HHT, HTH, THH, TTH,
THT, HTT, TTT}. Define f as the number of heads that appear. Hence, f ( HHH ) = 3 ,
f ( HHT ) = 2 , f ( HTH ) = 2 , f (THH ) = 2 , f ( HTT ) = 1 , f (THT ) = 1 , f (TTH ) = 1

and f (TTT ) = 0 . The same can be explained by means of a table as given below:

HHH HHT HTH THH TTH THT HTT TTT


3 2 2 2 1 1 1 1

Note that all the outcomes of the experiment are associated with a unique number.
Therefore, f is an example of a random variable. Usually a random variable is denoted
by using upper case letters such as X, Y, Z etc. The image set of the random variable
may be written as f ( S ) = {0, 1, 2, 3} .

(Dr. K. Gururajan, MCE, Hassan page 2)


A random variable is divided into

• Discrete Random Variable (DRV)


• Continuous Random Variable (CRV).

If the image set, X(S), is either finite or countable, then X is called as a discrete random
variable, otherwise, it is referred to as a continuous random variable i.e. if X is a CRV,
then X(S) is infinite and un – countable.

Example of Discrete Random Variables:

(i) In the experiment of throwing a die, define X as the number that is


obtained. Then X takes any of the values 1 – 6. Thus, X(S) = {1, 2, 3. . .
6} which is a finite set and hence X is a DRV.
(ii) Let X denotes the number of attempts required for an engineering graduate to
obtain a satisfactory job in a firm? Then X(S) = {1, 2, 3,. . . . }.
Clearly X is a DRV but having a image set countably infinite.
(iii) If X denote the random variable equals to the number of marks scored by a
student in a subject of an examination, then X(S) = {0, 1, 2, 3, . . . .
100}. Thus, X is a DRV, Discrete Random Variable.
(iv) In an experiment, if the results turned to be a subset of the non – zero integers,
Then it may be treated as a Discrete Random Variable.

Examples of Continuous Random Variable:


1. Let X denote the random variable equals the speed of a moving car, say, from a
destination A to another location B, then it is known that speedometer indicates
the speed of the car continuously over a range from 0 up to 160 KM per hour.
Therefore, X is a CRV, Continuously Varying Random Variable.

(Dr. K. Gururajan, MCE, Hassan page 3)


2. Let X denotes the monitoring index of a patient admitted in ICU in a good
hospital. Then it is a known fact that patient’s condition will be watched by the
doctors continuously over a range of time. Thus, X is a CRV.
3. Let X denote the number of minutes a person has to wait at a bus stop in
Bangalore to catch a bus, then it is true that the person has to wait any where from
0 up to 20 minutes (say). Will you agree with me? Since waiting to be done
continuously, random variable in this case is called as CRV.

4. Results of any experiments accompanied by continuous changes at random over a


range of values may be classified as a continuous random variable.

Probability function/probability mass function f ( xi ) = P [ X = xi ] of a


discrete random variable:

Let X be a random variable taking the values, say X : x1 x2 x3 . . . xn

then f ( xi ) = P [ X = xi ] is called as probability mass function or just probability


function of the discrete random variable, X. Usually, this is described in a tabular form:

X = xi x1 x2 x3 . . . xn

f ( xi ) P (2 ≤ X < 5) f ( x1 ) f ( x2 ) f ( x3 ) . . . f ( xn )

Note: When X is a discrete random variable, it is necessary to compute


f ( xi ) = P [ X = xi ] for each i = 1, 2, 3. . n. This function has the following
properties:

(Dr. K. Gururajan, MCE, Hassan page 4)


• f ( xi ) ≥ 0

• 0 ≤ f ( xi ) ≤ 1

• ∑ f ( x ) =1
i
i
On the other hand, X is a continuous random variable, then its probability function will
be usually given or has a closed form, given as f ( x ) = P ( X = x ) where x is defined over
a range of values., it is called as probability density function usually has some standard
form. This function too has the following properties:

• f ( x) ≥ 0

• 0 ≤ f ( x) ≤ 1

• ∫
−∞
f ( x) = 1 .

To begin with we shall discuss in detail, discrete random variables and its distribution
functions. Consider a discrete random variable, X with the distribution function as
given below:
X = xi x1 x2 x3 . . . xn

f ( xi ) f ( x1 ) f ( x2 ) f ( x3 ) . . . f ( xn )

Using this table, one can find probability of various events associated with X. For
example,

• P ( xi ≤ X ≤ x j ) = P ( X = xi ) + P ( X = xi +1 ) + up to + P ( X = xj )

= f ( xi ) + f ( xi +1 ) + f ( xi + 2 ) + up to +f ( x j −1 ) +f ( xj )

• P ( xi < X < x j ) = P ( X = xi +1 ) + P ( X = xi + 2 ) +. . . + P ( X = x j −1 )

= f ( xi +1 ) + f ( xi + 2 ) + up to +f ( x j −1 )

(Dr. K. Gururajan, MCE, Hassan page 5)


• P ( X > x j ) = 1 − P ( X ≤ x j −1 )

{
= 1 − P ( X = x1 ) + P ( X = x2 ) up to +P ( X = x j -1 ) }

The probability distribution function or cumulative distribution function is given as


F ( xt ) = P ( X ≤ xt ) = P ( X = x1 ) + P ( X = x2 ) + up to +P ( X = xt )

It has the following properties:


• F ( x) ≥ 0

• 0 ≤ F ( x) ≤ 1

• When xi < x j then F ( xi ) < F ( x j ) i.e. it is a strictly monotonic increasing

function.
• when x → ∞, F ( x ) approaches 1

• when x → −∞, F ( x ) approaches 0

A brief note on Expectation, Variance, Standard Deviation of a Discrete


Random Variable:
i =n

• E ( X ) = ∑ x i ⋅ f ( xi )
i =1

i =n

• E ( X 2 ) = ∑ xi2 ⋅ f ( xi )
i =1

Var( X ) = E ( X 2 ) − { E ( X )}
2

(Dr. K. Gururajan, MCE, Hassan page 6)

ILLUSTRATIVE EXAMPLES:

1. The probability density function of a discrete random variable X is given


below:

X: 0 1 2 3 4 5 6
f ( xi ) : k 3k 5k 7k 9k 11k 13k
Find (i) k; (ii) F (4) ; (iii) P ( X ≥ 5) ; (iv) P (2 ≤ X < 5) (v) E(X) and (vi) Var (X).

Solution: To find the value of k, consider the sum of all the probabilities which equals to

1
49k. Equating this to 1, we obtain k = . Therefore, distribution of X may now be
49
written as

X: 0 1 2 3 4 5 6
1 3 5 7 9 11 13
f ( xi ) :
49 49 49 49 49 49 49

Using this, we may solve the other problems in hand.


25
F (4) = P[ X ≤ 4] = P[ X = 0] + P[ X = 1] + P[ X = 2] + P[ X = 3] + P[ X = 4] = .
49
24
P[ X ≥ 5] = P[ X = 5] + P[ X = 6] =
49
21 . Next to find E(X), consider
P[2 ≤ X < 5] = P[ X = 2] + P[ X = 3] + P[ X = 4] =
49
203
E ( X ) = ∑ x i ⋅ f ( xi ) = . To obtain Variance, it is necessary to compute
i 49

(Dr. K. Gururajan, MCE, Hassan page 7)

E ( X 2 ) = ∑ xi 2 ⋅ f ( xi ) = 973 . Thus, Variance of X is obtained by using the relation,


i 49

2
973  203 
Var( X ) = E ( X 2 ) − { E ( X )}
2
= −  .
49  49 

2. A random variable, X, has the following distribution function.


X: -2 -1 0 1 2 3
f ( xi ) : 0.1 k 0.2 2k 0.3 k

Find (i) k, (ii) F (2) , (iii) P (−2 < X < 2) , (iv) P (−1 < X ≤ 2) , (v) E(X) , Variance.
Solution: Consider the result, namely, sum of all the probabilities equals 1,
0.1+ k + 0.2 + 2k + 0.3 + k = 1 Yields k = 0.1. In view of this, distribution function of
X may be formulated as
X: -2 -1 0 1 2 3
f ( xi ) : 0.1 0.1 0.2 0.2 0.3 0.1

Note that F (2) = P[ X ≤ 2] = P[ X = −2] + P[ X = −1] + P[ X = 0] + P[ X = 1] + P[ X = 2]


= 0.9 . The same also be obtained using the result,
F (2) = P[ X ≤ 2] = 1 - P[ X < 1] = 1 − { P[ X = −2] + P[ X = −1] + P[ X = 0]} = 0.6.

Next, P (−2 < X < 2) = P[ X = −1] + P[ X = 0] + P[ X = 1] = 0.5 .

Clearly, P (−1 < X ≤ 2) = 0.7. Now, consider E ( X ) = ∑ xi ⋅ f ( xi ) = 0.8.


i

Then E ( X ) = ∑ xi ⋅ f ( xi ) = 2.8. Var( X ) = E ( X ) − { E ( X )} = 2.8 - 0.64 = 2.16.


2 2 2
2
i

(Dr. K. Gururajan, MCE, Hassan page 8)


A DISCUSSION ON A CONTINUOUS RANDOM VARIABLE
AND IT’S DENSITY FUNCTION:
Consider a continuous random variable, X. Then its probability density is usually given
in the form of a function f ( x) with the following properties.


(i) f ( x ) ≥ 0, (ii) 0 ≤ f ( x ) ≤ 1 and ( iii ) ∫
−∞
f ( x ) dx = 1 .

Using the definition of f ( x ) , it is possible to compute the probabilities of various events


associated with X.
b b

• P (a ≤ X ≤ b) = ∫ f ( x ) dx , P (a < X ≤ b) = ∫ f ( x ) dx
a a

b x

• P (a < X < b) = ∫ f ( x ) dx , F ( x) = P ( X ≤ x) = ∫ f ( x ) dx
a −∞

∞ ∞

• E(X ) = ∫ x ⋅ f ( x ) dx , E( X2) = ∫x
2
⋅ f ( x ) dx
−∞ −∞

Var( X ) = E ( X 2 ) − { E ( X )}
2

• P (a < X < b) = F (b ) − F (a )

dF ( x )
• f ( x) = , if the derivative exists
dx
SOME STANDARD DISTRIBUTIONS OF A DISCRETE RANDOM VARIABLE:
Binomial distribution function: Consider a random experiment having only two
outcomes, say success (S) and failure (F). Suppose that trial is conducted, say, n number
of times. One might be interested in knowing how many number of times success was
achieved. Let p denotes the probability of obtaining a success in a single trial and q
stands for the chance of getting a failure in one attempt implying that p + q = 1. If the
experiment has the following characteristics;

(Dr. K. Gururajan, MCE, Hassan page 9)


• the probability of obtaining failure or success is same for each and every trial
• trials are independent of one another
• probability of having a success is a finite number, then

We say that the problem is based on the binomial distribution. In a problem like this, we
define X as the random variable equals the number of successes obtained in n trials.
Then X takes the values 0, 1, 2, 3 . . . up to n. Therefore, one can view X as a discrete
random variable. Since number of ways of obtaining k successes in n trials may be
 n n!
achieved in   = , therefore, binomial probability function may be formulated
 k  k !( n − k ) !

 n  k n−k
as b(n, p, k ) =   p q .
k
Illustrative examples:
1. It is known that among the 10 telephone lines available in an office, the chance
that any telephone is busy at an instant of time is 0.2. Find the probability that (i)
exactly 3 lines are busy, (ii) What is the most probable number of busy lines and
compute its probability, and (iii) What is the probability that all the telephones are
busy?
Solution:
Here, the experiment about finding the number of busy telephone lines at an instant of
time. Let X denotes the number of telephones which are active at a point of time, as there
are n = 10 telephones available; clearly X takes the values right from 0 up to 10. Let p
denotes the chance of a telephone being busy, then it is given that p = 0.2, a finite value.
The chance that a telephone line is free is q = 0.8. Since a telephone line being free or
working is independent of one another, and since this value being same for each and
every telephone line, we consider that this problem is based on binomial distribution.
Therefore, the required probability mass function is

(Dr. K. Gururajan, MCE, Hassan page 10)


 10 
• b(10, 0.2, k ) =   ⋅ (0.2) k ⋅ (0.8)(10−k ) Where k = 0, 1, 2 . . . 10.
k 
(i) To find the chance that 3 lines are busy i.e. P[X = 3] =

 10 
b(10, 0.2,3) =   ⋅ (0.2)3 ⋅ (0.8)7
3 
(ii) With p = 0.2, most probable number of busy lines is n ⋅ p = 10 ⋅ 0.2 = 2 . The

 10 
probability of this number equals b(10, 0.2, 2) =   ⋅ (0.2) ⋅ (0.8) .
2 8

2 
(iii) The chance that all the telephone lines are busy = (0.2)10 .
2. The chance that a bomb dropped from an airplane will strike a target is 0.4. 6
bombs are dropped from the airplane. Find the probability that (i) exactly 2 bombs
strike the target? (ii) At least 1 strikes the target. (iii) None of the bombs hits the
target?
Solution: Here, the experiment about finding the number of bombs hitting a target. Let
X denotes the number of bombs hitting a target. As n = 6 bombs are dropped from an
airplane, clearly X takes the values right from 0 up to 6.
Let p denotes the chance that a bomb hits a target, then it is given that p = 0.4, a finite
value. The chance that a telephone line is free is q = 0.6. Since a bomb dropped from
airplane hitting a target or not is an independent event, and the probability of striking a
target is same for all the bombs dropped from the plane, therefore one may consider that
hat this problem is based on binomial distribution. Therefore, the required probability

 10  6−k
mass function is b(10, 0.4, k ) =   ⋅ (0.4) ⋅ (0.8) .
k

k
 
(i) To find the chance that exactly 2 bombs hits a target,
 10 
i.e. P[X = 2] = b(10, 0.4, 2) =   ⋅ (0.4) ⋅ (0.8)
2 4

2 

(Dr. K. Gururajan, MCE, Hassan page 11)


(ii) Next to find the chance of the event, namely, at least 1 bomb hitting the target; i.e.

P[ X ≥ 1] = 1 − P[ X < 1] = 1 − P[ X = 0] = 1 − (0.6)6 .
(iii) The chance that none of the bombs are going to hit the target is P[X=0] = (0.6)6 .

A discussion on Mean and Variance of Binomial Distribution Function


Let X be a discrete random variable following a binomial distribution function with the

 n  k n−k
probability mass function given by b(n, p, k ) =   p q . Consider the expectation of
k
X, namely,
k =n
 n
E ( X ) = ∑ k ⋅   p k q n− k
k =0 k
k =n
n!
= ∑k⋅ pk q n−k
k =0 k !( n − k ) !
k =n
n(n − 1)!
=∑ pp k −1q ( n−1+1− k )
k = 0 ( k − 1)!( n − 1 + 1 − k ) !

k =n
( n − 1)!
= np ⋅ ∑ p k −1q[( n−1− ( k −1)]
k = 0 ( k − 1)![( n − 1)!− ( k − 1)!]

k =n
( n − 1)!
= np ⋅ ∑ p k −1q[( n−1− ( k −1)]
k =1 ( k − 1)![( n − 1)!− ( k − 1)!]

k =n
 n − 1  k −1 [( n−1− ( k −1)]
= np∑  p q
k = 2  k − 1

= np ⋅ ( p + q) n −1
= np as p + q = 1
Thus, expected value of binomial distribution function is np .

(Dr. K. Gururajan, MCE, Hassan page 12)


To find variance of X, consider
k =n
 n
E ( X 2 ) = ∑ k 2 ⋅   pk q n−k
k =0 k
k =n
 n
= ∑ k (k − 1 + 1) ⋅   p k q n− k
k =0 k
k =n
n! k=n
 n
= ∑ k (k − 1) p k q n− k + ∑ k ⋅   pk qn− k
k =0 k !( n − k ) ! k =0 k
k =n
n(n − 1)(n − 2)!
=∑ p 2 p k − 2 q[( n− 2− ( k − 2)] + E ( X )
k = 0 ( k − 2)![( n − 2)!− ( k − 2)!]

k =n
(n − 2)!
= n(n − 1) p 2 ∑ p k −2 q[( n −2 −( k −2)] + np
k = 0 ( k − 2)![( n − 2)!− ( k − 2)!]

k =n
(n − 2)!
= n(n − 1) p 2 ∑ p k −2 q[( n −2 −( k −2)] + np
k =2 ( k − 2)![( n − 2)!− ( k − 2)!]
k =n
 n − 2  k −2 [( n− 2 −( k −2)]
= n(n − 1) p 2 ∑  p q + np
k =2  k − 2 

= n(n − 1) p 2 ( p + q ) n− 2 + np . Since p +q = 1, it follows that

= n(n − 1) p 2 + np

Therefore, Var( X ) = E ( X ) - { E ( X )}
2 2

= n(n − 1) p 2 + np − ( np )
2

= n2 p 2 − np2 + np − n2 p2

= np − np 2 = np(1 − p) = npq . Hence, standard deviation of

binomially distributed random variable is σ = Var( X ) = npq .

(Dr. K. Gururajan, MCE, Hassan page 13)


A DISCUSSION ON POISSON DISTRIBUTION FUNCTION

This is a limiting case of the binomial distribution function. It is obtained by considering


that the number of trials conducted is large and the probability of achieving a success in a
single trial is very small i.e. here n is large and p is a small value. Therefore, Poisson
distribution may be derived on the assumption that n → ∞ and p → 0 . It is found that
Poisson distribution function is
e−λ λ k
p (λ , k ) = . Here, λ = np and k = 0, 1, 2, 3, . . . . ∞ .
k!
Expectation and Variance of a Poisson distribution function
k =∞ k =∞
e−λ λ k
Consider E ( X ) = ∑ k ⋅ p( λ , k ) = ∑ k ⋅
k =0 k!
k =0

k =∞
e − λ λλ k −1
= ∑
k = 0 ( k − 1)!

k =∞
λ k −1 k =∞
λ k −1
= λ ⋅e −λ
⋅∑ . But ∑ = e λ , therefore it follows that for
k =1 ( k − 1)! k =1 ( k − 1)!

a Poisson distribution function, E ( X ) = λ . Next to find Variance of X, first consider


k =∞
E ( X 2 ) = ∑ k 2 ⋅ p (λ , k )
k =0

k =∞
e−λ λ k
= ∑ k2 ⋅
k =0 k!
k =∞
e−λ λ k
= ∑ k (k − 1 + 1) ⋅
k =0 k!
k =∞
e − λ λ k k =∞ e − λ λ k
= ∑ k (k − 1)
k =0 k!
+∑ k
k =0 k!
k =∞
e−λ λ k
= ∑ k (k − 1)
k =0 k!
+E ( X )

(Dr. K. Gururajan, MCE, Hassan page 14)


k =∞
λ k−2
= ∑λ
k =0
2 −λ
e
(k − 2)!

k =∞
λ k −2
= λ 2e − λ ∑ +λ
k = 2 ( k − 2)!

= λ 2 e − λ e λ + λ . Thus, E ( X ) = λ + λ . Hence, Variance of the Poisson


2 2

distribution function is Var( X ) = E ( X ) - { E ( X )} = λ .


2 2
The standard deviation is

σ = Var( X ) = λ

Illustrative Examples:
It is known that the chance of an error in the transmission of a message through a
communication channel is 0.002. 1000 messages are sent through the channel; find
the probability that at least 3 messages will be received incorrectly.
Solution: Here, the random experiment consists of finding an error in the transmission
of a message. It is given that n = 1000 messages are sent, a very large number, if p
denote the probability of error in the transmission, we have p = 0.002, relatively a small
number, therefore, this problem may be viewed as Poisson oriented. Thus, average
number of messages with an error is λ = np = 2 . Therefore, required probability function

e −2 2 k
is .= p(2, k ) = , k = 0, 1, 2, 3, . . . ∞ . Here, the problem is about finding the
k!
probability of the event, namely,
P ( X ≥ 3) = 1 − P ( X < 3) = 1 − {P[ X = 0] + P[ X = 1] + P[ X = 2]}

 k = 2 e −2 2k 
= 1 − ∑ 
 k =0 k ! 

= 1 − e −2 { 1 + 2 + 2} = 1 − 5e−2

(Dr. K. Gururajan, MCE, Hassan page 15)

2. A car hire –firm has two cars which it hires out on a day to day basis. The
number of demands for a car is known to be Poisson distributed with mean 1.5.
Find the proportion of days on which (i) There is no demand for the car and (ii) The
demand is rejected.
Solution: Here, let us consider that random variable X as the number of persons or
demands for a car to be hired. Then X assumes the values 0, 1, 2, 3. … . . . It is given
that problem follows a Poisson distribution with mean, λ = 1.5 . Thus, required probability

e −1.5 (1.5) k
mass function may be written as p(1.5, k ) = .
k!
(i) Solution to I problem consists of finding the probability of the event, namely
P[X = 0] = e −1.5 .
(ii) The demand for a car will have to be rejected, when 3 or more persons approaches the
firm seeking a car on hire. Thus, to find the probability of the event P[ X ≥ 3]. Hence,

 (1.5) 2 
P[ X ≥ 3] = 1 − P{ X < 3] = 1 − P[ X = 0,1, 2] = e −1.5  1 + 1.5 + .
 2 

Illustrative examples based on Continuous Random Variable and it’s


Probability Density Function
o
Suppose that the error in the reaction temperature, in C, for a
controlled laboratory experiment is a R.V. X having the p.d.f

 x2
 , −1 < x < 2
f ( x) =  3
 0 elsewhere.

Find (i) F(x) and (ii) use it to evaluate P (0<X≤ 1).

(Dr. K. Gururajan, MCE, Hassan page 16)


x

Solution: Consider F ( x ) = P ( X ≤ x ) = ∫
−∞
f ( t )dt
x x

Case (i) x ≤ -1 F ( x) = ∫
−∞
f ( t )dt = ∫ 0dt = 0
−∞

Case (ii) -1< x < 2


x −1 x x x
t2 t3 x3 + 1 .
F ( x) = ∫
−∞
f ( t )dt = ∫
−∞
f ( t )dt + ∫
−1
f ( t )dt = 0 + ∫ dt =
−1
3 9
=
9
−1

x −1 2 x
Case (iii) x = 2 F ( x ) = ∫
−∞
f ( t )dt = ∫
−∞
f ( t )dt + ∫ f ( t )dt + ∫ f ( t )dt
−1 2

2 2
t2 t3 8+1
= 0 + ∫ dt + 0 = = = 1 . Therefore,
−1
3 9 −1
9
 0, x ≤ −1
 3
 x +1
F ( x) =  , −1 < x < 2.
 9
 1, x ≥ 2.

 2kxe − x , for x > 0


2

2. If the p.d.f of a R.V. X having is given by f ( x ) = 


 0, for x ≤ 0.

Find (a) the value of k and (b) distribution function F(X) for X.

∫ 2kxe
− x2
WKT dx = 1
0

∫ ke
−t
⇒ dt = 1(put x 2 = t )
0


⇒ ke − t =1
0

⇒ (0 + k ) = 1 ⇒ k = 1

(Dr. K. Gururajan, MCE, Hassan page 17)


x
F ( x) = P( X ≤ x) = ∫
−∞
f ( t )dt = 0, if x ≤ 0

0 x
= ∫
−∞
f ( t )dt + ∫ f ( t )dt , if x > 0
0

= 0 + ∫ 2te − t dt = ( − e − z )0x = (1 − e − x ) .
2 2 2

1 − e − x , for x ≥ 0
2

F ( x) = 
 0, otherwise.
3. Find the C.D.F of the R.V. whose P.D.F is given by
 x
 2 , for 0<x ≤ 1

 1 , for 1<x ≤ 2
f ( x) =  2
3− x
 , for 2<x ≤ 3
 2
 0, otherwise
x 0

Solution: Case (i) x ≤ 0 F ( x ) = ∫


−∞
f ( t )dt = ∫ 0dt = 0
−∞
x 0 x
t x2
Case (ii) 0 < x ≤ 1 F ( x) = ∫
−∞
f ( t )dt = ∫
−∞
0dt + ∫0 2 dt =
4

0 1 x

Case (iii) 1 < x ≤ 2 F ( x) = ∫


−∞
f ( t )dt + ∫ f ( t )dt + ∫ f ( t )dt
0 1

1 x
t 1 2x − 1
= 0 + ∫ dt + ∫ dt =
0
2 1
2 4
0 1 2 x

Case (iv) 2 < x ≤ 3 F ( x ) = ∫


−∞
f ( t )dt + ∫ f ( t )dt + ∫ f ( t )dt + ∫ f ( t )dt
0 1 2

(Dr. K. Gururajan, MCE, Hassan page 18)


6x − x2 − 5
F ( x) =
4
Case (v) for x >3, F(x) = 1. Therefore,

 0, if x ≤ 0
 2
 x , if 0<x ≤ 1
 4
 2 x − 1
F ( x) =  , if 1<x ≤ 2
 4
 6x − x2 − 5
 , if 2<x ≤ 3
 4
 1, if x>3
4. The trouble shooting of an I.C. is a R.V. X whose distribution
 0, for x ≤ 3

function is given by F ( x) =  9
1− 2 , for x > 3.
 x

If X denotes the number of years, find the probability that the I.C. will
work properly
(a) less than 8 years
(b) beyond 8 years
(c) anywhere from 5 to 7 years
(d) Anywhere from 2 to 5 years.

x  0, for x ≤ 3

Solution: We have F ( x ) = ∫ f ( t )dt =  9
0 1 − x 2 , for x > 3.
8
9
For (a): P ( x ≤ 8) = ∫ f ( t )dt = 1 − 2 = 0.8594
0
8

For Case (b): P(x > 8) = 1 – P(x≤ 8) = 0.1406

(Dr. K. Gururajan, MCE, Hassan page 19)


2 2
For Case (c): P (5≤ x≤ 7) = F (7) – F (5) = (1-9/7 ) – (1-9/5 ) = 0.1763

2
For Case (d): P (2≤ x≤ 5) = F (5) – F (2) = (1-9/5 ) – (0) = 0.64

5. A continuous R.V. X has the distribution function is given by


 0, x≤1

F ( x ) =  c( x − 1)4 , 1 ≤ x ≤ 3
 1, x > 3.

Find c and the probability density function.

d
Solution: We know that f ( x ) = [ F ( x)]
dx
 0, x≤1

∴ f ( x ) =  4c( x − 1) , 1 ≤ x ≤ 3
3

 0, x > 3.

 4c( x − 1)3 , 1 ≤ x ≤ 3
∴ f ( x) = 
 0, otherwise

Since we must have ∫ f ( x )dx = 1,


−∞

3
− 3 dx =1 ⇒  c ( x −1)4  3 = 1
∫ 4 c ( x 1)   1
1
1
⇒16c =1 ∴c =
16
Using this, one can give the probability function just by substituting the value of c
above.

(Dr. K. Gururajan, MCE, Hassan page 20)

A discussion on some standard distribution functions of continuously


distributed random variable:

This distribution, sometimes called the negative exponential distribution, occurs in


applications such as reliability theory and queuing theory. Reasons for its use include its
memory less (Markov) property (and resulting analytical tractability) and its relation to
the (discrete) Poisson distribution. Thus, the following random variables may be
modeled as exponential:
• Time between two successive job arrivals to a computing center (often called
inter-arrival time)
• Service time at a server in a queuing network; the server could be a resource such
as CPU, I/O device, or a communication channel
• Time to failure of a component i.e. life time of a component
• Time required repairing a component that has malfunctioned.
 − λ x x >0,
λe
The exponential distribution function is given by, f ( x) = 
 0, otherwise.

x
The probability distribution function may be written as F ( x ) = ∫ f ( x )dx which may be
−∞


1− e −λx , if 0 < x < ∞
computed as F ( x ) =  .
 0 , otherwise.

(Dr. K. Gururajan, MCE, Hassan page 21)


Mean and Variance of Exponential distribution function
∞ ∞
−λx dx
Consider mean ( µ ) = ∫ x⋅ f ( x )dx = ∫ x⋅λ e
−∞ 0


  −λx   e −λ x  
e 1  1
= λ  x⋅  −1⋅  = - λ  0−  =
  −λ   −λ 2   λ 2  λ
    0

( )

Consider E X 2 = ∫ x 2 ⋅ f ( x )dx = ∫ x 2 ⋅λe −λx dx
−∞ 0


  −λx   e −λx   e −λx  2
= λ  x2 e − 2 x  + 2  =
  −λ 
  
 −λ 2   −λ 3
  

 0 λ2

( )
Var ( X ) = E X 2 - { E ( X )}
2= 1
λ2
.
1
The standard deviation is σ = Var( X ) = .
λ

Illustrative examples based on Exponential distribution


function
1. The duration of telephone conservation has been found to have an
exponential distribution with mean 2 minutes. Find the probabilities
that the conservation may last (i) more than 3 minutes, (ii) less than 4
minutes and (iii) between 3 and 5 minutes.
Solution: Let X denotes the random variable equals number of minute’s conversation
may last. It is given that X is exponentially distributed with mean 3 minutes. Since for

1 1
an exponential distribution function, mean is known to be , so = 2 or λ =0.5 . The
λ λ

(Dr. K. Gururajan, MCE, Hassan page 22)



0.5 e −0.5 x , if x > 0 ,
Probability density function can now be written as f ( x ) =  .
 0 , otherwise.

(i) To find the probability of the event, namely,


3
P [ X > 3] = 1 − P [ X ≤ 3] = 1 − ∫ 0.5 e −0.5 x dx
0
4
(ii) To find the probability of the event, namely P [ X < 4] = ∫ 0.5e −0.5 x dx .
0
5
(iii) To find the probability of the event P [3 < X < 5] = ∫ 0.5e −0.5 x dx .
3
2. in a town, the duration of a rain is exponentially distributed with
mean equal to 5 minutes. What is the probability that (i) the rain will
last not more than 10 minutes (ii) between 4 and 7 minutes and (iii)
between 5 and 8 minutes?
Solution: An identical problem to the previous one. Thus, may be
solved on similar lines.

Discussion on Gaussian or Normal Distribution Function

Among all the distribution of a continuous random variable, the most popular and widely
used one is normal distribution function. Most of the work in correlation and regression
analysis, testing of hypothesis, has been done based on the assumption that problem
follows a normal distribution function or just everything normal. Also, this distribution
is extremely important in statistical applications because of the central limit theorem,
which states that under very general assumptions, the mean of a sample of n mutually

(Dr. K. Gururajan, MCE, Hassan page 23)


Independent random variables (having finite mean and variance) are normally distributed
in the limit n → ∞ . It has been observed that errors of measurement often possess this
distribution. Experience also shows that during the wear – out phase, component life time
follows a normal distribution. The purpose of today’s lecture is to have a detailed
discussion on the same.

The normal density function has well known bell shaped curve which will be shown on

2
−1 x − µ 
1  
the board and it may be given as f ( x) = e2 σ 
, -∞ < x < ∞ where
σ 2π

−∞ < µ < ∞ and σ > 0 . It will be shown that µ and σ are respectively denotes mean

and variance of the normal distribution. As the probability or cumulative distribution

function, namely, F ( x) = P ( X ≤ x) = ∫ f ( x) dx has no closed form, evaluation of integral


−∞
in an interval is difficult. Therefore, results relating to probabilities are computed

numerically and recorded in special table called normal distribution table. However, It

pertain to the standard normal distribution function by choosing µ and σ and their

z
1 −t 2
entries are values of the function, Fz ( z ) =
2π ∫
−∞
e 2
dt. Since the standard

normal distribution is symmetric, it can be shown that

−z
1
Fz ( − z ) =


−∞
f (t ) dt =1 - F ( z ) .
z

(Dr. K. Gururajan, MCE, Hassan page 24)

Thus, tabulations are done for positive values of z only. From this it is clear that
Normal distribution table, please refer table 3, in page number 591, Probability and
Statistics, Reliability, Queuing and Computer Science Applications” by K. S.
Trivedi, a PHI Publications. It is clear that
• P ( a ≤ X ≤ b ) = F (b ) - F ( a )

• P ( a < X < b ) = F (b ) - F ( a )

• P( a < X ) = 1 − P ( X ≤ a)= 1 − F (a )

Note: Let X be a normally distributed random variable taking a particular value, x, the
x−µ
corresponding value of the standardized variable is given by z = . Hence,
σ
F ( x ) = P ( X ≤ x ) = Fz  x − µ  .
 σ 

Illustrative Examples based on Normal Distribution function:


1. In a test on 2000 electric bulbs, it was found that the life of a particular make was
normally distributed with an average life of 2040 hours and standard deviation of 60
hours. Estimate the number of bulbs likely to burn for (a) more than 2150 hours,
(b) less than 1940 hours and (c) more than 1920 hours and but less than 2060 hours.
Solution:
Here, the experiment consists of finding the life of electric bulbs of a particular make
(measured in hours) from a lot of 2000 bulbs. Let X denotes the random variable equals
the life of an electric bulb measured in hours. It is given that X follows normal

distribution with mean µ = 2040 hours and σ = 60 hours .

First to calculate P ( X > 2150 hours) = 1 − P ( X ≤ 2150)

= 1 − Fz ( 1.8333) = 1 − 0.9664 = 0.0336

Therefore, number of electrical bulbs with life expectancy more than 2150 hours is
0.0336 × 2000 ≈ 67 .

(Dr. K. Gururajan, MCE, Hassan page 25)


 1950 − 2040 
Next to compute the probability of the event; P ( X < 1950 hours)=Fz  
 60 

=F ( −1.5 ) = 1 − F (1.5) = 1 − 0.9332 = 0.0668


z z

Therefore, in a lot of 2000 bulbs, number of bulbs with life expectancy less than 1950
hours is 0.0668 * 2000 = 134 bulbs.
Finally, to find the probability of the event, namely,
P (1920 < X < 2060) = F (2060) − F (1920)

 2060 − 2040   1920 − 2040 


=F   − Fz  
z 60   60 

= F ( 0.3333) − F ( −2 )
z z

= F ( 0.3333) − 1 + F ( 2 )
z z
= 0.6293 − 1 + 0.9774 = 0.6065 .

Therefore, number of bulbs having life any where in between 1920 hours and 2060 hours
is 0.6065 * 2000 = 1213.
2. Assume that the reduction of a person’s oxygen consumption during

a period of Transcendenta Meditation (T.M.) is a continuous random


variable X normally distributed with mean 37.6 cc/min and S.D. 4.6
cc/min. Determine the probability that during a period of T.M. a
person’s oxygen consumption will be reduced by (a) at least 44.5 cc/min
(b) at most 35.0 cc/min and (c) anywhere from 30.0 to 40.0 cc/min.

Solution: Here, X a random variable is given to be following normal distribution


function with mean .P µ = 37.6 and σ = 4.6 . Let us consider that X as the random
equals the rejection of oxygen consumption during T M period and measured in cc/min.

(Dr. K. Gururajan, MCE, Hassan page 26)


(i) To find the probability of the event P[ X ≥ 44.5] = 1 − F (44.5)

 44.5 − 37.6 
= 1 − Fz  
 4.6 
= 1 − Fz ( 1.5 )

= 1 − 0.9332 = 0.0668 .

(ii) To find the probability of the event, P[ X ≤ 35.0] = F (33.5)

 35.0 − 37.6 
= Fz  
 4.6 

= Fz ( −0.5652 )

= 1 − Fz ( 0.5652 )

= 1 − 0.7123 = 0.2877 .

(iii) Consider the probability of the event P[30.0 < X < 40.0]
= F (40) − F (30)

 40 − 37.6   30 − 37.6 
= Fz   − Fz  
 4.6   4.6 
= Fz (0.5217) − Fz ( −1.6522)
= 0.6985 − 1 + 0.9505 = 0.6490

3. An analog signal received at a detector (measured in micro volts)


may be modeled as a Gaussian random variable N (200, 256) at a fixed
point in time. What is the probability that the signal will exceed 240
micro volts? What is the probability that the signal is larger than 240
micro volts, given that it is larger than 210 micro volts?

(Dr. K. Gururajan, MCE, Hassan page 27)


Solution: Let X be a CRV denotes the signal as detected by a detector in terms of micro
volts. Given that X is normally distributed with mean 200 micro volts and variance 256
micro volts. To find the probability of the events, namely, (i) P (X > 240 micro volts] and
(ii) P[X > 240 micro volts | X > 210 micro volts].

Consider P[ X > 240] = 1 − P[ X ≤ 240]

= 1 − F (240)

 240 − 200 
= 1 − Fz  
 16 

= 1 − Fz ( 2.5 )

= 1 – 0.9938
= 0.00621

Next consider P[X > 240 | X > 210]

P[ X > 240 and X > 210]


=
P[ X > 210]
P[ X > 240 ] 1 − P[ X ≤ 240 ]
= =
P[ X > 210] 1 − P[ X ≤ 210]

 240 − 200 
1 − Fz  
 16 1 − Fz (2.5)
= =
 210 − 200  1 − Fz (0.625)
1 − Fz  
 16
1 − 0.9939
= = 0.2335
1 − 0.73401

(Dr. K. Gururajan, MCE, Hassan page 28)


Author: Dr. K. Gururajan
Assistant Professor
Department of Mathematics
Malnad College of Engineering, Hassan – 573 201

UNIT 8:

Jointly Distributed Random Variables

Introduction: So far the study was restricted to one dimensional random variable,
distribution function, and other related aspects. However, in real world, one come
across a number of situations where we do find the presence of two or correlated random
variables. For example, consider the experiment of finding how far e - learning
programme initiated by VTU Belgaum has become popular among the engineering
students? To find this say, authorities collect feed back from the students by visiting their
institutions. Let the problem be about finding the opinion of students regarding two
parameters; (i) quality of transmission from studio situated at Bangalore which we call it
as X and (ii) student’s interest in this kind of programs which we shall refer it to as Y.
For convenience of discussion, authorities visit seven colleges located at different parts of
the state and results are in the following table. We assume that these are given in terms of
percentages.

Engg. PGA SSIT BVB GSSIT AIT SBMJCE KLE


Colleges
X X1 x2 x3 x4 x5 x6 x7

Y y1 y2 y3 y4 y5 y6 y7

In problems like this, we/authorities are certainly interested to learn the mood of the
students/teachers about the e – learning programme initiated by us of course with huge
cost. It is known to you that one satellite channel has been completely dedicated for this
purpose in India. Many people are involved in this programme to reach the un – reached
and needy.

One comes across many illustrative examples like that. Therefore, there is a necessity to
extend the study beyond single random variable.

This chapter is devoted to a discussion on jointly related variables, their distribution


functions and other important characteristics. First we shall have a discussion on discrete
case.

(Dr. K. Gururajan, MCE, Hassan page 1)


Consider a random experiment and let S denotes its sample space. Let X and Y be two
discrete random variables defined on S. Let the image set of these be
X : x1 x2 x3 . . . xm
Y: y1 y2 y3 . . . yn

Suppose that there exists a correlation between the random variables X and Y. Then X
and Y are jointly related/distributed variables Also, note that X and Y together assumes
values. The same can be shown by means of a matrix or a table.

Y y1 y2 y3 . . . . yn
X
x1 ( x1 , y1 ) ( x1 , y2 ) ( x1 , y3 ) .. . . ( x1 , yn )
x2 ( x2 , y1 ) ( x2 , y2 ) ( x 2 , y3 ) . . . . ( x 2 , yn )
x3 ( x3 , y1 ) ( x 3 , y2 ) ( x 3 , y3 ) . . . . ( x 3 , yn )
. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

xm ( xm , y1 ) ( xm , y2 ) ( x m , y3 ) . . . . ( xm , yn )

Joint Probability Function/Joint probability mass function:

The probability of the event  X = xi , Y = y j  is called joint probability function,


denoted by h ( xi , y j ) = P  X = xi , Y = y j  . Here, i take the values from 1 to m and j
assumes the values right from 1 to n. The function h ( xi , y j ) has the following
properties:

1. h ( xi , y j ) ≥ 0

2. 0 ≤ h ( xi , y j ) ≤ 1
3. ∑∑ h ( x , y ) = 1
i j
i j

(Dr. K. Gururajan, MCE, Hassan page 2)


Note: One caution with discrete random variables is that probabilities of events must be
calculated individually. From the preceding sections, it is clear that in the current
problem, there totally m ⋅ n events. Thus, it is necessary to compute the probability of
each and every event. This can also be shown by means of table.

Y y1 y2 y3 . . . . yn
X
x1 h ( x1 , y1 ) h ( x1 , y2 ) h ( x1 , y3 ) .. . . h ( x1 , yn )
x2 h ( x2 , y1 ) h ( x2 , y2 ) h ( x2 , y3 ) . . . . h ( x 2 , yn )

x3 h ( x3 , y1 ) h ( x3 , y2 ) h ( x3 , y3 ) . . . . h ( x 3 , yn )

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

xm h ( xm , y1 ) h ( xm , y2 ) h ( xm , y3 ) . . . . h ( x m , yn )

Note: When the problem is based on discrete random variables, it is


necessary to compute the probability and each and every event
separately.

Illustrative examples:

A fair coin is tossed 3 times. Let X denote the random variable equals to 0 or 1
accordingly as a head or a tail occurs on the first toss, and let Y be the random
variable representing the total number of heads that occurs. Find the joint
distribution function of (X, Y).

Solution: S = {HHT, HHT, HTH, THH, THT, TTH, HTT, TTT}. Thus, |S| = 8.
Here, X takes the values 0 or 1 accordingly as a H appears on the I toss or a Tail appears
on the I toss, while Y takes the values 0, 1, 2, 3 where these numbers represent the
number of heads appearing in the experiment. Observe that joint variables(X, Y) assume
eight values. Thus, there are (0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3) –
totally 8 events. Thus, we need to find the probabilities of all these 8 events. First we
shall list the respective events corresponding to X and Y.

(Dr. K. Gururajan, MCE, Hassan page 3)

• [X = 0] = {HHH, HHT, HTH, HTT},


• [X = 1] = {THH, TTH, THT, TTT}

• [Y = 0] = {TTT},

• [Y = 1] = {HTT, HTH, TTH],

• [Y = 2] = {HHT, HTH, THH}

• [Y = 3] = {HHH}

Therefore, [X = 0, Y = 0] = { }, a null event, hence P[ X = 0, Y = 0] = h(0, 0) = 0 .


Similarly, [ X = 0, Y = 1] = {HTT}, so P[ X = 0, Y = 1] = h(0, 1) = 1 8 . Note that
[ X = 0, Y = 2] = {HHT, HTH}, thus P[ X = 0, Y = 2] = h(0, 2) = 2 . Another example,
8
consider the event [X = 1, Y = 2] = {THH} implying that P[ X = 1, Y = 2] = h(1, 2) = 1 8 .
Continuing like this, one can compute the probabilities of all the events. The results are
shown in the form of the following table;

Y 0 1 2 3

X
0 h(0, 0) = 0 h(0, 1) = 1 h(0, 2) = 2 h(0, 3) = 1
8 8 8
1 h(1, 0) = 1 h(1, 1) = 2 h(1, 2) = 1 h(1, 3) = 0
8 8 8

Two cards are selected at random from a box which contains 5 cards numbered 1, 1,
2, 2, and 3. Let X denote the sum selected, and Y the maximum of two numbers
drawn. Determine the joint probability function of X and Y.

Solution: It is known that 2 cards can be selected from the available 5 in C (5, 2) = 10

ways. With cards being numbered as 1, 1, 2, 2, and 3, clearly, S = {(1, 1), (1, 2), (1, 2),
(1, 2), (1, 2), (1, 3), (1, 3), (2, 2), (2, 3), (2, 3)}. As X denote the sum of numbered
chosen, X takes the values 2, 3, 4, and 5. Y is defined as the maximum of the two
numbers, so Y takes the values 1, 2, 3. Therefore, (X, Y) assumes totally 12 values. It
can be shown as
(Dr. K. Gururajan, MCE, Hassan page 4)
1 2 3
2 (2, 1) (2, 2) (2, 3)
3 (3, 1) (3, 2) (3, 2)
X
4 (4, 1) (4, 2) (4, 3)
5 (5, 1) (5, 2) (5, 3)
Let h(x, y) denotes the joint probability function. Now, [X = 2] = {(1, 1)}, [Y = 1] =
{(1, 1)}, therefore, h(2, 1) = 1/10 = 0.1; Observe that [Y = 2] = {(1, 2), (1, 2), (1, 2), (1,
2), (2, 2)}, thus, [X = 2, Y = 2] = { }, so h(2, 2) = 0.0, a similar argument will show that
h(2, 3) = 0.0 since [y = 3] = {(1, 3), (1, 3), (2, 3), ( 2, 3)}. Next, [X = 3] = {(1, 2), (1, 2),
(1, 2), (1, 2)}, clearly, [X = 3, Y = 1] = { }, so h (3, 1) = 0.0, [X = 3, Y = 2] = {(1, 2), (1,
2), (1, 2), (1, 2)}, thus, h(3, 2) = 4/10 = 0.4. However, h (3, 3) = 0.0. This is because, [Y
= 3] = {(1, 3), (1, 3), (2, 3), (2, 3) and nothing is common between the events [X = 3] and
[Y = 3]. By following above arguments, it may be seen that h (4, 1) = 0, h (4, 2) = 0.1, h
(4, 3) = 0.2, h (5, 1) = 0.0, h (5, 2) = 0.0 and h (5, 3) = 0.2. Thus, the joint distribution
function of X and Y may be given as

Y 1 2 3

2 0.1 0.0 0.0


3 0.0 0.4 0.0
X
4 0.0 0.1 0.2

5 0.0 0.0 0.2

The joint probability distribution function may be written as

x = xt y = y u
H ( xt , yu ) = P[ X ≤ xt , Y ≤ yu ] = ∑ ∑ h( x, y ) .
x = x1 y = y1
The expectation of X and Y is

i =m j =n
E ( XY ) = ∑∑ ( xi ⋅ y j ) ⋅ h ( xi , y j ) . From the joint probability mass function, h(x, y) it
i =1 j =1

is possible to obtain distribution functions of X and Y. These are called as marginal


distribution functions. The distribution of X may be obtained by adding all the
probabilities row wise. Similarly, Y’s distribution function is determined by summing
the probabilities column wise. For example, consider the joint probability function h (x,
y) as given in the table

(Dr. K. Gururajan, MCE, Hassan Y page 5)

Y 0 1 2 3

X
0 h(0, 0) = 0 h(0, 1) = 1 h(0, 2) = 2 h(0, 3) = 1
8 8 8
1 h(1, 0) = 1 h(1, 1) = 2 h(1, 2) = 1 h(1, 3) = 0
8 8 8

The distribution function of X is got by adding the probabilities row wise. Thus,

xi : 0 1
1 1
f ( xi ) :
2 2
and the marginal distribution function of Y is to be obtained by the adding the
probabilities column wise. Therefore,

yi 0 1 2 3
g ( yj ) 1 3 3 1
8 8 8 8

The Co – Variance of X and Y is given as Cov( X , Y ) = E ( XY ) − E ( X ) ⋅ E (Y ) . The


Cov( X , Y )
regression coefficient between X and Y can be written as ρ ( x , y ) = . Here,
σ x ⋅σ y
σ x and σ y are standard deviation of X and Y series respectively.

ILLUSTRATIVE EXAMPLES:

Consider the joint distribution of X and Y

Y -4 2 7
1 1/8 ¼ 1/8
X
5 2/8 1/8 1/8

Compute E(X), E(Y), E (XY), Covar (X, Y), σ x , σ y and ρ ( x , y ).

Solution: First, we obtain the distribution functions of X and Y. To get the distribution
of X, it is sufficient to add the probabilities row wise. Thus,
(Dr. K. Gururajan, MCE, Hassan page 6)

X 1 5
f ( xi ) 1/2 1/2

E ( X ) = 1 ⋅ (1 / 2) + 5 ⋅ (1 / 2) = 3

E ( X 2 ) = 1 ⋅ (1 / 2) + 25 ⋅ (1 / 2) = 13
Var( X ) = E ( X 2 ) − { E ( X )} = 4 and σ x = 2 .
2

Similarly,

Y -4 2 7

g( yj ) 3/8 3/8 2/8

E (Y ) = −4 ⋅ ( 3 / 8) + 2 ⋅ ( 3 / 8) + 7 ⋅ (2 / 8) = 1.0

E ( Y 2 ) = 16 ⋅ (3 / 8) + 4 ⋅ (3 / 8) + 49 ⋅ (2 / 8) = 39.5

Var(Y ) = E ( Y 2 ) − { E (Y )} = 38.5
2

σ y = 38.5 = 6.2048.

E ( XY ) = ∑∑ x ⋅ y ⋅ h( x , y )
Consider x y = (2)(1)(0.2) + (3)(2)(0.4) + (4)(2)(0.1) + (4)
(3)(0.2) + (5)(3)(0.2) = 8.8. With E(X) = 3, and E(Y) = 1, it follows that

Cov( X ,Y ) 5.8
Cov( X , Y ) = E ( XY ) − E ( X ) ⋅ E (Y ) = 5.8 and ρ ( x , y ) = σ x ⋅σ y
=
( 2.0)⋅( 6.2048)
= 0.4673 . As

Cov( X, Y) is not zero, we conclude that X an Y d are not Independent.

It may be noted that so far the study on probability theory was concentrated on either a
single random variable or a two random variables (correlated variables) defined on the
same sample space, S of some random experiment. It is interesting to see that in a
practical situation, we come across numerous occasions involving a family or a collection

(Dr. K. Gururajan, MCE, Hassan page 7)

of random variables. This is especially true in problems of queuing theory and in


networking. As today’s problems are mainly based on theory of queues, thus, there is a
strong necessity to study the same. Also, this has enormous amount of applications in
engineering and technology. With these in view, we shall consider a brief discussion on
stochastic processes. Among various types of stochastic processes available in literature,
Markov processes have found significant applications in many fields of science and
engineering; therefore, current study will be restricted to this only.

A discussion on Independent Random Variables

Let X and Y be two discrete random variables. One says that X and Y are independent
whenever the joint distribution function is the product of the respective marginal
( )
distribution functions. Equivalently, suppose that f ( xi ) , g y j and h xi , y j denote ( )
respectively, the distribution function of X, Y and that of X and Y, and
( ) ( )
h xi , y j = f ( xi ) ⋅ g y j , then we say that X and Y are independent random variables.

Note: If it is known that X and Y are independent random variables, then it is very easy
to compute the joint distribution function. This may be obtained by just multiplying the
respective probabilities in the corresponding row and column of the table. For example,
consider

X 0 1 2 3
f ( xi ) 0.2 0.2 0.5 0.1

y 3 5 6
( )
g yj 0.2 0.5 0.3

Then, joint distribution function of X and Y may be obtained as follows:

(
h xi , y j ) 3 5 6
0 0.04 0.10 0.06
1 0.04 0.10 0.06
2 0.10 0.25 0.15
3 0.02 0.05 0.03

(Dr. K. Gururajan, MCE, Hassan page 8)

A discussion on Stochastic Process and Queuing Theory

First What is a Stochastic Process?


It is a family of random variables {x (t ) | t ∈T } , defined on a given probability space,
indexed by the parameter, t, where t varies over an Index set, T usually, t is considered
as time parameter. If T = {t1 , t 2 , t 3 . . . } , then one can have a family of random variables
like X ( t1 ) , X ( t2 ) , X ( t3 ) . . . etc. For a particular value of parameter, t, the values
taken by X (t ) are called states. The set of all possible states is referred to as state
space, denoted by I. As it is known that a random variable is a function from the
sample space to the set of all real p ij = pij (n) = P [ xm +n = j | xm = i ] numbers. Thus,
(n )

one can define a stochastic process as a function X ( t , s ) where t ∈T and s ∈I .


Here, we can have many options.

• One can fix t, and vary s.


• t may be varied, but s could be fixed.
• Both can be fixed to some specific values.
• Both t and s may be allowed to vary.
When both s and t are varied, we generate a family of random variables constituting a
stochastic process.

Type of stochastic processes:

1. If the state space I and index set T of a stochastic process is discrete, then it is called
Discrete – state – discrete – parameter (time) process.
2. On the other hand, if state space is continuous, and index set T is discrete, then we
have a continuous – state – discrete – parameter process.
3. Similarly, one have discrete state – continuous parameter process and
4 Continuous state – continuous parameter process.

Theory of queues provides a number of examples of stochastic processes. Among the


various processes, Markov process is seen to be more useful.

Markov Process (Memory less process):

A stochastic process {x (t ) | t ∈T } is called a Markov process if for any


t 0 < t1 < t 2 < . . . <t n < t The conditional distribution of X (t ) for given values
depends only on X (t n ) ; that is probability of occurrence of an event in future is
completely dependent on the chance of occurrence of the event in the present state but

(Dr. K. Gururajan, MCE, Hassan page 9)

not on the previous or past records. Mathematically, this can be explained as

P  X (t ) ≤ x | X ( t n ) = x n , X ( tn −1 ) = xn −1 , . . . X ( t0 ) = xo 
= P  X (t ) ≤ x | X ( t n ) = x n 

i.e. here, behavior of the stochastic process is such that probability distributions for its
future development depend only the present state and not on how the process arrived in
that state. Also, state space, I is discrete in nature.

Equivalently, in a Markov chain, (a Markov process where state space, I takes discrete
values), the past history is completely summarized in the current state, and, future is
independent of its past but depends only on present state.

First
ur we shall discuss few basic concepts pertaining to Markov chains. A vector
a = ( a1 , a2 , a3 . . . , an ) is called a probability vector if all the components are non–
negative and their sum is 1.

A matrix, A such that each row is a probability vector, then A is called stochastic matrix.
If A and B are stochastic matrices, then AB is a stochastic matrix. In fact, any power of
A is a a stochastic matrix.

A stochastic matrix A is said to be regular if all the entries of A are positive for some
power Am of A where m is a positive integer.

Result 1: Let A be a regular stochastic matrix. Then A has a unique fixed probability
vector, t. i.e. One can find a unique fixed vector t such that t = t ⋅ A .

Result 2: The sequence A, A2 , A3 , . . . of powers of A approaches the matrix T whose


rows are each the fixed point t.

Result 3: If q is any vector, then q ⋅ A, q ⋅ A2 , q ⋅ A3 , . approaches the fixed point t.

Transition Matrix of a Markov Chain:


Consider a Markov chain – a fine stochastic process consisting of a finite sequence of
trials, whose outcomes say, x1 , x 2 , x 3 . . . satisfy the following properties:

(Dr. K. Gururajan, MCE, Hassan – page 10)

Each outcome belongs to the state space, I = {a1 , a2 , a3 . . . a m } . The outcome of any
trial depends, at most, on the outcome of the trial and not on any other previous
outcomes. If the outcome in n th trial is ai then we say that the system is in ai state at
the n th stage. Thus, with each pair of states ( ai , a j ) , we associate a probability value
pij which indicate probability of system reaching the state ai from the state a j in n
steps. These probabilities form a matrix called transition probability matrix or just
transition matrix. This may be written as

 p11 p12 p13 . . . p1 n 


 
 p21 p22 p23 . . . p2 n 
M = . . . . . . . . . . . . . . . . . . 
 
. . . . . . . . . . . . . . . . . . 
p 
 n1 pn 2 pn 3 . . . pnn 

Note: Here, i th row of M represents the probabilities of that system will change from
ai to a1 , a2 , a3 , . . . an . Equivalently, pij = P [ x n = j | xn −1 = i ] .

n – step transition probabilities:

The probability that a Markov chain will move from state I to state j in exactly n – steps
is denoted by p ij = pij (n ) = P [ x m +n = j | xm = i ]
(n )

Evaluation of n–step transition probability matrix

If M is the transition matrix of a Markov chain, then the n – step transition matrix may be
obtained by taking nth power of M. Suppose that a system at time t = 0 is in the state
a = ( a1 , a2 , a3 . . . a n ) where the process begins, then corresponding probability vector
(
a ( 0 ) = a1( 0 ) , a(20) , a3( 0) . . . a(0)
n
) denotes the initial probability distribution. Similarly, the
(n) (n ) (n) (n)
(
step transition probability matrix may be given as a = a1 , a 2 , a3 . . . a n . Now,
(n )
)
the (marginal) probability mass function of the random variable may be obtained
from the nth step transition probabilities and the initial distribution function as follows:
a ( n ) = a ( 0) ⋅ M ( n ) = a( 0) ⋅ M n . Thus, the probability distribution of a homogeneous Markov
chain is completely determined from the one step transition probability matrix M and the
initial probability distribution a (0) .

Note: The same may be explained as

(Dr. K. Gururajan, MCE, Hassan – page 11)

• a ( 1) = a ( 0 ) ⋅ M
• a ( 2 ) = a ( 1) ⋅ M = a ( 0 ) ⋅ M 2

• a ( 3 ) = a ( 2 ) ⋅ M = a( 0 ) ⋅ M 3

Some illustrative examples on Markov chains:

1. Determine which of the following are stochastic matrices?

 1 1 1   3 1   3 1 
 3     - 
3 3 4 4 4 4
(i)   (ii)   (iii)  
 1 1   2 2   2 1 
 0     
 2 2   3 3   3 3 
Solution: (i) is a stochastic matrix as all the entries are non – negative and the sum of all
values in both the rows equals 1. (ii) This is not a stochastic matrix, since the second row
is such that sum exceeding 1 (iii) this is again not a stochastic matrix, because one of the
entry is negative.

2. Determine which of the following are regular stochastic matrices?


 1 1 1   1 1 1 
 2 4 4   2 4 4 
   
(i) A =  0 1 0  (ii) B =  0 0 1 
 1 1   0 1 0 
 0   
 2 2   

Solution: A is not a regular stochastic matrix, as it has a 1 on the main diagonal. B is a


regular stochastic matrix, Compute B 3 , you would notice that all the entries are positive.

3. Find the unique fixed probability vector of the following stochastic matrices.
 3 1  
0 4 4   0 1 0 
1 2    
   1 1   1 1 1
(i) A = 3 3 (ii) =  0
 (iii) A =
  2 2  6 2 3
1 0    2 1 
 0 1 0
 
 0 
   3 3

(Dr. K. Gururajan, MCE, Hassan – page 12)


Solution: Here, to find a unique fixed probability vector t = ( x , y ) such that t = t ⋅ A .
As t is a probability vector, one can take t = ( x , 1 − x ) . Consider the matrix equation,
1 2

(x ,1 − x ) = ( x ,1 − x ) ⋅ 3 3  ; A multiplication of RHS matrices, yields,
 
1 0 
1 2
x = x + (1 − x ) and (1 − x ) = x . Thus, one can find that x = 0.6 , hence the
3 3
required unique fixed probability vector t = (0.6, 0.4) .

(ii) We shall set up t = ( x , y , z ) as the unique fixed probability vector. Again this is a
probability vector, therefore, t = ( x , y , 1 − x − y ) . Now, consider the matrix equation,
 3 1
0 4 4
 
 1 1
(x, y , 1 − x − y ) = (x , y , 1 − x − y ) ⋅ 0
2 2 
 
 0 1 0

 

Multiplying the matrices on the right hand side gives,


1
x= y
2
3 1
y = x + y + (1 − x − y )
4 2
Solving these two equations, one obtains the unique fixed probability vector.

(iii) Here, the unique fixed probability vector may be obtained as t = (0.1, 0.6, 0.3) .

5. A boy’s studying habits are as follows. If he studies one night, he is 70 percent


sure not to study the next night. On the other hand, if he does not study one night,
he is only 60 percent sure not to study the next night as well. In the long run, how
often does the boy studies?

Solution: First we construct transition probability matrix. The problem here is about
whether the boy studies or not on consecutive nights. As his study is given to be
dependent on study in one night or not, therefore, it may be modeled in terms of Markov
chain. Thus, first we construct the required transition probability matrix. The following
table indicates the pattern of the study of the boy:

(Dr. K. Gururajan, MCE, Hassan – page 13)

II night
Transition probability Boy Studying Boy not studying

I night Boy Studying 0.3 0.7


Boy not studying 0.4 0.6

 0.3 0.7 
Therefore, it is clear that required stochastic matrix is M =   . To solve the
 0.4 0.6 
given problem, it is sufficient to compute a unique fixed probability vector, t = ( x , 1 − x )
such that t = t ⋅ M . Using the above, one obtains x = 0.3 x + 0.4(1 − x ) . From this
4
equation, we can calculate x = . Thus, a chance of boy studying in the long run is
11
36.7%.

6. A person’s playing chess game or tennis is as follows: If he plays chess game one
week then he switches to playing tennis the next week with a probability 0.2. On the
other hand, if he plays tennis one week, then there is a probability of 0.7 that he will
play tennis only in the next week as well. In the long run, how often does he play
chess game?

Solution: Like in the previous case, this one too is based on Markov process. Here,
parameters are about a player playing either chess or tennis game. Also, playing the
game in the next week is treated to be dependent on which game player plays in the
previous week. As usual, first we obtain transition probability matrix.

II Week

Transition Player Playing Chess Player Playing Tennis


probabilities
Player Playing
I Week Chess 0.8 0.2
Player Playing
Tennis 0.3 0.7

(Dr. K. Gururajan, MCE, Hassan, page number 14)

 0.8 0.2 
Clearly, the transition probability matrix is M =   . Here, too, the problem is
 0.3 0.7 
to find a unique fixed probability vector, t = ( x , 1 − x ) such that t = t ⋅ M . Consider the
 0.8 0.2 
matrix equation; x 1 - x ) = (x 1- x) ⋅  . A simple multiplication work
 0.3 0.7 
results in x = 0.8 x + 0.7(1 − x ) from which we get x = 0.6 . Hence, we conclude that in
the long run, person playing chess game is about 60%.

7. A sales man S sells in only three cities, A, B, and C. Suppose that S never sells in
the same city on successive days. If S sells in city A, then the next day S sells in the
city B. However, if S sells in either B or C, then the next day S is twice likely to sell
in city A as in the other city. Find out how often, in the long run, S sells in each city.

Solution: First we shall obtain transition probability matrix which will have 3 rows and
3 columns. As a salesman does not sell in a particular city on consecutive days, clearly,
main diagonal is zero. It is given that if S sells in city A on first day, then next day he
will sell in city B, therefore, first row is 0, 1, 0. next, one can consider two cases: (i) S
selling city B or (ii) S selling in city C. It is also given that if S sells in city B with
probability p, then his chances of selling in city A, next day is 2p. There is no way, he
will sell in city C. Thus, we have p + 2p + 0 = 1 implying that p = 1/3. Therefore middle
row of the matrix is 2/3, 1/3, 0. Similarly, if S sells in city C with probability q, then his
chances of selling in city A, next day is 2q. Again, a chance of selling city B is 0. Thus,
last row is 2/3, 0 , 1/3. The probability transition matrix is

Next Day

A B C

A 0 1 0
I day
B 2 0 1
3 3
C 2 1 0
3 3

(Dr. K. Gururajan, MCE, Hassan, page number 15 , 24 – 05 2-008)

0 1 0 

The matrix of the Markov process is M =  2 3 0 1  . As in the previous two
3

2 1 0 
 3 3 
problems, we need to find a unique fixed probability vector, t = ( x , y , z ) such that
0 1 0 

[ x y 1 - x - y ] = [ x y 1 - x - y ] ⋅  2 3 0 13  Or
2 1 0 
 3 3 
x = 2 y + 2 (1 − x − y ) and y = x + 1 (1 − x − y ) . Solving these two equations,
3 3 3
one obtains x = 0.4, y = 0.45 and z = 0.15 . Hence, chances of a sales man selling in
each of the cities is 40%, 45% and 15% respectively.

8. Mary’s gambling luck follows a pattern. If she wins a game, the probability of
winning the next game is 0.6. However, if she loses a game, the probability of losing
the next game is 0.7. There is an even chance that she wins the first game. (a) Find
the transition matrix M of the Markov process. (b) Find the probability that she
wins the second game? (c) Find the probability that she wins the third game? Find
out how often, in the long run, she wins?

10. Each year Rohith trades his car for a new car. If he has a Maruti, he trades it in
for a Santro. If he has a Santro car, then he trades it in for a Ford. However, is he
has a Ford car; he is just as likely to trade it in for a new Ford as to trade it in for a
Maruti or for a Santro. In 1995, he bought his first car which was a Ford.
(a) Find the probability that he has bought (i) a 1997 Buick, (ii) a 1998 Plymouth,
(iii) a 1998 Ford?
(b) Find out how often, in the long run, he will have a Ford?
Definition of various states:

Transient state: A state i is said to be transient (or non – recurrent) if and only if there is
a positive probability that process will not return to this state. For example, if we model
a program as a Markov chain all but the final state will be transient. Otherwise program
ends in an infinite loop.

Recurrent state: A state i is said to be recurrent if and only if process returns to this
state with probability one.

Periodic state: A recurrent state which returns to the state i at regular periods of time.
Absorbing state: A state i is said to be absorbing if and only if pii = 1 . Here, once a
Markov chain enters a state, and it remains there itself.

(Dr. K. Gururajan, MCE, Hassan, page number 16, 24 – 05 2-008)


PLEDGE

I commit to excel, in all I do.


I will apply myself actively to making a difference at
Malnad College of Engineering, Hassan.
I will use every opportunity presented to me by my
superiors from this moment to make that difference.
For myself, for colleagues, and for my students

(Dr. K. Gururajan)
Unit 1: Numerical Methods
Numerical Solution of First Order and First Degree Ordinary
Differential Equations

Motivation:

The fundamental laws of physics, mechanics, electricity and thermodynamics are


usually based on empirical observations that explain variations in physical properties and
states of the systems. Rather than describing the state of physical system directly, the
laws are usually couched in terms of spatial and temporal changes. The following table
gives a few examples of such fundamental laws that are written in terms of the rate of
change of variables (t = time and x = position)

Physical Law Mathematical Expression Variables and Parameters

Newton’s second law of dv F Velocity(v), force (F) and


=
motion dt m mass (M)
Fourier’s Law of Heat dT Heat flux (q), thermal
q = −k
Conduction dx conductivity(k) and
temperature (T)
Faraday’s Law (Voltage
∆VL = L
di Voltage drop ( ∆VL ),
drop across an inductor) dt inductance4 (L) and current
(i)

The above laws define mechanism of change. When combined with continuity laws for
energy, mass or momentum, differential equation arises. The mathematical expression in
the above table is an example of the Conversion of a Fundamental law to an Ordinary
Differential Equation. Subsequent integration of these differential equations results in
mathematical functions that describe the spatial and temporal state of a system in terms of
energy, mass or velocity variations. In fact, such mathematical relationships are the basis
of the solution for a great number of engineering problems. But, many ordinary
differential equations arising in real-world applications and having lot of practical
significance cannot be solved exactly using the classical analytical methods. These ode
can be analyized qualitatively. However, qualitative analysis may not be able to give
accurate answers. A numerical method can be used to get an accurate approximate
solution to a differential equation. There are many programs and packages available for
solving these differential equations. With today's computer, an accurate solution can be
obtained rapidly. In this chapter we focus on basic numerical methods for solving initial
value problems.

Analytical methods, when available, generally enable to find the value of y for all
values of x. Numerical methods, on the other hand, lead to the values of y corresponding
only to some finite set of values of x. That is the solution is obtained as a table of values,
rather than as continuous function. Moreover, analytical solution, if it can be found, is
exact, whereas a numerical solution inevitably involves an error which should be small
but may, if it is not controlled, swamp the true solution. Therefore we must be concerned
with two aspects of numerical solutions of ODEs: both the method itself and its accuracy.

In this chapter some methods for the numerical solution of ODEs are described.

The general form of first order differential equation, in implicit form, is


dy
F ( x, y , y / ) = 0 and in the explicit form is = f ( x, y ) . An Initial Value Problem
dx
(IVP) consists of a differential equation and a condition which the solution much satisfies
(or several conditions referring to the same value of x if the differential equation is of
higher order). In this chapter we shall consider IVPs of the form
dy
= f ( x, y ), y ( x0 ) = y0 . (1)
dx
Assuming f to be such that the problem has a unique solution in some interval containing
x0, we shall discuss the methods for computing numerical values of the solution. These
methods are step-by-step methods. That is, we start from y0 = y ( x0 ) and proceed
stepwise. In the first step, we compute an approximate value y1 of the solution y of (1) at
x = x1 = x0 + h. In the second step we compute an approximate value y2 of the solution y
at x = x2 = x0 + 2h, etc. Here h is fixed number for example 0.1 or 0.001 or 0.5 depends
on the requirement of the problem. In each step the computations are done by the same
formula.

The following methods are used to solve the IVP (1).

1. Taylor’s Series Method


2. Euler and Modified Euler Method
3. Runge – Kutta Method
4. Milne’s Method
5. Adams – Bashforth Method

1. Taylor’s Series Method


dy
Consider an IVP = f ( x, y ), y ( x0 ) = y0 . Let us approximate the exact solution y(x)
dx
to a power series in ( x − x0 ) using Taylor’s series. The Taylor’s series expansion of y(x)
about the point x = x0 is
( x − x0 ) / ( x − x0 ) 2 // ( x − x0 ) 3 /// ( x − x0 ) 4 / V
y ( x) = y ( x0 ) + y ( x0 ) + y ( x0 ) + y ( x0 ) + y ( x0 ) + 
1! 2! 3! 4!
(1)
dy
From the differential equation, we have y / ( x) = = f ( x, y ) . Differentiating this
dx
successively, we can get y // ( x ), y /// ( x), y / V ( x ), etc . Putting x = x0 and y = y 0 , the
// /// /V
values of y ( x 0 ), y ( x 0 ), y ( x 0 ), etc . can be obtained. Hence the Taylor’s series (1)
gives the values of y for every value of x for which (1) converges.

On finding the value of y1 for x = x1 from (1), y // ( x ), y /// ( x), y / V ( x ), etc . can be
evaluated at x = x1 from the differential equation

Problems:

1. Find by Taylor’s series method the value of y at x = 0.1 and 0.2 five places of decimals
dy
for the IVP = x 2 y −1, y ( 0) = 1 .
dx

Solution:

Given x 0 = 0, y 0 = 1 and f ( x, y ) = x 2 y −1

Taylor’s series expansion about the point x = 0( = x0 ) is

( x − 0) / ( x − 0) 2 // ( x − 0) 3 /// ( x − 0) 4 / V
y ( x) = y (0) + y (0) + y ( 0) + y ( 0) + y (0) + 
1! 2! 3! 4!
x 2 // x 3 /// x 4 /V
i.e. y ( x) = y (0) + xy / (0) + y ( 0) + y ( 0) + y (0) + 
2 6 24
(1)

It is given that y (0) =1


dy
= y / ( x ) = x 2 y −1 ⇒⇒⇒ y / (0) = −1
dx

Differentiating y / ( x) = x 2 y −1 successively three times and putting x = 0 & y = 1, we


get

y // ( x ) = 2 xy + x 2 y / ⇒⇒⇒ y // (0) = 0

y /// ( x ) = 2 y + 4 xy / + x 2 y // ⇒⇒⇒ y /// (0) = 2

y iv ( x ) = 6 y / + 6 xy // + x 2 y /// ⇒⇒⇒ y iv (0) = −6

Putting the values of y (0), y / (0), y // (0), y /// (0), y iv (0) in (1), we get

x2 x3 x4
y ( x ) = 1 + x (−1) + ( 0) + ( 2) + ( −6)
2 6 24
x3 x4
y ( x ) =1 − x + −
3 4
Hence y(0.1) = 0.90033 and y(0.2) = 0.80227.
2. Employ Taylor’s series method to obtain approximate value of y at x = 0.1 and 0.2 for
dy
the differential equation = 2 y + 3e x , y (0) = 0. Compare the numerical solution
dx
obtained with the exact solution.

Solution:

Given x0 = 0, y 0 = 0 and f ( x, y ) = 2 y + 3e x

Taylor’s series expansion about the point x = 0 is


x 2 // x 3 /// x 4 /V
y ( x) = y (0) + xy / (0) + y ( 0) + y ( 0) + y (0) + 
2 6 24
(2)

It is given that y (0) = 0


dy
= y / ( x) = 2 y + 3e x ⇒⇒⇒ y / (0) = 2 y (0) + 3e 0 = 3
dx

Differentiating y / ( x) = 2 y + 3e x successively three times and putting x = y = 0, we get

y // ( x) = 2 y / + 3e x ⇒⇒⇒ y // (0) = 2 y / (0) + 3 = 9

y /// ( x) = 2 y // + 3e x ⇒⇒⇒ y /// (0) = 2 y // (0) + 3 = 21

y iv ( x ) = 2 y /// + 3e x ⇒⇒⇒ y iv (0) = 2 y /// (0) + 3 = 45

Putting the values of y (0), y / (0), y // (0), y /// (0), y iv (0) in (2), we get
9 2 21 3 45 4
y ( x) = 0 + 3x + x + x + x
2 6 24
9 7 15 4
= 3x + x 2 + x 3 + x
2 2 8
Hence,

y(0.1) = 3(0.1)+4.5(0.1)2+3.5(0.1)3+1.875(0.1)4

= 0.3486875
and

y(0.2) = 3(0.2)+4.5(0.2)2+3.5(0.2)3+1.875(0.2)4

= 0.8110.
Exact Solution:

dy
The given differential equation can be written as − 2 y = 3e x which is Leibnitz’s linear
dx
differential equation.

Its I.F. is I.F = e −∫2 d x = e −2 x

Therefore the general solution is,

ye −2 x = ∫3e x (e −2 x )dx + c = −3e −x + c

y = −3e x + ce 2 x (3)

Using the given initial condition y = 0 when x = 0 in (3) we get c = 3.

Thus the exact solution is y = 3( e 2 x − e x )

When x = 0.1, the exact solution is y(0.1) = 0.348695

When x = 0.2, the exact solution is y(0.2) = 0.811266

The above solutions are tabulated as follows:

x Numerical Exact Absolute


Error Value

0.1 0.3486875 0.348695 0. 75x10 -5

0.2 0.8110 0.811266 0. 266x10 -3


dy
3. Using Taylor’s series method solve = x 2 − y, y (0) = 1 at 0.1 ≤ x ≤ 0.4. Compare
dx
the values with the exact solution.

Solution:

Given x0 = 0, y 0 = 1 and f ( x, y ) = x 2 − y

Taylor’s series expansion about the point x = 0 is


x 2 // x 3 /// x 4 /V
y ( x) = y (0) + xy / (0) + y ( 0) + y ( 0) + y (0) + 
2 6 24
(4)

It is given that y (0) = 0


dy
= y / ( x) = x 2 − y ⇒⇒⇒ y / (0) = (0) 2 −1 = −1
dx

Differentiating y / ( x ) = x 2 − y successively and putting x =0, y = 1, we get

y // ( x) = 2 x − y / ⇒⇒⇒ y // (0) = 0 y / (0) = 0 − ( −1) = 1

y /// ( x ) = 2 − y // ⇒⇒⇒ y /// (0) = 2 − y // (0) = 1

y iv ( x) = −y /// ⇒⇒⇒ y iv (0) = −y /// (0) = −1

Putting the values of y (0), y / (0), y // (0), y /// (0), y iv (0) in (4), we get

x2 x3 x4
y ( x) = 1 − x + + −
2 6 24

Hence,

(0.1) 2 (0.1) 3 (0.1) 4


y (0.1) =1 − (0.1) + + −
2 6 24

= 0.9051625

(0.2) 2 (0.2) 3 (0.2) 4


y (0.2) = 1 − (0.2) + + −
2 6 24

= 0.8212667.
(0.3) 2 (0.3) 3 (0.3) 4
y (0.3) = 1 − (0.3) + + −
2 6 24

= 0.7491625.

(0.4) 2 (0.4) 3 (0.4) 4


y (0.4) =1 − (0.4) + + −
2 6 24

= 0.6896.

Exact Solution:

dy
The given differential equation can be written as + y = x 2 a linear differential
dx
equation.

Its I.F. is I.F = e ∫ d x = e x

Therefore the general solution is,

ye x = ∫ e x ( x 2 ) dx + c = ( x 2 − 2 x + 2)e x + c

y = ( x 2 − 2 x + 2) + ce − x (5)

Using the given condition y(0) = 1 in (5) we get 1 = 2 + c or c = -1.

Hence the exact solution is y = ( x 2 − 2 x + 2) − e − x

The exact solution at x = 0.1, 0.2, 0.3 and 0.4 are

y(0.1) = 0.9051625,
y(0.2) = 0.8212692,
y(0.3) = 0.7491817 and
y(0.4) = 0.6896799
The above solutions are tabulated as follows:

x Numerical Exact Absolute


Error Value

0.1 0.9051625 0.9051625, 0

0.2 0.8212667 0.8212692, 0. 25x10 -5

0.3 0.7491625 0.7491817 0. 192x10 -4

0.4 0.6896 0.6896799 0. 799x10 -4

Assignments:

1. Use Taylor’s series method to find an approximate value of y at x = 0.1 of the IVP
dy
= x − y2, y ( 0) = 1 Answer : 0.9138
dx

2. Evaluate y(0.1) correct to six decimal places by Taylor’s series method if y(x) satisfies
y / = xy +1, y (0) = 1 Answer : 1.1053425

dy
3. Solve = x + y2, y = 1 at x = 0 using Taylor’s series method and compute y(0.1)
dx
and y(0.2) Answer : 1.1164 and 1.2725

dy
4. Using Taylor’s series method, compute the solution of = x + y, y (0) = 1 at the
dx
point x = 0.2 correct to three decimal places. Answer : 1.243
2. Modified Euler’s Method

dy
Consider the IVP = f ( x, y ), y ( x0 ) = y0 . The following two methods can be used to
dx
determine the solution at a point x = x n = x 0 + nh .

Euler’s Method :
y nE+1 = y n + hf ( x n , y n ), n = 0,1,2,3,  (1)

Modified Euler’s Method :

y n +1 = y n +
h
2
[ ]
f ( x n , y n ) + f ( x n +1 , y nE+1 ) , n = 0,1,2,3, (2)
Remark:

1. The formulae (1) and (2) are also known as Euler’s Predictor – Corrector formula.

2. When Modified Euler’s method is applied to find the solution at a give point, we
first find the solution at that point by using Euler’s method and the same will be
used in the calculation of Modified Euler’s method. Also Modified Euler’s
method has to be applied repeatedly until the solution is stationary.

Problems :

dy y2
1. Solve =− , y (0) = 1 by Euler’s method by choosing h = 0.1 and h = 0.05.
dx 1+ x
Also solve the same problem by modified Euler’s method by choosing h = 0.05. Compare
the numerical solution with analytical solution.

Solution :

Analytical solution is : -

dy dx 1
=− ⇒ = log(1 + x) + c
y 2
1+ x y

Using the condition y(0) = 1, we get c = 1.


1
Hence the analytical solution is y = ⇒ y(0.2) = 0.84579
1 + log( 1 + x )
 y n2 
Now by Euler’s method, we have y n +1 = y n − 0.1 
 1 + xn 
 (1) 2 
y1 = y (0.1) = 1 − 0.1
1 + 0  = 0 .9
 
 (0.9) 2 
y 2 = y (0.2) = 0.9 − 0.1
1 + 0.1  = 0.82636
 

Error = 0.84579 – 0.82636 = 0.01943


 y n2 
Now taking h = 0.05, Euler’s method is y n +1 = y n − 0.05 
 1 + xn 

 (1) 2 
y1 = y (0.05 ) = 1.0 − 0.05 
1 + 0  = 0.95
 
 (0.95 ) 2 
y 2 = y (0.1) = 0.95 − 0.05 
1 + 0.05   = 0.90702
 
 (0.90702 ) 2 
y 3 = y (0.15 ) = 0.90702 − 0.05 
 1 + 0 .1   = 0.86963
 
 (0.86963 ) 
2
y 4 = y (0.2) = 0.86963 − 0.05 
 1 + 0.15   = 0.83675
 

Error = 0.84579 – 0.83675 = 0.00904

Note that when h = 0.1, Error was 0.01943, WHICH IS MORE.

Now we use modified Euler’s method to find y(0.2) with h = 0.05

 y n2 
Euler’s Formula is y n +1 = y n − 0.05  , n = 0,1,2 and 3
 1 + xn 
 y2 y nE+1 
Modified Euler Formula is y n +1 = y n − 0.025 n +  , n = 0,1,2 and 3
 1 + x n 1 + x n +1 

Stage – I: Finding y1 = y(0.05)

From Euler’s formula (for n = 0),


 (1) 2 
y1E = y (0.05 ) = 1.0 − 0.05 
1 + 0  = 0.95
 
From Modified Euler’s formula, we have

 (1) 2 (0.95 ) 2 
y1(1) = y (0.05 ) = 1.0 − 0.025  1 + 0 1 + 0.05 
+  = 0.95351
 
 (1) 2
(0.95351 ) 2 
y1( 2 ) = y (0.05 ) = 1.0 − 0.025 
1 + 0 +  = 0.95335
 1 + 0.05  
 (1) 2 (0.95335 ) 2 
y1( 3) = y (0.05 ) = 1.0 − 0.025 1 + 0 + 1 + 0.05 
 = 0.95336
 
 (1) 2 (0.95336 ) 2 
y1( 4 ) = y (0.05 ) = 1.0 − 0.025 
1 + 0 + 
 = 0.95336
 1 + 0.05 
Hence y1 = y (0.05 ) = 0.95336
Stage – II: Finding y2 = y(0.1)

From Euler’s formula (for n = 1), we get

 (0.95336 ) 2 
y 2E = y (0.1) = 0.95336 − 0.05 
 1 + 0.05 
 = 0.91008
 
From Modified Euler’s formula, we have

 (0.95336 ) 2 (0.91008 ) 2 
y 2(1) = y (0.1) = 0.95336 − 0.025  1 + 0.05 + 1 + 0.1   = 0.91286
 
 (0.95336 ) 2
(0.91286 ) 
2
y 2( 2 ) = y (0.1) = 0.95336 − 0.025 
 1 + 0.05 + 1 + 0.1   = 0.91278
 
 (0.95336 ) 2 (0.91278 ) 2 
y 2( 2 ) = y (0.1) = 0.95336 − 0.025 
 1 + 0.05 + 1 + 0.1 
 = 0.91278
 

Hence y 2 = y (0.1) = 0.91278

Stage – III: Finding y3 = y(0.15)

From Euler’s formula (for n = 2), we get

 (0.91278 ) 2 
y 3E = y (0.15 ) = 0.91278 − 0.05 
 1 + 0.1 
 = 0.87491
 
From Modified Euler’s formula (for n = 2), we have

 (0.91278 ) 2 (0.87491 ) 2 
y 3(1) = y (0.15 ) = 0.91278 − 0.025   1 + 0.1 + 1 + 0.15   = 0.87720
 
 (0.91278 ) 2
(0.87720 ) 
2
y 3( 2 ) = y (0.15 ) = 0.91278 − 0.025 
 1 + 0.1 + 1 + 0.15   = 0.87712
 

 (0.91278 ) 2 (0.87712 ) 2 
y 3( 3) = y (0.15 ) = 0.91278 − 0.025 
 1 + 0.1 + 1 + 0.15 
 = 0.87712
 
Hence y 3 = y (0.15 ) = 0.87712

Stage – IV: Finding y4 = y(0.2)

From Euler’s formula (for n = 3), we get


 (0.87712 ) 2 
y 4E = y (0.2) = 0.87712 − 0.05 
 1 + 0.15 
 = 0.84367
 
From Modified Euler’s formula(for n = 3), we have
 (0.87712 ) 2 (0.84367 ) 2 
y 4(1) = y (0.2) = 0.87712 − 0.025  1 + 0.15 + 1 + 0.2 
 = 0.84557
 
 (0.87712 ) 2 (0.84557 ) 2 
y 4( 2) = y (0.2) = 0.87712 − 0.025 
 1 + 0.15 + 1 + 0.2 
 = 0.84550
 
 (0.87712 ) 2 (0.84550 ) 2 
y 4( 2 ) = y (0.2) = 0.87712 − 0.025 
 1 + 0.15 + 1 + 0.2 
 = 0.84550
 

Hence
y 4 = y (0.2) = 0.84550

Error = 0.84579 – 0.84550 = 0.00029

Recall that the error from Euler’s Method is 0.00904

2. Solve the following IVP by Euler’s modified method at 0.2 ≤ x ≤ 0.8 with h =
dy
0.2: = log 10 ( x + y ), y (0) = 2 .
dx

Solution:

Given Data is : x0 = 0, y 0 = 2, h = 0.2 and f ( x, y ) = log 10 ( x + y )

To Find: y1 = y ( x1 ) = y (0.2), y 2 = y ( x 2 ) = y (0.4), y 3 = y ( x3 ) = y (0.6)


& y 4 = y ( x 4 ) = y (0.8)

Stage – I: Finding y1 = y(0.2)

From Euler’s formula (for n = 0),

y1E = y (0.2) = 2.0 + 0.2 log 10 ( 0 + 2 ) = 2.0602


Now from Modified Euler’s formula (for n = 0), we have

y1(1) = y (0.2) = 2.0 + 0.1[ log 10 (0 + 2) + log 10 (0.2 + 2.0602 ] = 2.0655

y1( 2 ) = y (0.2) = 2.0 + 0.1[ log 10 (0 + 2) + log 10 (0.2 + 2.0655 ] = 2.0656

y1(3) = y (0.2) = 2.0 + 0.1[ log 10 (0 + 2) + log 10 (0.2 + 2.0656 ] = 2.0656

Hence
y1 = y (0.2) = 2.0656

Stage – II: Finding y2 = y(0.4)

From Euler’s formula (for n = 1),

y 2E = y (0.4) = 2.0656 + 0.2 log 10 ( 0.2 + 2.0656 ) = 2.1366

Now from Modified Euler’s formula (for n = 1), we have

y 2(1) = y (0.4) = 2.0656 + 0.1[ log 10 (0.2 + 2.0656 ) + log 10 (0.4 + 2.1366 ] = 2.1415

y 2( 2 ) = y (0.4) = 2.0656 + 0.1[ log 10 (0.2 + 2.0656 ) + log 10 (0.4 + 2.1415 ] = 2.1416

y 2(3) = y (0.4) = 2.0656 + 0.1[ log 10 (0.2 + 2.0656 ) + log 10 (0.4 + 2.1416 ] = 2.1416

Hence
y 2 = y (0.4) = 2.1416

Stage – III: Finding y3 = y(0.6)

From Euler’s formula (for n = 2),

y 3E = y (0.6) = 2.1416 + 0.2 log 10 ( 0.4 + 2.1416 ) = 2.2226

Now from Modified Euler’s formula (for n = 2), we have

y 3(1) = y (0.6) = 2.1416 + 0.1[ log 10 (0.4 + 2.1416 ) + log 10 (0.6 + 2.2226 ] = 2.2272

y 3( 2 ) = y (0.6) = 2.1416 + 0.1[ log 10 (0.4 + 2.1416 ) + log 10 (0.6 + 2.2272 ] = 2.2272

Hence
y 3 = y (0.6) = 2.2272
Stage – IV: Finding y4 = y(0.8)

From Euler’s formula (for n = 3),

y 3E = y (0.8) = 2.2272 + 0.2 log 10 ( 0.6 + 2.2272 ) = 2.3175

Now from Modified Euler’s formula (for n = 3), we have

y 4(1) = y (0.8) = 2.2272 + 0.1[ log 10 (0.6 + 2.2272 ) + log 10 (0.8 + 2.3175 ] = 2.3217

y 4( 2 ) = y (0.8) = 2.2272 + 0.1[ log 10 (0.6 + 2.2272 ) + log 10 (0.8 + 2.3217 ] = 2.3217

Hence
y 4 = y (0.8) = 2.3217

The solutions at 0.2 ≤ x ≤ 0.8 are tabulated as follows:

xn yn

0.2 y1 = y (0.2) = 2.0656

0.4 y 2 = y (0.4) = 2.1416

0.6 y 3 = y (0.6) = 2.2272

0.8 y 4 = y (0.8) = 2.3217

dy
3. Using modified Euler’s method solve the IVP = sin x + cos y, y ( 2.5) = 0
dx
at x = 3.5 in two steps, modifying the solution thrice at each stages. Here x is in
radians.

Solution:

Given x0 = 2.5, y 0 = 0, h = 0.5 and f ( x, y ) = sin x + cos y


To Find: y1 = y ( x1 ) = y (3.0) and y 2 = y ( x 2 ) = y (3.5)

Stage – I: Finding y1 = y(3.0)

From Euler’s formula (for n = 0),

y1E = y (3.0) = 0.0 + 0.5[ sin( 2.5) + cos( 0)] = 0.7992

Now from Modified Euler’s formula (for n = 0), we have

y1(1) = y (3.0) = 0.0 + 0.25[ ( sin( 2.5) + cos( 0) ) + ( sin( 3.0) + cos( 0.7992 ) ) ] = 0.6092

y1( 2 ) = y (3.0) = 0.0 + 0.25[ ( sin( 2.5) + cos( 0) ) + ( sin( 3.0) + cos( 0.6092 ) ) ] = 0.6399

y1(3) = y (3.0) = 0.0 + 0.25[ ( sin( 2.5) + cos( 0) ) + ( sin( 3.0) + cos( 0.6399 ) ) ] = 0.6354

Hence
y1 = y (3.0) = 0.6354
Stage – II: Finding y2 = y(3.5)

From Euler’s formula (for n = 1),

y 2E = y (3.5) = 0.6354 + 0.5[ sin( 3.0) + cos( 0.6354 )] = 1.10837

Now from Modified Euler’s formula (for n = 1), we have

y 2(1) = y (3.5) = 0.6354 + 0.25[ ( sin( 3.0) + cos( 0.6354 ) ) + ( sin( 3.5) + cos(1.10837 ) ) ] = 0.89572
y 2( 2) = y (3.5) = 0.6354 + 0.25[ ( sin( 3.0) + cos( 0.6354 ) ) + ( sin( 3.5) + cos( 0.89572 ) ) ] = 0.94043
y 2(3) = y (3.5) = 0.6354 + 0.25[ ( sin( 3.0) + cos( 0.6354 ) ) + ( sin( 3.5) + cos( 0.94043 ) ) ] = 0.93155

Hence
y 2 = y (3.5) = 0.93155

4. Using modified Euler’s method obtain the solution of the differential equation
dy
= x+ y with the initial condition y = 1 at x = 0 for the range 0 < x ≤ 0.6 in
dx
steps of 0.2.

Solution:
Given x0 =0, y 0 =1, h =0.2 and f ( x, y ) = x + y
To Find: y1 = y ( x1 ) = y (0.2), y 2 = y ( x 2 ) = y (0.4) and y 3 = y ( x3 ) = y (0.6)

The Entire Calculations can be put in the following Tabular Form


x Y1 = f ( x n , y n ) y n + hf ( x n , y n ) Y2 = f ( x n +1 , y n +1 ) h
y n +1 = y n + (Y1 + Y2 )
2
0.2 1 1.2 1.2954 1.2295
1.3088 1.2309
1.3094 1.2309
0.4 1.3094 1.4927 1.6218 1.5240
1.6345 1.5253
1.6350 1.5253
0.6 1.6350 1.8523 1.9610 1.8849
1.9729 1.8861
1.9734 1.8861

The solution is:


y(0.2) =1.2309 , y (0.4) =1.5253 and y(0.6) =1.8861

Assignments :

1. Use Modified Euler’s method to find an approximate value of y at x = 0.3, in three


dy
steps, of the IVP = x + y, y ( 0) = 1 . Answer :
dx
1.1105,1.2432,1.4004
2. Evaluate y at x=1.2 and x=1.4 by Euler’s modified method if y(x) satisfies
dy y
=1+ , y (1) = 2 . Compare the numerical solution with the analytical solution.
dx x
Answer :
2.6182, 3.2699
dy
3. Compute y(0.2) for the IVP = −xy 2 , y = 2 at x = 0 using Euler’s modified method
dx
in two steps. Answer :
1.9227
dy
4. Using modified Euler’s method, compute the solution of = 2 + xy , y (1) = 1 at the
dx
point x = 2 with h = 0.2. Answer : 5.051
dy
5. Using modified Euler’s method, solve the IVP = x + y 2 , y (0) = 1 at the point
dx
x=0.5. Answer :
2.2352

3. Runge – Kutta Method

The Taylor’s series method to solve IVPs is restricted by the difficulty in finding the
higher order derivatives. However, Runge – Kutta method do not require the calculations
of higher order derivatives. Euler’s method and modified Euler’s method are
Runge – Kutta methods of first and second order respectively.
dy
Consider the IVP = f ( x, y ), y ( x0 ) = y0 . Let us find the approximate value of y at
dx
x = x n +1 , n = 0,1,2,3,….. of this numerically, using Runge – Kutta method, as follows:

First let us calculate the quantities k1 , k 2 , k 3 and k 4 using the following formulae.

k1 = hf ( x n , y n )
 h k 
k 2 = hf  x n + , y n + 1 
 2 2
 h k 
k 3 = hf  x n + , y n + 2 
 2 2 
k 4 = hf ( x n + h, y n + k 3 )

Finally, the required solution y is given by

1
y n +1 = y n + ( k1 + 2k 2 + 2 k 3 + k 4 )
6

Problems:

1. Apply Runge – Kutta method, to find an approximate value of y when x = 0.2 given
dy
that = x + y, y (0) = 1 .
dx

Solution:

Given: x0 = 0, y 0 = 1, h = 0.2 and f ( x, y ) = x + y

1
R – K method (for n = 0) is: y1 = y (0.2) = y 0 + ( k1 + 2 k 2 + 2 k 3 + k 4 ) -------- (1)
6
Now
k1 = hf ( x 0 , y 0 ) = 0.2 ×[0 +1] = 0.2
 h k   0.2   0.2 
k 2 = hf  x0 + , y 0 + 1  = 0.2 ×  0 +  + 1 +  = 0.2400
 2 2  2   2 
 h k   0.2   0.24 
k 3 = hf  x0 + , y 0 + 2  = 0.2 ×  0 +  + 1 +  = 0.2440
 2 2  2   2 

k 4 = hf ( x0 + h, y 0 + k 3 ) = 0.2 × [ ( 0 + 0.2 ) + (1 + 0.2440 ) ] = 0.2888

Using the values of k1 , k 2 , k 3 and k 4 in (1), we get

1
y1 = y (0.2) = 1 + ( 0.2 + 0.24 + 0.244 + 0.2888 ) = 1.2468
6
Hence the required approximate value of y is 1.2468.

dy y2 − x2
2. Using Runge – Kutta method of fourth order, solve = 2 , y (0) = 1 at x = 0.2
dx y + x2
& 0.4.

Solution:
y2 − x2
Given: x0 = 0, y 0 = 1, h = 0.2 and f ( x, y ) =
y2 + x2

Stage – I: Finding y1 = y (0.2)


1
R – K method (for n = 0) is: y1 = y (0.2) = y 0 + ( k1 + 2 k 2 + 2 k 3 + k 4 ) -------- (2)
6

k1 = hf ( x 0 , y 0 ) = 0.2 × f (0,1) = 0.2


 h k 
k 2 = hf  x0 + , y 0 + 1  = 0.2 × f ( 0.1,1.1) = 0.19672
 2 2
 h k 
k 3 = hf  x 0 + , y 0 + 2  = 0.2 × f ( 0.1,1.0936 ) = 0.1967
 2 2 

k 4 = hf ( x0 + h, y 0 + k 3 ) = 0.2 × f ( 0.2,1.1967 ) = 0.1891

Using the values of k1 , k 2 , k 3 and k 4 in (2), we get

1
y1 = y (0.2) = 1 + ( 0.2 + 2(0.19672 ) + 2(0.1967 ) + 0.1891 )
6

= 1+0.19599

= 1.19599

Hence the required approximate value of y is 1.19599.

Stage – II: Finding y 2 = y (0.4)

We have x1 = 0.1, y1 = 1.19599 and h = 0.2


1
R – K method (for n = 1) is: y 2 = y (0.4) = y1 + ( k1 + 2 k 2 + 2 k 3 + k 4 ) -------- (3)
6
k1 = hf ( x1 , y1 ) = 0.2 × f (0.2, 1.19599 ) = 0.1891
 h k 
k 2 = hf  x1 + , y1 + 1  = 0.2 × f ( 0.3, 1.2906 ) = 0.1795
 2 2
 h k 
k 3 = hf  x1 + , y1 + 2  = 0.2 × f ( 0.3, 1.2858 ) = 0.1793
 2 2 

k 4 = hf ( x1 + h, y1 + k 3 ) = 0.2 × f ( 0.4, 1.3753 ) = 0.1688

Using the values of k1 , k 2 , k 3 and k 4 in (3), we get

1
y 2 = y (0.4) = 1.19599 + ( 0.1891 + 2(0.1795 ) + 2(0.1793 ) + 0.1688 )
6
= 1.19599 + 0.1792

= 1.37519

Hence the required approximate value of y is 1.37519.

3. Apply Runge – Kutta method to find an approximate value of y when x = 0.2 with
dy y
h = 0.1 for the IVP = 3x + , y (0) = 1 . Also find the Analytical solution and
dx 2
compare with the Numerical solution.

Solution:

y
Given: x 0 = 0, y 0 = 1, h = 0.1 and f ( x, y ) = 3 x +
2
Stage – I: Finding y1 = y (0.1)
1
R – K method (for n = 0) is: y1 = y (0.1) = y 0 + ( k1 + 2k 2 + 2k 3 + k 4 ) -------- (4)
6

k1 = hf ( x 0 , y 0 ) = 0.1 × f (0,1) = 0.05


 h k 
k 2 = hf  x 0 + , y 0 + 1  = 0.1 × f ( 0.05, 1.025 ) = 0.06625
 2 2
 h k 
k 3 = hf  x 0 + , y 0 + 1  = 0.1 × f ( 0.05, 1.033125 ) = 0.0666563
 2 2
 h k 
k 4 = hf  x0 + , y 0 + 1  = 0.1 × f ( 0.1, 1.0666563 ) = 0.0833328
 2 2

Using the values of k1 , k 2 , k 3 and k 4 , we get


1
y1 = y (0.1) = 1.0 + ( 0.05 + 2(0.06625 ) + 2(0.0666563 ) + 0.0833328 )
6
= 1.0 + 0.0665242

= 1.0665242

Hence the required approximate value of y is 1.0665242.

Stage – II: Finding y 2 = y (0.2)

We have x1 = 0.1, y1 = 1.0665242 and h = 0.1


1
R – K method (for n = 1) is: y 2 = y (0.2) = y1 + ( k1 + 2 k 2 + 2 k 3 + k 4 ) -------- (5)
6

k1 = hf ( x1 , y1 ) = 0.1 × f (0.1, 1.0665242 ) = 0.0833262


 h k 
k 2 = hf  x1 + , y1 + 1  = 0.1 × f ( 0.15, 1.04 ) = 0.1004094
 2 2
 h k 
k 3 = hf  x1 + , y1 + 2  = 0.1 × f ( 0.15, 1.0485 ) = 0.1008364
 2 2 

k 4 = hf ( x1 + h, y1 + k 3 ) = 0.1 × f ( 0.2, 1.097425 ) = 0.1183680

Using the values of k1 , k 2 , k 3 and k 4 in (5), we get


1
y 2 = y (0.2) = 1.0665242 + ( 0.0833262 + 2(0.1004094 ) + 2(0.1008364 ) + 0.1006976 )
6

= 1.0665242 + 0.1006976

= 1.1672218
Hence the required approximate value of y is 1.1672218.

Exact Solution
dy y
The given DE can be written as − = 3 x which is a linear equation whose solution is:
dx 2
x
y = −6 x −12 +13 e 2 .
The Exact solution at x = 0.1 is y(0.1) = 1.0665242 and at x = 0.2 is y(0.2) = 1.1672218

Both the solutions and the error between them are tabulated as follows:
xn yn yn Absolute
(Exact) (Numerical) Error

0.1 1.0665243 1.0665242 0.0000001

0.2 1.1672219 1.1672218 0.0000001

x y y
(Exact) (Numerical)
0.1 1.0665243 1.0665242
0.2 1.1672219 1.1672218
0.3 1.3038452 1.3038450
0.4 1.4782359 1.4782357
0.5 1.6923304 1.6923302
0.6 1.9481645 1.9481643
0.7 2.2478782 2.2478779
0.8 2.5937211 2.5937207
0.9 2.9880585 2.9880580
1.0 3.4333766 3.4333761

Assignments:

1. Apply Runge – Kutta method to compute an approximate value of y (0.2) and y(0.4), by
dy
taking h = 0.1 for the IVP 10 = x2 + y2 , y (0) = 1 . Answer: 1.0207,
dx
1.0438
2.Use Runge – Kutta method to find y when x = 0.2 in steps of 0.1 for the differential
dy y −x
equation dx = y + x , y (0) = 1 Answer: 1.0911278,
1.1678430
dy
3. Solve = ( y + x) , y (0.4) = 0.41 by Runge – Kutta method at x = 0.8 in two steps.
dx
Answer: 0.6103476,
0.8489914
4.Using Runge – Kutta method, find an approximate value of y for x = 0.2 in steps of 0.1
dy
if = x + y 2 , given that y = 1 when x = 0, Answer: 1.1165,
dx
1.2736
Multi-step Methods:

To solve a differential equation over an interval (xn, xn+1), using previous single-step
methods, only the values of y at the beginning of interval is required. However, in the
following methods, four prior values are needed for finding the value of yn+1 at a given
value of x. Also the solution at yn+1 is obtained in two stages. This method of refining an
initially crude estimate of yn+1 by means of a more accurate formula is known as
Predictor–Corrector method. A Predictor Formula is used to predict the value of yn+1
and then a Corrector Formula is applied to calculate a still better approximation of yn+1.
Now we study two such methods namely (i) Milne’s method and (ii) Adams – Bashforth
method.

(I) Milne’s Method:


dy
Given = f ( x, y ), y ( x 0 ) = y 0 . To find an approximate value of y at x=x0+nh
dx
by Milne’s method, we proceed as follows: Using the given value of y ( x 0 ) = y 0 , we
compute y ( x1 ) = y ( x 0 + h) = y1 , y ( x 2 ) = y ( x 0 + 2h) = y 2 and y ( x3 ) = y ( x 0 + 3h) = y 3
using Taylor’s series method.

Next, we calculate f 1 = f ( x1 , y1 ), f 2 = f ( x 2 , y 2 ) and f 3 = f ( x3 , y 3 ) . Then,


the value of y at x = x4 = x0+4h can be found in the following two stages.

I Stage : Predictor Method

4h
y 4( P ) = y 0 + [ 2 f1 − f 2 + 2 f 3 ]
3
Then we compute f 4 = f ( x 4 , y 4( P ) )

II Stage : Corrector Method

h
y 4(C ) = y 2 + f2 + 4 f3 +f 
3  4 
Then, an improved value of f4 is computed and again, corrector formula is applied to find
a better value of y4. We repeat the step until y4 remains unchanged.

(II) Adams – Bashforth Method:

dy
Given = f ( x, y ), y ( x 0 ) = y 0 . Using the given value of y ( x 0 ) = y 0 , we first
dx
compute
y ( x −1 ) = y ( x 0 − h) = y −1 , y ( x −2 ) = y ( x0 − 2h) = y −2 and y ( x −3 ) = y ( x 0 − 3h) = y −3 usin
g Taylor’s series method.
Next, we calculate f −1 = f ( x −1 , y −1 ), f −2 = f ( x −2 , y −2 ) and f −3 = f ( x −3 , y −3 ) .
Now, the value of y at x = x1 (or y1) can be determined in two stages:

I Stage : Predictor Method

h
y1( P ) = y 0 + [55 f 0 − 59 f −1 + 37 f −2 − 9 f −3 ]
24

Next, we compute f 1 = f ( x1 , y1( P ) ) . To find a better approximation to y1, the following


corrector formula is used.

II Stage : Corrector Method

h
y1( C ) = y 0 + [9 f1 + 19 f 0 − 5 f −1 + f −2 ]
24

Then, an improved value of f 1 = f ( x1 , y1(C ) ) is calculated and again, corrector formula


is applied to find a better value of y1. This step is repeated until y1 remains unchanged and
then proceeds to calculate y2 as above.

Problems:
dy
1. Use Milne’s method to find y(0.3) for the IVP = x2 + y2 , y ( 0) = 1
dx

Solution:

First, let us find the values of y at the points x = -0.1, x = 0.1 and x = 0.2 by using
Taylor’s series method for the given IVP.

Taylor’s expansion of y(x) about the point x = 0( = x0) is

x 2 // x 3 ///
y ( x) = y (0) + xy / (0) + y ( 0) + y ( 0) -------- (1)
2 6
Given
y / ( x) = x 2 + y 2 ⇒⇒⇒ y / (0) = 0 + 1 = 1
y // ( x ) = 2 x + 2 yy / ⇒⇒⇒ y // (0) = 2 ×1 × 1 = 2
y /// ( x) = 2 + 2 yy // + 2( y / ) 2 ⇒⇒⇒ y /// (0) = 2 + 4 + 2 = 8
Using the values of y(0), y/(0), y//(0) and y///(0) in (1), we get
4x3
y ( x) = 1 + x + x 2 +
3
Putting x = -0.1, x = 0.1 and x = 0.2 in the above expression, we get

y(-0.1) = 0.9087, y(0.1) = 1.1113 and y(0.2) = 1.2507

Given:
x 0 = −0.1, y 0 = 0.9087 and f 0 = 0.8357
x1 = 0, y1 = 1 and f 1 = 1
x 2 = 0.1, y 2 = 1.1113 and f 2 = 1.2449
x3 = 0.2, y 3 = 1.2507 and f 3 = 1.6043

To Find : y 4 = y ( x 4 ) = y (0.3)

I Stage : Predictor Method

4h
y 4( P ) = y (0.3) = y 0 + [ 2 f1 − f 2 + 2 f 3 ]
3
4(0.1)
= 0.9087 + [(2 ×1) −1.2449 + 2 ×1.6043 ]
3
= 1.4372
Now we compute f 4 = f (0.3,1.4372 ) = 2.1555

II Stage : Corrector Method

h
y 4( C ) = y (0.3) = y 2 + [ f2 + 4 f3 + f4 ]
3
0.1
y 4( C ) = y (0.3) = 1.1113 + [1.2449 + (4 ×1.6043 ) + 2.1555 ]
3
= 1.4386
Now, we compute f 4 = f (0.3,1.4386 ) = 2.1596

0. 1
y 4( C ,1) = y (0.3) = 1.1113 + [1.2449 + (4 ×1.6043 ) + 2.1596 ]
3
y(0.3) = 1.43869

Hence, the approximate solution is y(0.3) = 1.43869

dy
2. Given = x − y2, y (0) = 0 , y(0.2) = 0.02, y(0.4) = 0.0795 and y(0.6) = 0.1762.
dx
Compute y(1) using Milne’s Method.

Solution:
Stage - I : Finding y(0.8)

Given:
x 0 = 0, y 0 = 0 and f 0 = f ( x0 , y 0 ) = 0
x1 = 0.2, y1 = 0.02 and f 1 = f ( x1 , y1 ) = 0.1996
x 2 = 0.4, y 2 = 0.0795 and f 2 = f ( x 2 , y 2 ) = 0.3937
x3 = 0.6, y 3 = 0.1762 and f 3 = f ( x3 , y 3 ) = 0.56895

To Find : y 4 = y ( x 4 ) = y (0.8)

I Stage : Predictor Method

4h
y 4( P ) = y (0.8) = y 0 + [ 2 f1 − f 2 + 2 f 3 ]
3
4 ( 0 .2 )
=0+ [ (2 × 0.1996 ) − 0.3937 2 + 2 × 0.56895 ]
3
= 0.30491
Now we compute f 4 = f (0.8,0.30491 ) = 0.7070

II Stage : Corrector Method

h
y 4( C ) = y (0.8) = y 2 + f 2 + 4 f3 +f 
3  4 
0.2
y 4( C ) = y (0.8) = 0.0795 + [0.3937 + 4 × 0.56895 + 0.7070 ]
3
= 0.3046

Now f 4 = f (0.8,0.3046 ) = 0.7072

Again applying corrector formula with new f4, we get

0.2
y 4(C ,1) = y (0.8) = 0.0795 + [ 0.3937 + 4 × 0.56895 + 0.7072 ]
3

∴ y(0.8) = 0.3046

Stage - II : Finding y(1.0)

Given:
x1 = 0.2, y1 = 0.02 and f 1 = f ( x1 , y1 ) = 0.1996
x 2 = 0.4, y 2 = 0.0795 and f 2 = f ( x 2 , y 2 ) = 0.3937
x3 = 0.6, y 3 = 0.1762 and f 3 = f ( x3 , y 3 ) = 0.56895
x 4 = 0.8, y 4 = 0.3046 and f 4 = f ( x 4 , y 4 ) = 0.7072

To Find : y 5 = y ( x5 ) = y (1.0)

I Stage : Predictor Method

4h
y 5( P ) = y (1.0) = y1 + [2 f 2 − f3 + 2 f 4 ]
3
4(0.2)
= 0.02 + [(2 × 0.3937 ) − 0.56895 + 2 × 0.7072 ]
3
= 0.45544
Now we compute f 5 = f (1.0,0.45544 ) = 0.7926

II Stage : Corrector Method

h
y 5( C ) = y (1.0) = y 3 + [ f3 + 4 f4 + f5 ]
3
0.2
y 5( C ) = y (1.0) = 0.56895 + [0.56895 + 4 × 0.7072 + 0.7926 ]
3
= 0.4556

Now f 5 = f (1.0,0.4556 ) = 0.7024

Again applying corrector formula with new f5, we get


0 .2
y 5( C ,1) = y (1.0) = 0.56895 + [0.56895 + 4 × 0.7072 + 0.7924 ]
3

∴ y(1.0) = 0.4556
dy
3. Given = x 2 (1 + y ), y (1) = 1, y (1.1) = 1.233 , y (1.2) = 1.548 , y (1.3) = 1.979
dx
.Evaluate y(1.4) by Adam’s – Bashforth method.

Solution:

Given:
x −3 = 1, y −3 = 1 and f −3 = 2
x −2 = 1.1, y −2 = 1.233 and f −2 = 2.70193
x −1 = 1.2, y −1 = 1.548 and f −1 = 3.66912
x0 = 1.3, y 0 = 1.979 and f 0 = 5.03451

To Find : y1 = y ( x1 ) = y (1.4)

I Stage : Predictor Method

h
y1( P ) = y (1.4) = y 0 + [55 f 0 − 59 f −1 + 37 f −2 − 9 f −3 ]
24
(0.1)
= 1.979 + [ (55 × 5.03451 ) − (59 × 3.66912 ) + (37 × 2.70193 ) − (9 × 2)]
24
= 2.57229
Now we compute f 1 = f (1.4,2.57229 ) = 7.0017

II Stage : Corrector Method

h
y1(C ) = y (1.4) = y 0 + [9 f1 +19 f 0 − 5 f −1 + f −2 ]
24
0.1
= 1.979 + [(9 × 7.0017 ) + (19 × 5.03451 ) − (5 × 3.66912 ) + 2.70193 ]
24
y(1.4) = 2.57495

Now, let us compute f 1 = f (1.4,2.57495 ) = 7.0069

0.1
y1( C ,1) = 1.979 + [(9 × 7.0069 ) + (19 × 5.03451 ) − (5 × 3.66912 ) + 2.70193 ]
24
= 2.57514
Again f 1 = f (1.4, 2.57514 ) = 7.0073
0 .1
y1( C , 2 ) = 1.979 + [ (9 × 7.0073 ) + (19 × 5.03451 ) − (5 × 3.66912 ) + 2.70193 ]
24

y(1.4) = 2.57514

dy
4. Given = x 2 − y, y (0) = 1 . Find y(0.4) by Adam’s method.
dx

Solution:
First, let us find the values of y at the points x = 0.1, x = 0.2 and x = 0.3 by using
Taylor’s series method for the given IVP.

Taylor’s expansion of y(x) about the point x = 0( = x0) is

x 2 // x 3 ///
y ( x) = y (0) + xy / (0) + y ( 0) + y ( 0) -------- (2)
2 6
Given
y / ( x) = x 2 − y ⇒⇒⇒ y / (0) = 0 − 1 = −1
y // ( x) = 2 x − y / ⇒⇒⇒ y // (0) = 0 − (−1) = 1
y /// ( x) = 2 − 2 y // ⇒⇒⇒ y /// (0) = 2 − 1 = 1

Using the values of y(0), y/(0), y//(0) and y///(0) in (2), we get

x2 x3
y ( x) = 1 − x + +
2 3

Putting x = 0.1, x = 0.2 and x = 0.3 in the above expression, we get

y(0.1) = 0.9051, y(0.2) = 0.8212 and y(0.3) = 0.7492

Let x −3 = 0, y −3 = 1 and f −3 = −1
x −2 = 0.1, y −2 = 0.9051 and f −2 = 0.8951
x −1 = 0.2, y −1 = 0.8212 and f −1 = −0.7812
x 0 = 0.3, y 0 = 0.7492 and f 0 = −0.6592
To Find : y1 = y ( x1 ) = y (0.4)
I Stage : Predictor Method
h
y1( P ) = y (0.4) = y 0 + [55 f 0 − 59 f −1 + 37 f −2 − 9 f −3 ]
24

(0.1)
= 0.7492 + [55 × (−0.6592 ) − 59 × (−0.7812 ) + 37 × (−0.8951 ) − 9 × (−1)]
24
= 0.6896507
Now we compute f1 = f (0.4,0.6896507 ) = −0.5296507

II Stage : Corrector Method

h
y1( C ) = y (0.4) = y 0 + [9 f1 +19 f 0 − 5 f −1 + f −2 ]
24

0. 1
= 0.7492 + [9 × (−0.5297 ) +19 × (−0.6592 ) − 5 × (−0.7812 ) − 0.895125 ]
24
y(0.4) = 0.6896522
Assignments:

1. Using Adam’s method find y(1.4) for the IVP x2y/ + xy = 1; y(1) = 1, y(1.1) =
0.996, y(1.2) = 0.986, y(1.3) = 0.972.
dy
2. Given = 0.5 xy ; y (0) = 1 . Find y(0.4) using Adam’s – Bashforth predictor –
dx
corrector formulae.
3. Solve by Milne’s predictor – corrector method, the differential equation
dy
= y − x 2 with the following starting values : y(0) = 1, y(0.2) = 1.12186,
dx
y(0.4) = 1.4682, y(0.6) = 1.7379 to find the value of y when x = 0.8.
4. Using Milne’s method, obtain the solution of the equation
y = (1 + x 2 ) y 2 ; y (0) = 1 at
/ 1
x = 0.4.
2

Answers : (1) 0.94934, (2) 1.0408, (3) 2.0111 & (4) 1.2797
LECTURE NOTES OF
ENGINEERING MATHEMATICS–IV (Sub Code: 06 MAT41)

Text Book:
Higher Engineering Mathematics by
Dr. B.S.Grewal (36th Edition – 2002)
Khanna Publishers,New Delhi

Reference Book:
Advanced Engineering Mathematics by
E. Kreyszig (8th Edition – 2001)
John Wiley & Sons, INC. New York

SPECIAL FUNCTIONS

Prepared by
Dr. M. SANKAR
Professor and Head
Department of Mathematics
Sapthagiri College of Engineering
Bangalore – 560 057

Introduction

Many Differential equations arising from physical problems are linear but have variable
coefficients and do not permit a general analytical solution in terms of known functions.
Such equations can be solved by numerical methods (Unit – I), but in many cases it is
easier to find a solution in the form of an infinite convergent series. The series solution of
certain differential equations give rise to special functions such as Bessel’s function,
Legendre’s polynomial. These special functions have many applications in engineering.

Series solution of the Bessel Differential Equation

Consider the Bessel Differential equation of order n in the form

d2y dy
x2 2
+x + ( x2 − n2 ) y = 0 (i)
dx dx
where n is a non negative real constant or parameter.

We assume the series solution of (i) in the form



y = ∑ a r x k +r where a0 ≠ 0 (ii)
r =0

dy
Hence, = ∑a r ( k + r ) x k +r −1
dx r =0
d2y ∞

dx 2
= ∑
r =0
a r ( k + r )( k + r − 1) x k +r −2

Substituting these in (i) we get,

( )∑ a x
∞ ∞ ∞
x 2 ∑ a r (k + r )( k + r − 1) x k +r −2 +x ∑ a r ( k + r ) x k +r −1 + x 2 − n 2 r
k +r
=0
r =0 r =0 r =0

∞ ∞ ∞ ∞
i.e., ∑ a r (k + r )( k + r − 1) x +∑ a r ( k + r ) x k +r +∑ a r x k +r +2 − n 2 ∑ a r x k +r = 0
k +r

r =0 r =0 r =0 r =0
Grouping the like powers, we get
[ ]
∞ ∞

∑ a r (k + r )(k + r − 1) + (k + r ) − n 2 x k +r + ∑ a r x k +r +2 = 0
r =0 r =0

∑ a [( k + r ) ]
∞ ∞

r
2
− n 2 x k + r + ∑ a r x k +r +2 = 0 (iii)
r =0 r =0

Now we shall equate the coefficient of various powers of x to zero

Equating the coefficient of xk from the first term and equating it to zero, we get

[ ]
a 0 k 2 − n 2 = 0. Since a 0 ≠ 0, we get k 2 − n 2 = 0, ∴ k = ±n
Coefficient of xk+1 is got by putting r = 1 in the first term and equating it to zero, we get

[ ]
i.e., a1 (k + 1) 2 − n 2 = 0. This gives a1 = 0, since (k + 1) 2 − n 2 = 0 gives, k + 1 = ± n
which is a contradiction to k = ± n.

Let us consider the coefficient of xk+r from (iii) and equate it to zero.
[ ]
i.e, a r (k + r ) 2 − n 2 + a r − 2 = 0.

− a r −2
∴ ar =
(k + r ) 2 − n 2 [ ] (iv)

If k = +n, (iv) becomes


− ar −2 −a
ar = = 2 r −2
[
(n + r ) − n
2 2
r + 2nr ] [ ]
Now putting r = 1,3,5, ….., (odd vales of n) we obtain,
−a 1
a3 = = 0 ,  a1 = 0
6n + 9

Similarly a5, a7, ….. are equal to zero.

i.e., a1 = a5 = a7 = …… = 0

Now, putting r = 2,4,6, ……( even values of n) we get,


− a0 − a0 − a2 a0
a2 = = ; a4 = = ;
4n + 4 4(n + 1) 8n + 16 32 (n + 1)( n + 2)

Similarly we can obtain a6, a8, …

We shall substitute the values of a1 , a 2 , a 3 , a 4 ,  in the assumed series solution, we


get


y = ∑ a r x k + r = x k ( a 0 + a 1 x + a 2 x 2 + a 3 x 3 + a 4 x 4 +  )
r =0

Let y1 be the solution for k = +n

 a0 a0 
∴ y1 = x n a 0 − x2 + x 4 − 
 4( n + 1) 32( n + 1)( n + 2) 
 x 2
x 4

i.e., y1 = a 0 x n 1 − 2 + 5 −  (v)
 2 (n + 1) 2 (n + 1)( n + 2) 
This is a solution of the Bessel’s equation.

Let y2 be the solution corresponding to k = - n. Replacing n be – n in (v) we get

 x2 x4 
y 2 = a 0 x −n 1 − 2 + 5 −  (vi)
 2 ( −n + 1) 2 ( −n + 1)( −n + 2) 
The complete or general solution of the Bessel’s differential equation is y = c1y1 + c2y2,
where c1, c2 are arbitrary constants.

Now we will proceed to find the solution in terms of Bessel’s function by choosing
1
a0 = and let us denote it as Y1.
2 n
( n +1)

xn   x 2 1 x
4
1 
i.e., Y1 = 1 −   +  −
2n   2  (n +1)  2  (n +1)( n + 2) ⋅ 2
(n +1)  

x 
n  1 x 
2
1 x 
4
1 
=   −  +  −
2   (n +1)   (n +1) (n +1)   ( n +1)( n + 2) (n +1) ⋅ 2
 
2 2

We have the result Γ (n) = (n – 1) Γ (n – 1) from Gamma function

Hence, Γ (n + 2) = (n + 1) Γ (n + 1) and
Γ (n + 3) = (n + 2) Γ (n + 2) = (n + 2) (n + 1) Γ (n + 1)

Using the above results in Y1, we get

x
n  1 x
2
1 x
4
1 
Y1 =    −  +  −
2   (n +1)   (n + 2)   ( n + 3) ⋅ 2
 2 2 

which can be further put in the following form
x
n  ( −1) 0 x 
0
( −1)1 x 
2
( −1) 2 x
4 
Y1 =      +   +   +
2   (n +1) ⋅ 0!  
 (n + 2) ⋅1!  2  (n + 3) ⋅ 2!  2  
2

n ∞ 2r
x  ( −1) r x 
= 
2 
∑ (n + r +1) ⋅ r!  2 
r =0

∞ n +2 r
x  1
= ∑(−1) r ⋅   ⋅
r =0 2  ( n + r +1) ⋅ r!

This function is called the Bessel function of the first kind of order n and is denoted by
Jn(x).
∞ n +2 r
x  1
Thus J n ( x ) = ∑( −1) r ⋅   ⋅
r =0 2  (n + r +1) ⋅ r!

Further the particular solution for k = -n ( replacing n by –n ) be denoted as J-n(x). Hence


the general solution of the Bessel’s equation is given by y = AJn(x) + BJ-n(x), where A
and B are arbitrary constants.

Properties of Bessel’s function

1. J −n ( x ) = ( −1 ) n J n ( x ) , where n is a positive integer.

Proof: By definition of Bessel’s function, we have


∞ n +2 r
x  1
J n ( x ) = ∑( −1) r ⋅   ⋅ ……….(1)
r =0 2  (n + r +1) ⋅ r!
−n +2 r
∞ x  1
Hence, J −n ( x ) = ∑( −1 ) r ⋅  ⋅ ……….(2)
r =0 2  ( −n +r +1 ) ⋅ r!
But gamma function is defined only for a positive real number. Thus we write (2) in the
following from
−n +2 r
∞ x  1
J −n ( x ) = ∑( −1 ) r ⋅  ⋅ ………..(3)
r =n 2  ( −n +r +1 ) ⋅ r!
Let r – n = s or r = s + n. Then (3) becomes
−n +2 s +2 n
∞ x  1
J −n ( x ) = ∑( −1 ) s +n ⋅  ⋅
s =0 2  ( s +1 ) ⋅( s +n )!

We know that Γ (s+1) = s! and (s + n)! = Γ (s+n+1)


n +2 s
∞ x  1
= ∑( −1 ) s +n ⋅  ⋅
s =0 2  ( s +n +1 ) ⋅ s!
n +2 s
∞ x  1
=( −1 ) n ∑( −1 ) s ⋅  ⋅
s =0 2  ( s +n +1 ) ⋅ s!
Comparing the above summation with (1), we note that the RHS is Jn(x).

Thus, J −n (x) = ( −1) n J n (x)

2. J n ( −x ) = ( −1 ) n J n ( x ) = J −n ( x ) , where n is a positive integer

∞ n +2 r
x  1
Proof : By definition, J n ( x ) = ∑(−1) r ⋅   ⋅
r =0 2  ( n + r +1) ⋅ r!
n +2 r
∞  x 1
∴ J n ( −x ) = ∑( −1 ) r ⋅−  ⋅
r =0  2 ( n +r +1 ) ⋅ r!
n +2 r
∞ x  1
i.e., = ∑( −1 ) r ⋅ ( −1) n +2 r   ⋅
r =0 2  ( n +r +1 ) ⋅ r!
n +2 r
∞ x  1
= ( −1) n ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!
n
Thus, J n (-x) = ( −1) J n (x)

Since, ( −1 ) n J n ( x ) = J −n ( x ) , we have J n ( −x) = ( −1) n J n (x) = J −n (x)

Recurrence Relations:

Recurrence Relations are relations between Bessel’s functions of different order.

Recurrence Relations 1:
d
dx
[ ]
x n J n ( x ) = x n J n −1 ( x )

From definition,
n +2 r 2( n +r )
∞ x  1 ∞ x  1
x n J n ( x ) = x n ∑( −1 ) r ⋅   ⋅ = ∑( −1 ) r ⋅   ⋅
r =0 2  ( n +r +1 ) ⋅ r! r =0 2  ( n +r +1 ) ⋅ r!

[ ]
2( n +r )−1
d ∞ 2( n +r ) x
∴ x n J n ( x ) = ∑( −1 ) r ⋅
dx r =0 2 n +2 r ( n +r +1 ) ⋅ r!
∞ ( n +r ) x n +2 r −1
= x n ∑( −1 ) r ⋅
r =0 2 n +2 r −1 ( n +r ) ( n +r ) ⋅ r!
∞ ( x / 2 ) ( n −1) +2 r
= x n ∑( −1 ) r ⋅ = x n J n −1 ( x )
r =0 ( n −1 +r +1 ) ⋅ r!
d
Thus,
dx
[ ]
x n J n ( x ) = x n J n −1 ( x ) --------(1)

Recurrence Relations 2:
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x )

From definition,
n +2 r
∞ x  1
x −n J n ( x ) = x −n ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!
2r
∞ x  1
= ∑( −1 ) r ⋅   ⋅
r =0 2  ( n +r +1 ) ⋅ r!


d
[ ∞
]
x −n J n ( x ) = ∑( −1 ) r ⋅
2 r x 2 r −1
dx r =0 2 n +2 r ( n +r +1 ) ⋅ r!
∞ x n +1+2( r −1 )
= −x −n ∑( −1 ) r −1 ⋅
r =1 2 n +1+2( r −1 ) ( n +r +1 ) ⋅( r −1 )!
Let k = r – 1
∞ x n +1+2 k
= −x −n ∑( −1 ) k ⋅ = −x −n J n +1 ( x )
k =0 2 n +1+2 k ( n +1 +k +1 ) ⋅ k !
d
Thus,
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) --------(2)
x
Recurrence Relations 3: J n ( x ) = [ J n −1 ( x ) + J n +1 ( x )]
2n

We know that
d
dx
[ ]
x n J n ( x ) = x n J n −1 ( x )

Applying product rule on LHS, we get x n J n/ ( x ) + nx n −1 J n ( x ) = x n J n −1 ( x )


Dividing by xn we get J n/ ( x ) + ( n / x )J n ( x ) = J n −1 ( x ) --------(3)
Also differentiating LHS of
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) , we get

x −n J n/ ( x ) − nx −n −1 J n ( x ) = −x −n J n +1 ( x )
Dividing by –x–n we get − J n/ ( x ) + ( n / x )J n ( x ) = J n +1 ( x ) --------(4)
Adding (3) and (4), we obtain 2nJ n ( x ) = x[ J n −1 ( x ) + J n +1 ( x )]
x
i.e., [ J n −1 ( x ) + J n +1 ( x )]
Jn( x ) =
2n
1
Recurrence Relations 4: J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )]
2
Subtracting (4) from (3), we obtain 2 J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )]
1
i.e., [ J n −1 ( x ) − J n +1 ( x )]
J n/ ( x ) =
2
n
Recurrence Relations 5: J n/ ( x ) = J n ( x ) − J n +1 ( x )
x
This recurrence relation is another way of writing the Recurrence relation 2.
n
Recurrence Relations 6: J n/ ( x ) = J n −1 ( x ) − J n ( x )
x
This recurrence relation is another way of writing the Recurrence relation 1.
2n
Recurrence Relations 7: J n +1 ( x ) = J n ( x ) − J n −1 ( x )
x
This recurrence relation is another way of writing the Recurrence relation 3.

Problems:
2 2
Prove that ( a ) J 1 / 2 ( x ) = sin x ( b ) J −1 / 2 ( x ) = cos x
πx πx
By definition,
n +2 r
∞ x  1
J n ( x ) = ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!
Putting n = ½, we get
1 / 2 +2 r
∞ x 1
J 1 / 2 ( x ) = ∑( −1 ) r ⋅   ⋅
r =0 2  ( r + 3 / 2 ) ⋅ r!

x 
2 4
1 x 1 x 1
J1/ 2( x ) =  −  +  − --------(1)
2  Γ ( 3 / 2 )  2  Γ ( 5 / 2 )1!  2  Γ ( 7 / 2 )2! 
Using the results Γ (1/2) = √ π and Γ (n) = (n – 1) Γ (n–1), we get
π 3 π 15 π
Γ(3 / 2 ) = ,Γ ( 5 / 2 ) = ,Γ (7 / 2 ) = and so on.
2 4 8
Using these values in (1), we get
x 2 x2 4 x 4
8 
J1/ 2( x ) =  − + −
2  π 4 3 π 16 15 π .2 
x 2 x3 x 5  2  x 3 x 5 
= ⋅ x − + − = x − + −
2π x 
 6 120 
 xπ 
 3! 5! 

2
J1/ 2( x ) = sin x
πx
Putting n = - 1/2, we get
−1 / 2 +2 r
∞ x  1
J −1 / 2 ( x ) = ∑( −1 ) r ⋅   ⋅
r =0 2  ( r +1 / 2 ) ⋅ r!

x 
2 4
1 x 1 x 1
J −1 / 2 ( x ) =  −  +  − --------(2)
2  Γ ( 1 / 2 )  2  Γ ( 3 / 2 )1!  2  Γ ( 5 / 2 )2! 
Using the results Γ (1/2) = √ π and Γ (n) = (n – 1) Γ (n–1) in (2), we get
2 1 x2 2 x 4 4
J −1 / 2 ( x ) =  − + −
x  π 4 π 16 3 π .2 
2  x 2 x 4 
= 1 − + −
xπ 
 2! 4! 

2
J −1 / 2 ( x ) = cos x
πx
2. Prove the following results :
2 3 − x 2 3 
(a) J5/ 2( x ) =  sin x − cos x  and
πx  x 2 x 
2 3 − x 2 3 
(b ) J −5 / 2 ( x ) =  cos x + sin x 
πx  x 2 x 
Solution :

x
We prove this result using the recurrence relation J n ( x ) = [ J n −1 ( x ) + J n +1 ( x )] ------
2n
(1).
3
Putting n = 3/2 in (1), we get J 1 / 2 ( x ) + J 5 / 2 ( x ) = J3/ 2( x )
x
3
∴ J5/ 2( x ) = J3 / 2( x )− J1/ 2( x )
x
3 2  sin x − x cos x  2
i .e., J5/ 2( x ) =  − πx sin x
x πx  x 
2  3 sin x − 3 x cos x − x 2 sin x  2 ( 3 − x 2 ) 3 
J5/ 2( x ) =  =  sin x − cos x
πx  x2  πx  x 2 x 

3
Also putting n = - 3/2 in (1), we get J −5 / 2 ( x ) + J −1 / 2 ( x ) = − J −3 / 2 ( x )
x
3  − 3  2  x sin x + cos x  2
∴ J −5 / 2 ( x ) = − J −3 / 2 ( x ) − J −1 / 2 ( x ) =  

− 
  − cos x
x  x  πx  x  πx
2  3 x sin x + 3 cos x − x 2 cos x  2 3 3 −x2 
i .e., J −5 / 2 ( x ) =  =  sin x + cos x 
π x  x2  π x  x x 2


3. Show that
d
dx
[ ]
J n2 ( x ) + J n2+1 ( x ) =
2
x
nJ[ 2
n( x ) −( n +1 ) J n2+1 ( x ) ]
Solution:
L.H.S =
d
dx
[ ]
J n2 ( x ) + J n2+1 ( x ) = 2 J n ( x )J n/ ( x ) + 2 J n +1 ( x )J n/ +1 ( x ) ------- (1)

We know the recurrence relations


xJ n/ ( x ) = nJ n ( x ) − xJ n +1 ( x )
------- (2)
/
xJ x ) = xJ n ( x ) − ( n + 1 ) J n +1 ( x )
n +1 ( ------- (3)
/
Relation (3) is obtained by replacing n by n+1 in xJ n ( x ) = xJ n −1 ( x ) − nJ n ( x )

Now using (2) and (3) in (1), we get


L.H.S =
d
dx
[ ] n  
J n2 ( x ) + J n2+1 ( x ) = 2 J n ( x ) J n ( x ) − J n +1 ( x ) + 2 J n +1 ( x )J n ( x ) −
 x  
n +1
x

J n +1 ( x )

2n 2 n +1 2
=J n ( x ) − 2 J n ( x )J n +1 ( x ) + 2 J n +1 ( x )J n ( x ) − 2 J n +1 ( x )
x x

Hence,
d
dx
[ 2
] [
J n2 ( x ) + J n2+1 ( x ) = nJ n2 ( x ) −( n + 1 )J n2+1 ( x )
x
]
1
4. Prove that J 0// ( x ) = [ J 2 ( x ) − J 0 ( x )]
2
Solution :
1
We have the recurrence relation J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )] -------(1)
2
1 1
Putting n = 0 in (1), we get J 0/ ( x ) = [ J −1 ( x ) − J 1 ( x )] = [ − J 1 ( x ) − J 1 ( x )] = −J 1 ( x )
2 2
Thus, J 0/ ( x ) = −J 1 ( x ) . Differentiating this w.r.t. x we get, J 0// ( x ) = −J 1/ ( x ) ----- (2)
1
Now, from (1), for n = 1, we get J 1/ ( x ) = [ J 0 ( x ) − J 2 ( x )] .
2
Using (2), the above equation becomes
1
[ J 0 ( x ) − J 2 ( x )]orJ 0// ( x ) = 1 [ J 2 ( x ) − J 0 ( x )] .
− J 0// ( x ) =
2 2
1
Thus we have proved that, J 0 ( x ) = [ J 2 ( x ) − J 0 ( x )]
//
2

2
5. Show that (a) ∫ J 3 ( x )dx = c − J 2 ( x ) − J 1( x )
x

(b) ∫ xJ 02 ( x )dx =
1 2 2
2
[
x J 0 ( x ) + J 12 ( x ) ]
Solution :
(a) We know that
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) or ∫ x −n J n +1 ( x )dx = −x −n J n ( x )

------ (1)
Now,
2 −2 2 −2 −2
∫ J 3 ( x )dx = ∫ x ⋅ x J 3 ( x )dx + c = x ⋅ ∫ x J 3 ( x )dx − ∫ 2 x ∫ x J 3 ( x )dx dx + c [ ]
[ ] [ ]
= x 2 ⋅ − x −2 J 2 ( x ) − ∫ 2 x − x −2 J 2 ( x ) dx + c ( from (1) when n = 2)
2 2
= c − J 2 ( x ) −∫ J 2 ( x )dx = c − J 2 ( x ) − J 1 ( x ) ( from (1) when n = 1)
x x
2
Hence, ∫ J 3 ( x )dx = c − J 2 ( x ) − J 1 ( x )
x
1 1
(b) ∫ xJ 02 ( x )dx = J 02 ( x ) ⋅ x 2 − ∫ 2 J 0 ( x ) ⋅ J 0/ ( x ). x 2 dx (Integrate by parts)
2 2
1
= x 2 J 02 ( x ) + ∫ x 2 J 0 ( x ) ⋅ J 1 ( x )dx (From (1) for n = 0)
2
1 d
= x 2 J 02 ( x ) + ∫ xJ 1 ( x ) ⋅ [ xJ 1 ( x )]dx
2 dx


d
[ xJ 1 ( x )] = xJ 0 ( x ) from recurrence relation (1) 
 dx 

=
1 2 2
2
1 1
[
x J 0 ( x ) + [ xJ 1 ( x )] 2 = x 2 J 02 ( x ) + J 12 ( x )
2 2
]
Generating Function for Jn(x)
x
( t −1 / t ) ∞
To prove that e 2 = ∑t n J n ( x )
n =−∞
or
x
If n is an integer then Jn(x) is the coefficient of tn in the expansion of e 2 ( t −1 / t ) .

Proof:
x
We have e 2 ( t −1 / t ) = e xt / 2 × e − x / 2t

 ( xt / 2 ) ( xt / 2 ) 2 ( xt / 2 ) 3   ( −xt / 2 ) ( −xt / 2 ) 2 ( −xt / 2 ) 3 


= 1 + + + +  • 1 + + + + 
 1! 2! 3!   1! 2! 3! 
(using the expansion of exponential function)
 xt x 2t 2 x nt n x n +1 t n +1   x x2 ( −1 ) n x n ( −1 ) n +1 x n +1
= 1 + + 2 + + n + n +1 + • 1 − + 2 2 − + n n + n +1 n +1
 2 ⋅ 1! 2 2! 2 n! 2 ( n + 1 )!   2t ⋅ 1! 2 t 2! 2 t n! 2 t ( n + 1 )!
If we collect the coefficient of tn in the product, they are
xn x n +2 x n +4
= − + −
2 n n! 2 n +2 ( n + 1 )! 1! 2 n +4 ( n + 2 )! 2!

n n +2 n +4 n +2 r
1 x 1 x 1 x ∞ x 1
=   −   +   − = ∑( −1 )r   = Jn( x )
n!  2  ( n + 1 )! 1!  2  ( n + 2 )! 2!  2  r =0 2 Γ ( n + r + 1 )r!
Similarly, if we collect the coefficients of t–n in the product, we get J–n(x).
x
( t −1 / t ) ∞
Thus, e 2 = ∑t n J n ( x )
n =−∞

[ ]
x
( t −1 / t ) ∞
Result: e2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
Proof :
x
( t −1 / t ) ∞ −1 ∞
e 2 = ∑t n J n ( x ) = ∑t n J n ( x ) + ∑t n J n ( x )
n =−∞ n =−∞ n =0
∞ ∞ ∞ ∞
= ∑ t − n J − n ( x ) + J 0 ( x ) + ∑ t n J n ( x ) = J 0 ( x ) + ∑ t − n ( − 1 ) n J n ( x ) + ∑ t n J n ( x ) { J − n ( x ) = ( − 1 ) n J n ( x
n =1 n =1 n =1 n =1

[ ]
x
( t −1 / t ) ∞
Thus, e 2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
Problem 6: Show that

(a) J n ( x ) = ∫ cos( nθ − x sin θ )dθ , n being an integer
π 0

(b) J 0 ( x ) = ∫ cos( x cos θ )dθ
π 0
(c) J 02 + 2 J 12 + 2 J 22 + J 32 +  = 1
Solution :

[ ]
x
( t −1 / t ) ∞
We know that e 2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
= J 0 ( x ) + tJ 1 ( x ) + t 2 J 2 ( x ) + t 3 J 3 ( x ) + + t −1 J −1 ( x ) + t −2 J −2 ( x ) + t −3 J −3 ( x ) +
Since J −n ( x ) = ( −1 )n J n ( x ) , we have

x
e2
( t −1 / t )
( ) ( )
= J 0 ( x ) + J 1 ( x )( t − 1 / t ) + J 2 ( x ) t 2 + 1 / t 2 + J 3 ( x ) t 3 − 1 / t 3 +  -----
(1)
Let t = cosθ + i sinθ so that tp = cospθ + i sinpθ and 1/tp = cospθ - i sinpθ .
From this we get, tp + 1/tp = 2cospθ and tp – 1/tp = 2i sinpθ
Using these results in (1), we get
x
( 2 i sin θ )
e 2 = e ix sin θ = J 0 ( x ) + 2[ J 2 ( x ) cos 2θ + J 4 ( x ) cos 4θ + ] + 2i[ J 1 ( x ) sin θ + J 3 ( x ) sin 3θ + ]
-----(2)
ixsinθ
Since e = cos(xsinθ ) + i sin(xsinθ ), equating real and imaginary parts in (2) we get,
cos( x sin θ ) = J 0 ( x ) + 2[ J 2 ( x ) cos 2θ + J 4 ( x ) cos 4θ + ] ----- (3)
sin( x sin θ ) = 2[ J 1 ( x ) sin θ + J 3 ( x ) sin 3θ + ] ----- (4)
These series are known as Jacobi Series.

Now multiplying both sides of (3) by cos nθ and both sides of (4) by sin nθ and
integrating each of the resulting expression between 0 and π , we obtain

1π  J n ( x ), n is even or zero
∫ cos( x sin θ ) cos nθdθ = 
π 0  0 , n is odd
1π  0, n is even
and ∫ sin( x sin θ ) sin nθdθ = 
π 0  J n ( x ), n is odd
π π π
 , if p = q
Here we used the standard result ∫ cos pθ cos qθdθ = ∫ sin pθ sin qθdθ =  2
0 0 0 , if p ≠ q
From the above two expression, in general, if n is a positive integer, we get
1π 1π
Jn( x ) = ∫ [ cos( x sin θ ) cos nθ + sin( x sin θ ) sin nθ ] dθ = ∫ cos( nθ − x sin θ )dθ
π 0 π 0
(b) Changing θ to (π /2) θ in (3), we get
cos( x cos θ ) = J 0 ( x ) + 2[ J 2 ( x ) cos( π − 2θ ) + J 4 ( x ) cos( π − 4θ ) + ]
cos( x cos θ ) = J 0 ( x ) − 2 J 2 ( x ) cos 2θ + 2 J 4 ( x ) cos 4θ − 
Integrating the above equation w.r.t θ from 0 to π , we get
π π
∫ cos( x cos θ )dθ = ∫ [ J 0 ( x ) − 2 J 2 ( x ) cos 2θ + 2 J 4 ( x ) cos 4θ − ]
0 0
π
π sin 2θ sin 4θ
∫ cos( x cos θ )dθ = J 0 ( x ) ⋅θ − 2 J 2 ( x ) + 2J 4 ( x ) − = J 0 ( x ) ⋅π
0 2 4 0


Thus, J 0 ( x ) = ∫ cos( x cos θ )dθ
π 0
(c) Squaring (3) and (4) and integrating w.r.t. θ from 0 to π and noting that m and n
being integers

π π π
∫ cos ( x sin θ )dθ = [ J 0 ( x )] ⋅ π + 4[ J 2 ( x )] + 4[ J 4 ( x )] 2 + 
2 2 2

0 2 2
2 π π
π
∫ sin ( x sin θ )dθ = 4[ J 1 ( x )] + 4[ J 3 ( x )] 2 + 
2

0 2 2
π
2
[ 2 2 2
Adding, ∫ dθ = π = π J 0 ( x ) + 2 J 1 ( x ) + 2 J 2 ( x ) + J 3 ( x ) + 
0
]
Hence, J 02 + 2 J 12 + 2 J 22 + J 32 +  = 1

Orthogonality of Bessel Functions

If α and β are the two distinct roots of Jn(x) = 0, then


π  0, if α ≠ β

0  2 n [ 2
]
∫ xJ n ( αx )J n ( β x )dx =  1 J / ( α ) = 1 [ J ( α )] 2 , if α = β
2
n +1

Proof:

We know that the solution of the equation


x2u// + xu/ + (α 2x2 – n2)u = 0 -------- (1)
x2v// + xv/ + (β 2x2 – n2)v = 0 -------- (2)
are u = Jn(α x) and v = Jn(β x) respectively.

Multiplying (1) by v/x and (2) by u/x and subtracting, we get

x(u// v - u v//)+ (u/ v – uv/)+ (β 2 –α 2)xuv = 0


or
d
dx
{(
x u / v − uv / )} = (β 2
)
−α 2 xuv

Now integrating both sides from 0 to 1, we get


(β 2
) 1
[(
− α 2 ∫ xuvdx = x u / v − uv / )] = (u v − uv )
1
0
/ /
x =1 ------- (3)
0
d d d ( αx )
Since u = Jn(α x), u = dx [ J n ( αx )] = d ( αx ) [ J n ( αx )] ⋅ dx = αJ n/ ( αx )
/
d
/
Similarly v = Jn(β x) gives v = [ J n ( βx )] = βJ n/ ( βx ) . Substituting these values in (3),
dx
we get
1 αJ n/ ( α ) J n ( β ) − βJ n ( α ) J n/ ( β )
∫ xJ n ( αx ) J n ( βx )dx = ------- (4)
0 β 2 −α 2
If α and β are the two distinct roots of Jn(x) = 0, then Jn(α ) = 0 and Jn(β ) = 0, and
π
hence (4) reduces to ∫ xJ n ( αx )J n ( βx )dx = 0 .
0
This is known as Orthogonality relation of Bessel functions.

When β = α , the RHS of (4) takes 0/0 form. Its value can be found by
considering α as a root of Jn(x) = 0 and β as a variable approaching to α . Then (4)
gives
1 αJ n/ ( α )J n ( β )
Lt ∫ xJ n ( αx )J n ( βx )dx = Lt
β →α 0 β →α β 2 −α 2
Applying L’Hospital rule, we get
αJ n/ ( α ) J n/ ( β ) 1 /
{ }
1 2
Lt ∫ xJ n ( αx )J n ( β x )dx = Lt = J n ( α ) --------(5)
β →α 0 β →α 2β 2
n
We have the recurrence relation J n/ ( x ) = J n ( x ) − J n +1 ( x ) .
x
n
∴ J n/ ( α ) = J n ( α ) − J n +1 ( α ). Since J n ( α ) = 0 , we have J n/ ( α ) = −J n +1 ( α )
α
1
Thus, (5) becomes Lt ∫ xJ n ( α x )J n ( β x )dx =
β →α 0
1 /
2
{ 1
}
J n ( α ) = { J n + 1 ( α )} 2
2

2
LECTURE NOTES OF
ENGINEERING MATHEMATICS–IV (Sub Code: 06 MAT41)

Text Book:
Higher Engineering Mathematics by
Dr. B.S.Grewal (36th Edition – 2002)
Khanna Publishers,New Delhi

Reference Book:
Advanced Engineering Mathematics by
E. Kreyszig (8th Edition – 2001)
John Wiley & Sons, INC. New York

SPECIAL FUNCTIONS

Prepared by
Dr. M. SANKAR
Professor and Head
Department of Mathematics
Sapthagiri College of Engineering
Bangalore – 560 057

Introduction

Many Differential equations arising from physical problems are linear but have variable
coefficients and do not permit a general analytical solution in terms of known functions.
Such equations can be solved by numerical methods (Unit – I), but in many cases it is
easier to find a solution in the form of an infinite convergent series. The series solution of
certain differential equations give rise to special functions such as Bessel’s function,
Legendre’s polynomial. These special functions have many applications in engineering.

Series solution of ODE


nd d2y dy
Consider the 2 order ODE f ( x ) 2
+ g ( x) + h( x ) y = 0 ,
dx dx
where f(x), g(x) and h(x) are functions in x and f(x) ≠ 0. The series solution of above
type of DE is explained as follows:

1. Assume the solution of (1) in the form y = ∑ a r x
r

r =0
/ //
2. Find the derivatives y and y from the assumed solution and substitute in to the
given DE which results in an infinite series with various powers of x equal to
zero.
3. Now equate the coefficients of various powers of x to zero and try to obtaina
recurrence relation from which the constants a0, a1, a2,…. can be determined.
4. When substituted the values of a0, a1, a2,…. in to the assumed solution, we get the
power series solution of the given DE in the form y = Ay1(x) + By2(x), where A
and B are arbitrary constants.

In general, The above type of DE can be solved by the following two methods:

Type – I (Frobenius Method) Suppose f(x) = 0 at x= 0 in the above differential


equation, we assume solution in the form

y = ∑ a r x k +r where k, a0, a1, a2,…. are all constants to be determined and a0 ≠ 0.
r =0

Type – II (Power Series Method) Suppose f(x) ≠ 0 at x= 0 in the above differential



equation, we assume solution in the form y = ∑ a r x where a0, a1, a2,…. are all
r

r =0
constants to be determined. Here all the constants ar’s will be expressed in terms of a0
and a1 only.

Problems :

d2y
1. Obtain the series solution of the equation + y =0 ----- (1)
dx 2

Let y = ∑ a r x
r
----- (2) be the series solution of (1).
r =0
∞ ∞
Hence, y = ∑ a r r x , y // = ∑ a r r (r − 1) x r − 2 ,
/ r −1

r =0 r =0
Now (1) becomes
∞ ∞

∑ ar r (r − 1) x r −2 +∑ ar x r = 0
r =2 r =1

Equating the coefficients of various powers of x to zero, we get

Coefficient of x–2 : a0(0)(-1) = 0 ⇒ and a0 ≠ 0.


–1
Coefficient of x : a1(1)(0) = 0 ⇒ and a1 ≠ 0.
Equating the coefficient of xr (r >=0)
− ar
a r +2 (r + 2)( r + 1) + a r = 0 or a r +2 = (r ≥ 0) -------(3)
(r + 2)( r +1)
Putting r = 0,1, 2, 3, …… in (3) we obtain,

− a0 − a1 − a2 a0 − a3 a
a2 = ; a3 = ; a4 = = ; a5 = = 1 ;
2 6 12 24 20 120
− a 4 − a0 − a5 − a1
a6 = = ; a7 = = ; and so on.
30 720 42 5040
Substituting these values in the expanded form of (1), we get,
y = a 0 + a1 x + a 2 x 2 + a3 x 3 + a 4 x 4 + 
 x2 x4 x6   x3 x5 x7 
i.e., y = a 0 1 − + − +  + a1 x − + − + 
 2 24 720   6 120 5040 

 x2 x4 x6   x3 x5 x7 
Hence y = a 0 1 − + − +  + a1  x − + − +  is the required
 2! 4! 6!   3! 5! 7! 
solution of the given DE.

Series solution of the Bessel Differential Equation

Consider the Bessel Differential equation of order n in the form

d2y dy
x2 2
+x + (x 2 − n2 ) y = 0 (i)
dx dx
where n is a non negative real constant or parameter.

We assume the series solution of (i) in the form



y = ∑ a r x k +r where a0 ≠ 0 (ii)
r =0


dy
Hence, = ∑a r ( k + r ) x k +r −1
dx r =0
d2y ∞

dx 2
= ∑
r =0
a r ( k + r )( k + r − 1) x k +r −2

Substituting these in (i) we get,

+( x )∑ a x
∞ ∞ ∞
x 2
∑a
r =0
r (k + r )( k + r − 1) x k + r −2
+x ∑ a r ( k + r ) x
r =0
k + r −1 2
−n 2

r =0
r
k +r
=0

∞ ∞ ∞ ∞
i.e., ∑ a r (k + r )( k + r − 1) x +∑ a r ( k + r ) x k +r +∑ a r x k +r +2 − n 2 ∑ a r x k +r = 0
k +r

r =0 r =0 r =0 r =0
Grouping the like powers, we get
[ ]
∞ ∞

∑ a r (k + r )(k + r − 1) + (k + r ) − n 2 x k +r + ∑ a r x k +r +2 = 0
r =0 r =0

[ ]
∞ ∞

∑ a r (k + r ) 2 − n 2 x k + r + ∑ a r x k +r +2 = 0
r =0 r =0
(iii)
Now we shall equate the coefficient of various powers of x to zero

Equating the coefficient of xk from the first term and equating it to zero, we get

[ ]
a 0 k 2 − n 2 = 0. Since a 0 ≠ 0, we get k 2 − n 2 = 0, ∴ k = ±n
Coefficient of xk+1 is got by putting r = 1 in the first term and equating it to zero, we get

[ ]
i.e., a1 (k + 1) 2 − n 2 = 0. This gives a1 = 0, since (k + 1) 2 − n 2 = 0 gives, k + 1 = ± n
which is a contradiction to k = ± n.

Let us consider the coefficient of xk+r from (iii) and equate it to zero.
[ ]
i.e, a r (k + r ) 2 − n 2 + a r − 2 = 0.

− a r −2
∴ ar =
[
(k + r ) 2 − n 2 ] (iv)

If k = +n, (iv) becomes


− ar −2 −a
ar = = 2 r −2
[
(n + r ) − n
2 2
] [
r + 2nr ]
Now putting r = 1,3,5, ….., (odd vales of n) we obtain,

−a 1
a3 = = 0 ,  a1 = 0
6n + 9

Similarly a5, a7, ….. are equal to zero.

i.e., a1 = a5 = a7 = …… = 0

Now, putting r = 2,4,6, ……( even values of n) we get,


− a0 − a0 − a2 a0
a2 = = ; a4 = = ;
4n + 4 4(n + 1) 8n + 16 32 (n + 1)( n + 2)

Similarly we can obtain a6, a8, …

We shall substitute the values of a1 , a 2 , a 3 , a 4 ,  in the assumed series solution, we


get


y = ∑ a r x k + r = x k ( a 0 + a 1 x + a 2 x 2 + a 3 x 3 + a 4 x 4 +  )
r =0

Let y1 be the solution for k = +n


 a0 a0 
∴ y1 = x n a 0 − x2 + x 4 − 
 4( n + 1) 32( n + 1)( n + 2) 
 x 2
x 4

i.e., y1 = a 0 x n 1 − 2 + 5 −  (v)
 2 (n + 1) 2 (n + 1)( n + 2) 
This is a solution of the Bessel’s equation.

Let y2 be the solution corresponding to k = - n. Replacing n be – n in (v) we get

 x2 x4 
y 2 = a 0 x −n 1 − 2 + 5 −  (vi)
 2 ( −n + 1) 2 ( −n + 1)( −n + 2) 
The complete or general solution of the Bessel’s differential equation is y = c1y1 + c2y2,
where c1, c2 are arbitrary constants.

Now we will proceed to find the solution in terms of Bessel’s function by choosing
1
a0 = and let us denote it as Y1.
2 n
( n +1)

xn   x 2 1 x
4
1 
i.e., Y1 = 1 −   +  −
2n   2  (n +1)  2  (n +1)( n + 2) ⋅ 2
(n +1)  

x 
n  1 x 
2
1 x 
4
1 
=   −  +  −
2   (n +1)   (n +1) (n +1)   ( n +1)( n + 2) (n +1) ⋅ 2
 
2 2

We have the result Γ (n) = (n – 1) Γ (n – 1) from Gamma function

Hence, Γ (n + 2) = (n + 1) Γ (n + 1) and
Γ (n + 3) = (n + 2) Γ (n + 2) = (n + 2) (n + 1) Γ (n + 1)

Using the above results in Y1, we get

x
n  1 x
2
1 x
4
1 
Y1 =    −  +  −
2   (n +1)   (n + 2)   ( n + 3) ⋅ 2
 
2 2

which can be further put in the following form
x
n  ( −1) 0 x 
0
( −1)1 x 
2
( −1) 2 x
4 
Y1 =      +   +   +
2   (n +1) ⋅ 0!   (n + 2) ⋅1!  2  (n + 3) ⋅ 2!  2 
 2 

n 2r
x  ∞
( −1) r x 
= 
2 

r =0
 
( n + r +1) ⋅ r!  2 
∞ n +2 r
x  1
= ∑(−1) r ⋅   ⋅
r =0 2  ( n + r +1) ⋅ r!

This function is called the Bessel function of the first kind of order n and is denoted by
Jn(x).
∞ n +2 r
x  1
Thus J n ( x ) = ∑( −1) r ⋅   ⋅
r =0 2  (n + r +1) ⋅ r!

Further the particular solution for k = -n ( replacing n by –n ) be denoted as J-n(x). Hence


the general solution of the Bessel’s equation is given by y = AJn(x) + BJ-n(x), where A
and B are arbitrary constants.

Properties of Bessel’s function

1. J −n ( x ) = ( −1 ) n J n ( x ) , where n is a positive integer.

Proof: By definition of Bessel’s function, we have


∞ n +2 r
x  1
J n ( x ) = ∑( −1) r ⋅   ⋅ ……….(1)
r =0 2  (n + r +1) ⋅ r!
−n +2 r
∞ x  1
Hence, J −n ( x ) = ∑( −1 ) r ⋅  ⋅ ……….(2)
r =0 2  ( −n +r +1 ) ⋅ r!
But gamma function is defined only for a positive real number. Thus we write (2) in the
following from
−n +2 r
∞ x  1
J −n ( x ) = ∑( −1 ) r ⋅  ⋅ ………..(3)
r =n 2  ( −n +r +1 ) ⋅ r!
Let r – n = s or r = s + n. Then (3) becomes
−n +2 s +2 n
∞ x  1
J −n ( x ) = ∑( −1 ) s +n ⋅  ⋅
s =0 2  ( s +1 ) ⋅( s +n )!

We know that Γ (s+1) = s! and (s + n)! = Γ (s+n+1)


n +2 s
∞ x  1
= ∑( −1 ) s +n ⋅  ⋅
s =0 2  ( s +n +1 ) ⋅ s!
n +2 s
∞ x  1
=( −1 ) n ∑( −1 ) s ⋅  ⋅
s =0 2  ( s +n +1 ) ⋅ s!
Comparing the above summation with (1), we note that the RHS is Jn(x).

Thus, J −n (x) = ( −1) n J n (x)

2. J n ( −x ) = ( −1 ) n J n ( x ) = J −n ( x ) , where n is a positive integer

∞ n +2 r
x  1
Proof : By definition, J n ( x ) = ∑(−1) r ⋅   ⋅
r =0 2  ( n + r +1) ⋅ r!
n +2 r
∞  x 1
∴ J n ( −x ) = ∑( −1 ) r ⋅−  ⋅
r =0  2 ( n +r +1 ) ⋅ r!
n +2 r
∞ x  1
i.e., = ∑( −1 ) r ⋅ ( −1) n +2 r   ⋅
r =0 2  ( n +r +1 ) ⋅ r!
n +2 r
∞ x  1
= ( −1) n ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!

Thus, J n (-x) = ( −1) n J n (x)

Since, ( −1 ) n J n ( x ) = J −n ( x ) , we have J n ( −x) = ( −1) n J n (x) = J −n (x)

Recurrence Relations:

Recurrence Relations are relations between Bessel’s functions of different order.

Recurrence Relations 1:
d
dx
[ ]
x n J n ( x ) = x n J n −1 ( x )

From definition,
n +2 r 2( n +r )
∞ x  1 ∞ x  1
x n J n ( x ) = x n ∑( −1 ) r ⋅   ⋅ = ∑( −1 ) r ⋅   ⋅
r =0 2  ( n +r +1 ) ⋅ r! r =0 2  ( n +r +1 ) ⋅ r!


d
[ ]

x n J n ( x ) = ∑( −1 ) r ⋅
2( n +r ) x 2( n +r )−1
dx r =0 2 n +2 r ( n +r +1 ) ⋅ r!
∞ ( n +r ) x n +2 r −1
= x n ∑( −1 ) r ⋅
r =0 2 n +2 r −1 ( n +r ) ( n +r ) ⋅ r!
∞ ( x / 2 ) ( n −1) +2 r
= x n ∑( −1 ) r ⋅ = x n J n −1 ( x )
r =0 ( n −1 +r +1 ) ⋅ r!
d
Thus,
dx
[ ]
x n J n ( x ) = x n J n −1 ( x ) --------(1)

Recurrence Relations 2:
d
dx
[
x −n J n ( x ) = −x −n J n +1 ( x ) ]
From definition,
n +2 r
∞ x  1
x −n J n ( x ) = x −n ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!
2r
∞ x  1
= ∑( −1 ) r ⋅   ⋅
r =0 2  ( n +r +1 ) ⋅ r!


d
[ ∞
]
x −n J n ( x ) = ∑( −1 ) r ⋅
2 r x 2 r −1
dx r =0 2 n +2 r ( n +r +1 ) ⋅ r!
∞ x n +1+2( r −1 )
= −x −n ∑( −1 ) r −1 ⋅
r =1 2 n +1+2( r −1 ) ( n +r +1 ) ⋅( r −1 )!
Let k = r – 1
∞ x n +1+2 k
= −x −n ∑( −1 ) k ⋅ = −x −n J n +1 ( x )
n +1+2 k
k =0 2 ( n +1 +k +1 ) ⋅ k !

Thus,
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) --------(2)
x
Recurrence Relations 3: J n ( x ) = [ J n −1 ( x ) + J n +1 ( x )]
2n

We know that
d
dx
[ ]
x n J n ( x ) = x n J n −1 ( x )

Applying product rule on LHS, we get x n J n/ ( x ) + nx n −1 J n ( x ) = x n J n −1 ( x )


Dividing by xn we get J n/ ( x ) + ( n / x )J n ( x ) = J n −1 ( x ) --------(3)
Also differentiating LHS of
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) , we get

x −n J n/ ( x ) − nx −n −1 J n ( x ) = −x −n J n +1 ( x )
Dividing by –x–n we get − J n/ ( x ) + ( n / x )J n ( x ) = J n +1 ( x ) --------(4)
Adding (3) and (4), we obtain 2nJ n ( x ) = x[ J n −1 ( x ) + J n +1 ( x )]
x
i.e., [ J n −1 ( x ) + J n +1 ( x )]
Jn( x ) =
2n
1
Recurrence Relations 4: J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )]
2
Subtracting (4) from (3), we obtain 2 J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )]
1
i.e., [ J n −1 ( x ) − J n +1 ( x )]
J n/ ( x ) =
2
n
Recurrence Relations 5: J n/ ( x ) = J n ( x ) − J n +1 ( x )
x
This recurrence relation is another way of writing the Recurrence relation 2.
n
Recurrence Relations 6: J n/ ( x ) = J n −1 ( x ) − J n ( x )
x
This recurrence relation is another way of writing the Recurrence relation 1.
2n
Recurrence Relations 7: J n +1 ( x ) = J n ( x ) − J n −1 ( x )
x
This recurrence relation is another way of writing the Recurrence relation 3.

Problems:
2 2
Prove that ( a ) J 1 / 2 ( x ) = sin x (b ) J −1 / 2 ( x ) = cos x
πx πx
By definition,
n +2 r
∞ x  1
J n ( x ) = ∑( −1 ) r ⋅  ⋅
r =0 2  ( n +r +1 ) ⋅ r!
Putting n = ½, we get
1 / 2 +2 r
∞ x 1
J 1 / 2 ( x ) = ∑( −1 ) r ⋅   ⋅
r =0 2  ( r + 3 / 2 ) ⋅ r!

x 
2 4
1 x 1 x 1
J1/ 2( x ) =  −  +  − --------(1)
2  Γ ( 3 / 2 )  2  Γ ( 5 / 2 )1!  2  Γ ( 7 / 2 )2! 
Using the results Γ (1/2) = √ π and Γ (n) = (n – 1) Γ (n–1), we get
π 3 π 15 π
Γ(3 / 2 ) = ,Γ ( 5 / 2 ) = ,Γ (7 / 2 ) = and so on.
2 4 8
Using these values in (1), we get
x 2 x2 4 x 4
8 
J1/ 2( x ) =  − + −
2  π 4 3 π 16 15 π .2 
x 2 x3 x 5  2  x 3 x 5 
= ⋅ x − + − = x − + −
2π x 
 6 120 
 xπ 
 3! 5! 

2
J1/ 2( x ) = sin x
πx
Putting n = - 1/2, we get
−1 / 2 +2 r
∞ x  1
J −1 / 2 ( x ) = ∑( −1 ) r ⋅   ⋅
r =0 2  ( r +1 / 2 ) ⋅ r!

x 
2 4
1 x 1 x 1
J −1 / 2 ( x ) =  −  +  − --------(2)
2  Γ ( 1 / 2 )  2  Γ ( 3 / 2 )1!  2  Γ ( 5 / 2 )2! 
Using the results Γ (1/2) = √ π and Γ (n) = (n – 1) Γ (n–1) in (2), we get
2 1 x2 2 x 4
4 
J −1 / 2 ( x ) =  − + −
x  π 4 π 16 3 π .2 
2  x 2 x 4 
= 1 − + −
xπ 
 2! 4! 

2
J −1 / 2 ( x ) = cos x
πx
2. Prove the following results :
2 3 − x 2 3 
(a) J5/ 2( x ) =  sin x − cos x and
πx  x 2 x 
2 3 − x 2 3 
(b ) J −5 / 2 ( x ) =  cos x + sin x 
πx  x 2 x 
Solution :

x
We prove this result using the recurrence relation J n ( x ) = [ J n −1 ( x ) + J n +1 ( x )] ------
2n
(1).
3
Putting n = 3/2 in (1), we get J 1 / 2 ( x ) + J 5 / 2 ( x ) = J3/ 2( x )
x
3
∴ J5/ 2( x ) = J3 / 2( x )− J1/ 2( x )
x
3 2  sin x − x cos x  2
i .e., J5/ 2( x ) =   − sin x
x πx  x  πx
2  3 sin x − 3 x cos x − x 2 sin x  2 ( 3 − x 2 ) 3 
J5/ 2( x ) =  =  sin x − cos x
πx  x2  πx  x 2 x 

3
Also putting n = - 3/2 in (1), we get J −5 / 2 ( x ) + J −1 / 2 ( x ) = − J −3 / 2 ( x )
x
3  − 3  2  x sin x + cos x  2
∴ J −5 / 2 ( x ) = − J −3 / 2 ( x ) − J −1 / 2 ( x ) =  

− 
  − π x cos x
x  x  π x  x 
2  3 x sin x + 3 cos x − x 2 cos x  2 3 3 −x2 
i .e., J −5 / 2 ( x ) =  =  sin x + cos x 
π x  x2  π x  x x 2


3. Show that
d
dx
[ ]
J n2 ( x ) + J n2+1 ( x ) =
2
x
nJ [ 2
n( x ) −( n +1 ) J n2+1 ( x ) ]
Solution:
L.H.S =
d
dx
[ ]
J n2 ( x ) + J n2+1 ( x ) = 2 J n ( x )J n/ ( x ) + 2 J n +1 ( x )J n/ +1 ( x ) ------- (1)

We know the recurrence relations


xJ n/ ( x ) = nJ n ( x ) − xJ n +1 ( x )------- (2)
/
xJ x ) = xJ n ( x ) − ( n + 1 ) J n +1 ( x )
n +1 ( ------- (3)
Relation (3) is obtained by replacing n by n+1 in xJ n/ ( x ) = xJ n −1 ( x ) − nJ n ( x )

Now using (2) and (3) in (1), we get


L.H.S =
d
dx
[ ] n  
J n2 ( x ) + J n2+1 ( x ) = 2 J n ( x ) J n ( x ) − J n +1 ( x ) + 2 J n +1 ( x )J n ( x ) −
x  
n +1
x

J n +1 ( x )

2n 2 n +1 2
= J n ( x ) − 2 J n ( x )J n +1 ( x ) + 2 J n +1 ( x )J n ( x ) − 2 J n +1 ( x )
x x

Hence,
d
dx
[ 2
] [
J n2 ( x ) + J n2+1 ( x ) = nJ n2 ( x ) −( n + 1 )J n2+1 ( x )
x
]
1
4. Prove that J 0// ( x ) = [ J 2 ( x ) − J 0 ( x )]
2
Solution :
1
We have the recurrence relation J n/ ( x ) = [ J n −1 ( x ) − J n +1 ( x )] -------(1)
2
1 1
Putting n = 0 in (1), we get J 0/ ( x ) = [ J −1 ( x ) − J 1 ( x )] = [ − J 1 ( x ) − J 1 ( x )] = −J 1 ( x )
2 2
Thus, J 0 ( x ) = −J 1 ( x ) . Differentiating this w.r.t. x we get, J 0// ( x ) = −J 1/ ( x ) ----- (2)
/

1
Now, from (1), for n = 1, we get J 1/ ( x ) = [ J 0 ( x ) − J 2 ( x )] .
2
Using (2), the above equation becomes
1
[ J 0 ( x ) − J 2 ( x )]orJ 0// ( x ) = 1 [ J 2 ( x ) − J 0 ( x )] .
− J 0// ( x ) =
2 2
1
Thus we have proved that, J 0// ( x ) = [ J 2 ( x ) − J 0 ( x )]
2

2
5. Show that (a) ∫ J 3 ( x )dx = c − J 2 ( x ) − J 1 ( x )
x

(b) ∫ xJ 02 ( x )dx =
1 2 2
2
[
x J 0 ( x ) + J 12 ( x ) ]
Solution :
(a) We know that
d
dx
[ ]
x −n J n ( x ) = −x −n J n +1 ( x ) or ∫ x −n J n +1 ( x )dx = −x −n J n ( x )

------ (1)
Now,
2 −2 2 −2 −2
[
∫ J 3 ( x )dx = ∫ x ⋅ x J 3 ( x )dx + c = x ⋅ ∫ x J 3 ( x )dx − ∫ 2 x ∫ x J 3 ( x )dx dx + c ]
[ ] [ ]
= x 2 ⋅ − x −2 J 2 ( x ) − ∫ 2 x − x −2 J 2 ( x ) dx + c ( from (1) when n = 2)
2 2
= c − J 2 ( x ) −∫ J 2 ( x )dx = c − J 2 ( x ) − J 1 ( x ) ( from (1) when n = 1)
x x
2
Hence, ∫ J 3 ( x )dx = c − J 2 ( x ) − J 1 ( x )
x
1 1
(b) ∫ xJ 02 ( x )dx = J 02 ( x ) ⋅ x 2 − ∫ 2 J 0 ( x ) ⋅ J 0/ ( x ). x 2 dx (Integrate by parts)
2 2
1 2 2
= x J 0 ( x ) + ∫ x 2 J 0 ( x ) ⋅ J 1 ( x )dx (From (1) for n = 0)
2
1 d
= x 2 J 02 ( x ) + ∫ xJ 1 ( x ) ⋅ [ xJ 1 ( x )]dx
2 dx


d
[ xJ 1 ( x )] = xJ 0 ( x ) from recurrence relation (1) 
 dx 

=
1 2 2
2
1 1
[
x J 0 ( x ) + [ xJ 1 ( x )] 2 = x 2 J 02 ( x ) + J 12 ( x )
2 2
]
Generating Function for Jn(x)
x
( t −1 / t ) ∞
To prove that e 2 = ∑t n J n ( x )
n =−∞
or
x
If n is an integer then Jn(x) is the coefficient of tn in the expansion of e 2 ( t −1 / t ) .

Proof:
x
We have e 2 ( t −1 / t ) = e xt / 2 × e − x / 2t

 ( xt / 2 ) ( xt / 2 ) 2 ( xt / 2 ) 3   ( −xt / 2 ) ( −xt / 2 ) 2 ( −xt / 2 ) 3 


= 1 + + + +  • 1 + + + + 
 1! 2! 3!   1! 2! 3! 
(using the expansion of exponential function)
 xt x 2t 2 x nt n x n +1 t n +1   x x2 ( −1 ) n x n ( −1 ) n +1 x n +1
= 1 + + 2 + + n + n +1 + • 1 − + 2 2 − + n n + n +1 n +1
 2 ⋅ 1! 2 2! 2 n! 2 ( n + 1 )!   2t ⋅ 1! 2 t 2! 2 t n! 2 t ( n + 1 )!
If we collect the coefficient of tn in the product, they are
xn x n +2 x n +4
= − + −
2 n n! 2 n +2 ( n + 1 )! 1! 2 n +4 ( n + 2 )! 2!
n n +2 n +4 n +2 r
1 x 1 x 1 x ∞ x 1
=   −   +   − = ∑( −1 )r   = Jn( x )
n!  2  ( n + 1 )! 1!  2  ( n + 2 )! 2!  2  r =0 2 Γ ( n + r + 1 )r!
Similarly, if we collect the coefficients of t–n in the product, we get J–n(x).
x
( t −1 / t ) ∞
Thus, e 2 = ∑t n J n ( x )
n =−∞

[ ]
x
( t −1 / t ) ∞
Result: e2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
Proof :
x
( t −1 / t ) ∞ −1 ∞
e 2 = ∑t n J n ( x ) = ∑t n J n ( x ) + ∑t n J n ( x )
n =−∞ n =−∞ n =0
∞ ∞ ∞ ∞
= ∑ t − n J − n ( x ) + J 0 ( x ) + ∑ t n J n ( x ) = J 0 ( x ) + ∑ t − n ( − 1 ) n J n ( x ) + ∑ t n J n ( x ) { J − n ( x ) = ( − 1 ) n J n ( x
n =1 n =1 n =1 n =1

[ ]
x
( t −1 / t ) ∞
Thus, e2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
Problem 6: Show that

(a) J n ( x ) = ∫ cos( nθ − x sin θ )dθ , n being an integer
π 0

(b) J 0 ( x ) = ∫ cos( x cos θ )dθ
π 0
(c) J 02 + 2 J 12 + 2 J 22 + J 32 +  = 1
Solution :

[ ]
x
( t −1 / t ) ∞
We know that e 2 = J 0 ( x ) + ∑ t n + ( −1 ) n t −n J n ( x )
n =1
= J 0 ( x ) + tJ 1 ( x ) + t 2 J 2 ( x ) + t 3 J 3 ( x ) + + t −1 J −1 ( x ) + t −2 J −2 ( x ) + t −3 J −3 ( x ) +
Since J −n ( x ) = ( −1 )n J n ( x ) , we have

x
e 2
( t −1 / t )
( ) (
= J 0 ( x ) + J 1 ( x )( t − 1 / t ) + J 2 ( x ) t 2 + 1 / t 2 + J 3 ( x ) t 3 − 1 / t 3 +  ) -----
(1)
Let t = cosθ + i sinθ so that tp = cospθ + i sinpθ and 1/tp = cospθ - i sinpθ .
From this we get, tp + 1/tp = 2cospθ and tp – 1/tp = 2i sinpθ
Using these results in (1), we get
x
( 2 i sin θ )
e2 = e ix sin θ = J 0 ( x ) + 2[ J 2 ( x ) cos 2θ + J 4 ( x ) cos 4θ + ] + 2i[ J 1 ( x ) sin θ + J 3 ( x ) sin 3θ + ]
-----(2)
ixsinθ
Since e = cos(xsinθ ) + i sin(xsinθ ), equating real and imaginary parts in (2) we get,
cos( x sin θ ) = J 0 ( x ) + 2[ J 2 ( x ) cos 2θ + J 4 ( x ) cos 4θ + ] ----- (3)
sin( x sin θ ) = 2[ J 1 ( x ) sin θ + J 3 ( x ) sin 3θ + ] ----- (4)
These series are known as Jacobi Series.

Now multiplying both sides of (3) by cos nθ and both sides of (4) by sin nθ and
integrating each of the resulting expression between 0 and π , we obtain

1π  J n ( x ), n is even or zero
∫ cos( x sin θ ) cos nθdθ = 
π 0  0 , n is odd
1π  0, n is even
and ∫ sin( x sin θ ) sin nθdθ = 
π 0  J n ( x ), n is odd
π π π
 , if p = q
Here we used the standard result ∫ cos p θ cos q θd θ = ∫ sin pθ sin q θd θ =  2
0 0 0 , if p ≠ q
From the above two expression, in general, if n is a positive integer, we get
1π 1π
J n ( x ) = ∫ [ cos( x sin θ ) cos nθ + sin( x sin θ ) sin nθ ] dθ = ∫ cos( nθ − x sin θ )dθ
π 0 π 0
(b) Changing θ to (π /2) θ in (3), we get
cos( x cos θ ) = J 0 ( x ) + 2[ J 2 ( x ) cos( π − 2θ ) + J 4 ( x ) cos( π − 4θ ) + ]
cos( x cos θ ) = J 0 ( x ) − 2 J 2 ( x ) cos 2θ + 2 J 4 ( x ) cos 4θ − 
Integrating the above equation w.r.t θ from 0 to π , we get
π π
∫ cos( x cos θ )dθ = ∫ [ J 0 ( x ) − 2 J 2 ( x ) cos 2θ + 2 J 4 ( x ) cos 4θ − ]
0 0
π
π sin 2θ sin 4θ
∫ cos( x cos θ )dθ = J 0 ( x ) ⋅θ − 2 J 2 ( x ) + 2J 4 ( x ) − = J 0 ( x ) ⋅π
0 2 4 0


Thus, J 0 ( x ) = ∫ cos( x cos θ )dθ
π 0
(c) Squaring (3) and (4) and integrating w.r.t. θ from 0 to π and noting that m and n
being integers

π π π
∫ cos ( x sin θ )dθ = [ J 0 ( x )] ⋅ π + 4[ J 2 ( x )] + 4[ J 4 ( x )] 2 + 
2 2 2

0 2 2
2 π π
π
∫ sin ( x sin θ )dθ = 4[ J 1 ( x )] + 4[ J 3 ( x )] 2 + 
2
0 2 2
π
2
[ 2 2 2
Adding, ∫ dθ = π = π J 0 ( x ) + 2 J 1 ( x ) + 2 J 2 ( x ) + J 3 ( x ) +  ]
0
Hence, J 02 + 2 J 12 + 2 J 22 + J 32 +  = 1

Orthogonality of Bessel Functions

If α and β are the two distinct roots of Jn(x) = 0, then


π  0, if α ≠ β

xJ
∫ n
0
( α x ) J n ( β x )dx = 1
 2 n[ 2 1
]
 J / ( α ) = [ J ( α )] 2 , if α = β
2
n +1

Proof:

We know that the solution of the equation


x2u// + xu/ + (α 2x2 – n2)u = 0 -------- (1)
x2v// + xv/ + (β 2x2 – n2)v = 0 -------- (2)
are u = Jn(α x) and v = Jn(β x) respectively.

Multiplying (1) by v/x and (2) by u/x and subtracting, we get

x(u// v - u v//)+ (u/ v – uv/)+ (β 2 –α 2)xuv = 0


or
d
dx
{(
x u / v − uv / )} = (β 2
−α 2 xuv)
Now integrating both sides from 0 to 1, we get
(β 2
)
1
[(
− α 2 ∫ xuvdx = x u / v − uv /
0
)] = (u v − uv )
1
0
/ /
x =1 ------- (3)
d d d ( αx )
Since u = Jn(α x), u = dx [ J n ( αx )] = d ( αx ) [ J n ( αx )] ⋅ dx
/
= αJ n/ ( αx )

d
/
Similarly v = Jn(β x) gives v = [ J n ( βx )] = βJ n/ ( βx ) . Substituting these values in (3),
dx
we get
1 αJ n/ ( α ) J n ( β ) − βJ n ( α ) J n/ ( β )
∫ xJ n ( αx ) J n ( βx )dx = ------- (4)
0 β 2 −α 2
If α and β are the two distinct roots of Jn(x) = 0, then Jn(α ) = 0 and Jn(β ) = 0, and
π
hence (4) reduces to ∫ xJ n ( αx )J n ( βx )dx = 0 .
0
This is known as Orthogonality relation of Bessel functions.

When β = α , the RHS of (4) takes 0/0 form. Its value can be found by
considering α as a root of Jn(x) = 0 and β as a variable approaching to α . Then (4)
gives
1 αJ n/ ( α )J n ( β )
Lt ∫ xJ n ( αx )J n ( βx )dx = Lt
β →α 0 β →α β 2 −α 2
Applying L’Hospital rule, we get
1
Lt ∫ xJ n ( αx )J n ( β x )dx = Lt
β →α 0 β →α
αJ n/ ( α ) J n/ ( β ) 1 /

{2
}
= J n ( α ) --------(5)
2
n
We have the recurrence relation J n/ ( x ) = J n ( x ) − J n +1 ( x ) .
x
n
∴ J n/ ( α ) = J n ( α ) − J n +1 ( α ). Since J n ( α ) = 0 , we have J n/ ( α ) = −J n +1 ( α )
α

{ }
1 1 / 1
J n ( α ) = { J n + 1 ( α )} 2
2
Thus, (5) becomes Lt ∫ xJ n ( α x )J n ( β x )dx =
β →α 0 2 2

You might also like