0% found this document useful (0 votes)
18 views93 pages

Introduction to Differential Equations

Differential equations relate functions to their derivatives and are essential in modeling complex systems across various fields such as physics, engineering, biology, and economics. The process of solving these equations involves integration and can yield infinitely many solutions, with particular solutions determined by initial conditions. The document also covers first-order differential equations, separable equations, and linear equations, providing definitions and examples for each type.

Uploaded by

Pasa Sultanlı
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views93 pages

Introduction to Differential Equations

Differential equations relate functions to their derivatives and are essential in modeling complex systems across various fields such as physics, engineering, biology, and economics. The process of solving these equations involves integration and can yield infinitely many solutions, with particular solutions determined by initial conditions. The document also covers first-order differential equations, separable equations, and linear equations, providing definitions and examples for each type.

Uploaded by

Pasa Sultanlı
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Lecture 1

Differential Equations
General Notions
Definition. A differential equation is an equation that relates some function of
one or more variables with its derivatives.
The problem of forming and solving these equations is widely encountered in
physics and engineering. In biology and economics, differential equations are used
to model the behavior of complex systems.
The subject differential equations was motivated by problems in mechanics,
elasticity, astronomy and geometry during the latter part of the 17 th century.
Inventions (or discoveries) in theory, methods, and notation evolved concurrently
with innovations in calculus. Since their early historical origins, the number and
variety of problems to which differential equations are applied have grown
substantially. Today, scientists and engineers use differential
equations to study problems such as
• airflow around airplanes and design of airplanes,
• ship design,
• controlling the flight of airplanes and rockets,
• designing medical imaging technologies,
• designing electric circuits,
• earthquake detection and prediction,
• wave propagation,
• heat transfer,
• weather forecasting,
• designing optimal vaccination policies to prevent the spread of disease,
• forecasting and managing the harvesting of fish populations, and
• determining the price of financial derivatives.
All fields of science and engineering, as well as several of the business and
social sciences,use differential equations.

Definition. The process of solving a differential equation is called


integration of the differential equation. The simplest ordinary differential
equations can be integrated directly by finding antiderivatives. These equations
have the form
dn x
=G(t )
dt n
where the derivative of x=x (t ) can be of any order, and the right-hand-side may
depend only on the independent variable t.
As an example, consider a mass falling under the influence of constant gravity,
such as approximately found on the Earth’s surface. Newton’s law, F=ma , results
in the equation
d2 x
m =−mg
dt 2
where x is the height of the object above the ground, m is the mass of the object,
and g=9 , 8 meter/sec2 is the constant gravitational acceleration. As Galileo
suggested, the mass cancels from the equation, and
d2 x
=−g
dt 2
Here, the right-hand-side of the equation is a constant. The first integration,
obtained by antidifferentiation, yields
dx
=A−gt ,
dt
with A the first constant of integration, and the second integration yields
1
x=B+ At− gt 2
2 ,
with B the second constant of integration.
The two constant of integration A and B can then be determined from the
initial conditions. If we know that the initial height of the mass is x0 , and the initial
velocity is υ 0 , then the initial conditions are
dx
x (0 )=x 0 , dt (0 )=υ 0
dx
Substitution of these initial conditions into equations for dt and x allows us to
solve for A and B. The unique solution that satisfies both the ordinary differential
equation and the initial conditions is given by
1
x (t )=x 0 +υ0 t− gt 2
2

Basic definitions
Let us now introduce some definitions important for further understanding. A
differential equation is usually taken in a form which connects an argument (or
several arguments) and an unknown function (or several unknown functions) with
its derivatives. If the unknown function depends on one variable the differential
equation is called ordinary.
Otherwise the equation is called a partial differential equation. The highest
order of the derivative of the unknown function entering into an equation is called
the order of the differential equation.
The general form of a differential equation of the nth order is
F ( x, y , y ¿ , y // , .. . , y( n) )=0 , (1)
where y= y (x ) is the sought-for function. A function is called a solution of a
differential equation if it reduces the equation to an identity when substituted into
the equation.
Even the simplest examples indicate that a differential equation has infinitely
many solutions. For instance, taking a simple equation of the form
¿
y =x 2 , y= y (x ) (2)
we immediately find, by integrating, that
x3
y= +C
3 (3)
This is the general solution of equation (2).
It contains an arbitrary constant C and is the set of solutions containing all
solutions of the equation. Making the arbitrary constant assume concrete numerical
values we obtain particular solutions of equation (2):
x3 x3 x3 √ 2
y= ; y= +6 , y = −
3 3 3 3
Similarly, the general solution of an equation of the form (1) also contains n
arbitrary constants, i.e. it has the form
y= y(x , c 1 , c 2 ,. . ., c n ) (4)
we often obtain the general solution in an implicit form
Φ( x, y 1 , c 1 , c 2 ,. . ., c n )=0 (5)
Relations (4) and (5) are also called general integrals of equation (1).
Particular solution can be obtained from (4) or (5) if we make each of the arbitrary
constants c 1 ,c 2 ,...,c n take on a certain concrete numerical value. The graph of every
particular solution is called an integral curve of the differential equation.
To isolate a unique particular solution from the general solution we must set
some additional conditions. Such conditions are often taken as so-called initial
conditions. In the general case of an equation of form (1) the initial conditions are
y= y 0 , y ¿ =( y ¿ )0 , . .. y( n−1)=( y (n−1) )0 for x=x 0 (6)
Condition (6) for an equation of the first order of from (2) means that for a
certain value x=x 0 we must assign a value y= y 0 . For instance, let it be necessary
to isolate a solution for which y (1)=2 . Then (3) implies

1 5
2 = +C C=
3 i.e. 3.
Hence, the sought – for particular solution has the form
x 2 +5
y=
3
Definition. The problem of finding a particular solution of a differential
equation when certain initial conditions are given is called the Cauchy problem
(initial-value problem)

First – Order Differential Equations

The general first-order differential equation for the function y= y (x ) is written


as
dy
=f (x , y ) ,
dx (1)
where f ( x , y ) can be any function of the independent variable x and the dependent
variable y.

Separable equations
dy
=f (x , y )
1) The differential equation of the form dx is called separable, if
f ( x , y )=h( x ) g( y ) that is
dy
=h( x ) g( y )
dx (2)
Let us rewrite the equation (2) as
dy
=h( x )dx
g( y)
and then, integrating,
1
∫ g( y ) dy=∫ h( x )dx+C
we obtain
G( y )=H ( x )+C
dy y 2−1
=
Example. Solve dx x
Separating the variables we obtain
dy dx
=
y −1 x
2

using the techniques of integration of rational functions, we get


dy 1 y−1
∫ y2−1 = 2 ln| y+1 | ,
which implies

1 y−1
ln| |=ln|x|+C
2 y+1
2) The equation
M 1 ( x ) N 1 ( y )dx+M 2 ( x )N 2 ( y )dy=0
(3)
is also an equation with variables separable. If we divide both side of equation
(3) by N 1 ( y )M 2 ( x ) , we get

M 1 ( x )N 1 ( y ) M 2 ( x )N 2 ( y )
dx + dy=0
N 1( y ) M 2( x ) N 1 ( y ) M 2( x )
or
M1 ( x ) N 2( y )
dx + dy=0
M 2( x ) N 1( y )
We can construct the general solution of this equation:

M ( x) N ( y)
∫ M 1( x ) dx+∫ N 2 ( y ) dy =C
2 1

Example: ( x −1 ) y +2 xy =0
2 ' 2

y ( 0 )=1
dy 2x
=− dx
y2 x 2 −1
1
=ln|x 2−1|+c
y
1=ln 1+ c
c=1
1
=ln|x 2−1|+1
y
'
Example: ( x +1 ) y +xy =0
dy x
=− dx
y x +1
x +1−1
ln y =−∫ dx+ln c
x+1
ln y =−∫ 1− ( 1
x +1 )
dx +ln c

ln y=−x+ln|x+1|+ln c
ln y−ln c|x+1|=−x
y
ln =−x
c ( x +1 )
y
=e− x
c ( x +1 )
y=c ( x +1 ) e−x
Homogeneous Equations

The differential equation

dy
=f (x , y )
dx (1)
is homogeneous if the function f ( x , y ) is homogeneous, that is f (tx , ty)=f ( x , y ) for
1
t=
any number t. Let us substitute x in this identity, then we have
f ( x , y )=f 1; ( )
x
y

The equation (1) becomes


dy
dx ( )
=f 1;
y
x (2)
This equation is easily integrated by means of the substitution
y dy du
=u , y=ux , =u + x
x dx dx (3)
where y=ux is a new unknown function which replaces y. Substituting (3) into (2)
we derive
dy
u+ ⋅x=f (1, u )
dx
which is a separable equation

xdu du dx
=f (1, u )−u =
dx or f (1 , u)−u x
Integrating, we find
du dx
∫ f (1 , u)−u =∫ x
+C .
Once solved, go back to the old variable y via the equation y=ux .
A first – order ordinary differential in the form
M ( x , y )dx +N ( x , y )dy=0
is a homogeneous type if both functions M ( x , y ) and N ( x , y ) are homogeneous
functions of the same degree n. That is, multiplying each variable by a parameter λ
, we find

M ( λx , λy )dx=λn M ( x , y ) and N ( λx , λy )dx=λ n N ( x , y )


Thus
M ( λx , λy ) M ( x , y )
=
N ( λx , λy ) N ( x , y )
Example . Solve the equation

dy −2 x +5 y
=
dx 2 x+ y
Solution: it is easy to check, that
−2 x +5 y
f ( x , y )=
2 x + y is homogeneous.
y
=u
we substitute x , then
¿ ¿
y=ux , y =u+xu
−2 x+5 ux
u+ xu ¿=
and hence 2 x +ux or
−2+5 u
u+ xu ¿=
2+u
which can be rewritten as
u=
¿
(
1 −2+5 u
x 2+u
−u )
This is a separable equation

= −
dx x u+2 (
du 1 u2 −3 u+2

u+2
or (u−2)(u−1)
)dx
du= .
x
Integrating, the latter we find
4 du 3 du dx
−∫ +∫ =∫ +lnC
u−2 u−1 x
−4ln|u−2|+3ln|u−1|=ln|x|+ln C .
|u−1|3 (u−1)3
ln =ln|x|C =xC
|u−2|4 or (u−2)4

Back to the function y, we get

( ) ( )
3 4
y y
−1 =xC −2
x x ,
( y−x )3=C ( y−2 x ) 4
This is the general solution of the original differential equation. Example:

Solution: We substitute y= xu ,
dy y
= +2
Solve the homogeneous equation dx x
y
x. √
dy dy
=u+x
then dx dx .
du du
u+ x =u+2 √u , x =2 √ u
and dx dx
this is a separable equation.
Integrating, the latter we find

dx du
= , ln x=ln c + √ u , √u=ln cx
x 2 √u
We get

√ y
x
=ln cx 2
, or y=x ln cx
general solution of the original differential equation.

LECTURE 2
Linear Equations

A first order linear differential equation is an equation of the form


¿
y +P (x ) y=Q( x) , (1)
where P and Q are functions of x. if the equation is written in this form it is called
standard form. The equation is called first order because it only involves the
function y and first derivatives of y.
Equation (1) is called homogeneous linear equation if Q( x ) is identically
equal to zero.
Otherwise the equation is called non-homogeneous. To solve the general
non-homogeneous equation of the form (1) we first investigate the associated
homogeneous equation
¿
y +P (x ) y =0 (2)
The variables in equation (2) are easily separated:
dy dy
+P (x ) y =0 ⇒ =−P( x )dx
dx y
ln|y|=−∫ P( x)dx+ln C
It follows that the general equation of (2) has the following form
−∫ P(x )dx
y=C e .
We will use method of variation of parameters to find general solution of non-
homogeneous equation (1). The idea of method of variation of parameters is to
look for a particulars solution such as
−∫ P(x)dx
y=z( x) e (3).
where z(x) is function. From this, the method got its name.
Differentiating (3), we find
y ¿ =z ¿ ( x) e ∫ −z( x) P ( x)e ∫
− P( x)dx − P (x)dx
(4)
Substituting (3) and (4) into equation (1) we receive
¿ −∫ P( x)dx −∫ P (x)dx −∫ P (x)dx
z ( x) e −z( x) P( x)e +P( x )z( x)e =Q( x) whence

¿ −∫ P( x)dx
z ( x) e =Q( x )
or

z ¿ ( x) =Q( x)e∫
P (x)dx

Integrating, find
z( x) =∫ Q (x )e∫
P( x)dx
dx+C1
Substituting this expression in formula (3), we get general solution of linear
equation (1):
(
y = ∫ Q (x )e∫
P( x)dx
dx+C1 e ∫ )
− P( x)dx

x¿
Examples. Solve y − y=e
Let us consider associated homogeneous equation
¿
y − y=0
It is separable equation. Thus
dy dy dy
=y ⇒ =dx ⇒∫ =∫ dx+ln C
dx y y

hence
ln y =x+lnC
or
y
ln =x
y=Ce x
C
Let us substitute C(x) into C
x
Then y=C ( x )e
Differentiating this expression, we find
¿ ¿
y =C ( x )e x +C ( x )e x
¿
Substituting y and y into given equation, we get
¿
C ( x )e x +C ( x )e x −C (x )e x=e x
¿
C ¿ ( x )e x =e x or C ( x)=1
Integrating, we find

C ( x )=∫ dx + C1 ⇒C ( x )=x +C 1
So
y=( x+ C1 )e x
It is general solution of given equation.
¿ 4
Examples. Solve xy −2 y=2 x
Let us consider associated homogeneous equation
xy ¿ −2 y=0
It is separable equation. Thus
dy 2 y dy 2 dx dy 1
= ⇒ = ⇒∫ =2∫ dx+ln C
dx x y x y x

hence
ln y =ln x 2 +ln C
or
y
ln =ln x 2
C y=Cx 2
Let us substitute C(x) into C
2
Then y=C ( x) x
Differentiating this expression, we find
y ¿ =C¿ ( x ) x2 +2C ( x ) x
Substituting y ¿ and y into given equation, we get
C ¿ ( x ) x 3 +2 C( x ) x 2 −2C ( x ) x2 =2 x 4
¿
C ¿ ( x ) x 3=2 x 4 or C ( x)=2x
Integrating, we find

C ( x )=∫ 2 xdx+ C 1 ⇒ C (x )=x 2 +C 1


So
y=( x 2 +C 1 ) x 2
It is general solution of given equation.

Bernoulli Equation

Definition. Differential equation in the form


¿
y +P (x ) y =Q( x ) y n , (1)
where P(x) and Q(x) are continuous functions and n real number is called
Bernoulli Equation.
First notice that if n=0 or n=1 then the equation is linear and we already know
now to solve it in these cases.
n
In order to solve equation (1), first let us divide the equation by y to get,
¿
y−n y +P( x) y 1−n =Q( x) (2)
1−n
Using the substitution z= y (3) we convert this into a differential equation
in terms of z. Taking the derivative, we get
z ¿ =(1−n ) y−n y ¿ (4)
Now, plugging our substitutions (3) and (4) into the differential equation (2)
gives
1 ¿
z +P( x )z =Q( x )
1−n
This is a linear differential equation that we can solve for z and once we
have this in hand we can also get the solution to the original differential equation
by plugging z back into our substitution and solving for y.
Example 1. Solve
¿ 4
y+ y =x 3 y 2
x (5)
Solution. The first thing that we need to do is get this into the “proper” form
2
and that means dividing everything by y . Doing this gives,
4 −1 3
y−2 y +
¿
y =x
x
The substitution and derivative that we will need here is:

z= y −1 z ¿ =− y −2 y ¿
With this substitution the differential equation becomes,

4
−z ' + z=x 3
x
So, as noted this is linear differential equation that we know how to solve. We
have
4
z − z=−x 3
'
x (6)
Let us consider the corresponding homogeneous equation

' 4
z − z=0
x
which is separable equation. Thus
dz 4 dz dx dz dx
= z ⇒ =4 ⇒∫ =4 ∫ +ln C
dx x z x z x
4
Hence ln z=4 ln x +ln C ⇒ ln z=lnCx ⇒ z =Cx
4

Let us substitute C(x) instead of C


4
Then z=C ( x )x
Differentiating this expression, we find
¿ ¿
z =C (x )x 4 +4 C( x )x 3
¿
Substituting z and z into (6), we get

¿ 4
C ( x ) x 4 +4 C ( x ) x3 − C ( x )⋅x 4 =−x 3
x
¿ ¿ 1
C ( x ) x 4 =−x 3 ⇒ C ( x )=− ⇒ C( x )=−ln x+C1
x
so
z=(−ln x +C 1 )x 4
To get the solution in terms of y all we need to do is plug the substitution back in.
Doing this gives
y−1 =x 4 (C1 −ln x )
Example 1. Solve
( x +1 ) ( y ' + y 2 ) =− y (7)
Solution. The first thing that we need to do is get this into the “proper” form
and that means dividing everything by y 2 . Doing this gives,
1
y−2 y +1=−
¿

y ( x +1 )
The substitution and derivative that we will need here is:

z= y −1 z =− y −2 y
¿ ¿

With this substitution the differential equation becomes,

' z
−z +1=−
x+1
So, as noted this is linear differential equation that we know how to solve. We
have
z '
z −1=
x+1 (8)
Let us consider the corresponding homogeneous equation

dz dx
=
z x +1
which is separable equation. Thus
ln z=ln|x+1|+ln c
Hence z=c ( x+ 1 )
Let us substitute C(x) instead of C
Then z=C ( x ) ( x +1 )
¿
Differentiating this expression, and substituting z and z into (8), we get
C ( x ) ( x +1 )
C ¿ ( x ) ( x+1 )+C ( x )−1=
( x+1 )
C ( x )=ln ( x +1 ) +C 1

z=( x +1 ) ( ln ( x +1 ) +C1 )

y ( 1+ x ) ( ln ( x+1 ) +C 1 ) =1
.

Lecture 3

Exact First – Order Equations

Definition. The equation M ( x , y )dx +N ( x , y )dy=0 (1) is an exact differential


equation if there exists a function f of two variables x and y having continuous
partial derivatives such that
∂ f ( x, y) ∂ f ( x, y)
=M ( x , y ) =N (x , y)
∂x and ∂ y (2)
The general solution of the equation is
f ( x , y )=C (3)
we know that if f has continuous second partials, then

∂ M ∂2 f ∂2 f ∂ N
= = =
∂ y ∂ x∂ y ∂ y ∂ x ∂ x
This suggests the following test for exactness

Theorem. (Test for Exactness)


Let M and N have continuous partial derivatives. The differential equation
M ( x , y )dx +N ( x , y )dy=0 is exact if and only if
∂M ∂N
=
∂ y ∂x (4)
Let us integrate the first equation (2) with respect to the variable x, we get
x
f ( x , y )=∫ M (x , y )dx +ϕ( y )
x0

where x0 – abscissa of any point from domain of solution.


The function ϕ( y ) should be there, since in our integration, we assumed that the
variable y is constant.
Differentiating the last equation, with respect to y, we find
x
∂f ∂M
=∫ dx + ϕ¿ ( y )=N ( x , y )
∂y x ∂y
0

∂M ∂N
= ,
But, since ∂ y dx then
x

∫ ∂∂Nx dx +ϕ¿( y )=N ( x , y )


x0
.i.e.
x ¿
N ( x , y )|x +ϕ ( y )=N ( x , y )
0

or
¿
N ( x , y )−N ( x 0 , y )+ϕ ( y )=N ( x , y )

¿
Hence ϕ ( y )=N ( x 0 , y ) , and it follows that
y
ϕ ( y )=∫ N ( x 0 , y )dy +C 1
y0

Therefore,
x y
f ( x , y )=∫ M (x , y )dx +∫ N ( x 0 , y )dy + C1
x0 y0

Here p( x 0 , y 0 ) is point, in neighborhood of which there is solution of equation


(1).
And the general solution is
x y

∫ M ( x , y )dx+∫ N ( x 0 , y )dy= C
x0 y0

Example. Solve the differential equation


(2 xy−3 x 2 )dx +( x 2 −2 y )dy=0
Solution. The given differential equation is exact because
∂M ∂ ∂N
= [ 2 xy−3 x 2 ]=2 x= = ∂ [ x2 −2 y ]
∂y ∂y ∂x ∂x

The general solution, f ( x , y )=C , is given by

f ( x , y )=∫ M (x , y )dx=∫ (2 xy−3 x 2 )dx =x 2 y−x 3 +ϕ( y )


∂ f (x , y ) ∂ 2
∂y
=
∂y
[ x y−x 3+ ϕ ( y ) ]=x 2+ϕ ' ( y )=x 2−2 y=N ( x , y )
¿
Thus, ϕ ( y)=−2 y , and it follows that ϕ ( y )=− y 2
+C 1 . Therefore,
f ( x , y )=x 3 y−x 3 − y 2 +C 1
and the general solution is x 2 y−x 3 − y 2 =C
Integrating factor:

Otherwise, IF the equation (4) is not equal. What we will do for solving these
equations?
So why aren't all equations exact? Consider the following example.
( x 2 + y )+( x−sin y ) dy =0
dx is exact
( x 2 + y ) ( x−sin y ) dy
+ =0
x x dx is no exact

There is no real difference between the two equations, we have just divided
through by x to obtain the second equation from the first. The equations have the
same solutions. But when we test for exactness, we find that only the first equation
is exact. The reason most first order equations aren't exact is that some key factor
has been divided out. One way to solve the equation would be to find the factor,
called an integrating factor, and put it back in. Unfortunately, finding integrating
factors can be extremely difficult. There is one situation where it is fairly
straightforward, when the equation is linear. A first order differential equation is
said to be linear if it can be written in the form
'
y + p ( x ) y=q ( x )
For a linear equation, we find an integrating factor as follows
∫ p( x )dx
μ( x )=e
If we multiply through the linear equation by μ( x ) we obtain
'
μ( x ) y ( x )+μ ( x ) p (x ) y ( x )=μ( x )q( x )
'
Now μ ( x )=μ( x ) p( x ) from the way we defined μ( x ) so we can now write our
equation as
' '
μ( x ) y ( x )+μ (x ) y ( x )=μ( x )q( x )
d
( μ( x ) y ( x ))=μ( x )q (x )
dx
Now we integrate both sides to obtain
μ( x ) y ( x )=∫ μ (x )q ( x )dx
1
y( x)=
μ( x)
∫ μ ( x)q( x)dx
So
WARNING: You can't cancel the inside the integral by the outside the integral.
This formula is confusing because we are using x as both the dummy variable of
integration and as the independent variable of the resulting function.

Lecture 4
Lagrange and Clairaut Equations*
Alexis Claude Clairaut (1713-1765) solved the differential equation
y=x y + g ( y )
' '

This is a special case of the family of Lagrange equations,


y=xf ( y' ) + g ( y ' )
,
named after Joseph Louis Lagrange (1736-1813). These equations also have
solutions called singular solutions. Singular solution are solutions for which there
is a failure of uniqueness to the initial value problem at every point on the curve. A
singular solution is often one that is tangent to every solution in a family of
solutions. First, we consider solving the more general Lagrange equation. Let
'
p= y in the Lagrange equation, giving
'
y=xf ( p ) + g ( p )
. (1)
Next, we differentiate with respect to x to find
' ' ' ' '
y = p=f ( p ) + x f ( p ) p + g ( p ) p .
Lagrange equations, y=xf ( y ) + g ( y )
'

Here we used the Chain Rule. For example,


dg ( p ) dg dp
=
dx dp dx
'
Solving for p , we have
dp p−f ( p )
= '
dx x f ( p ) + g' ( p )
(2)
We have introduced , p= p ( x ) viewed as a function of x . Let’s assume that we can
invert this function to find x=x ( p ) . Then, from introductory calculus, we know
that the derivatives of a function and its inverse are related,
dx 1
=
dp dp
dx
Applying this to Equation (2), we have
' '
dx x f ( p ) + g ( p )
=
dp p−f ( p )
f ' ( p) g' ( p )
x'− x=
p−f ( p ) p−f ( p' )
(3)
Assuming that p−f ( p )≠0 . As can be seen, we have transformed the Lagrange
equation into a first order linear differential equation (3) for x ( p ) . Using methods
from earlier in the chapter, we can in principle obtain a family of solutions
x=F ( p , C ) , where C is an arbitrary integration constant. Using Equation (1), one
might be able to eliminate p in Equation (3) to obtain a family of solutions of the
Lagrange equation in the form
ϕ ( x , y , C )=0
.
If it is not possible to eliminate p from Equations (1) and (3), then one could
report the family of solutions as a parametric family of solutions with p the
parameter. So, the parametric solutions would take the form

x=F ( p , C ) ,
y=F ( p ,C ) f ( p ) + g ( p )
(4)
We had also assumed the p−f ( p )≠0 . However, there might also be solutions of
Lagrange’s equation for which p−f ( p )=0 . Such solutions are called singular
solutions.
Example 1.
' ¿
Solve the Lagrange equation y=2 x y − y . We will start with Equation (3). Noting
that
f ( p )=2 p , g ( p )=− p2 , we have
' '
' f ( p) g ( p)
x− x=
p−f ( p ) p−f ( p )
' 2 −2 p
x− x=
p−2 p p−2 p
' 2
x + x=2.
p
(5)
This first order linear differential equation can be solved using an integrating
factor. Namely,
μ ( p )=exp ( p )
∫ 2
dp =e2 ln p

.
= p 2

Multiplying the differential equation by the integrating factor, we have


d
( xp 2 ) =2 p 2
dp
Integrating,
2 3
xp 2 = p +C
3
This gives the general solution
2 C
x ( p )= p+ 2
3 p
' 2
Replacing y = p in the original differential equation, we have y=2 xp− p . The
family of solutions is then given by the parametric equations
2 C
x= p+ 2
3
'
p
(6)
y=2
( 2
3
C
) 2 1 2 2C
p + 2 p− p = p +
p 3 p
The plots of these solutions is shown in Figure 1.7. We also need to check for a
singular solution. We solve the equation p−f ( p )=0 , or p=0 . This gives the
solution y ( x )=( 2 xp− p ) p=0 =0 . The Clairaut differential equation is given by
2

y=x y ' + g ( y ' )


.
'
Letting p= y , we have
y=xp + g ( p )
.
f ( p )=p . Differentiating with respect to x
This is the Lagrange equation with
' ' '
p= p+ x p + g ( p ) p
y=x y ' + g ( y ' )
Clairaut equations, .
Rearranging, we find
'
x=−g ( p )
So, we have the parametric solution,
'
x=−g ( p )
(7)
'
y=− p g ( p ) +g ( p )
For the case that y =C , it can be seen that y=Cx + g ( C ) is a general solution
'

solution.
' ¿
Example 2. Find the solutions of y=x y − y . As noted, there is a family of
straight line solutions
y=Cx−C 2 , since g ( p )=− p2 . There might also by a parametric solution not
contained n this family. It would be given by the set of equations
'
x=−g ( p )=2 p
y=− p g ( p ) +g ( p )=2 p 2− p 2= p2
'

(8)
x2
y=
Eliminating p , we have the parabolic curve 4 . In Figure 1.8 we plot these
solutions. The family of straight line solutions are shown in blue. The limiting
curve traced out, much like string figures one might create, is the parametric curve.
1.4.3 Riccati Equation*
Jacopo Francesco Riccati (1676-1754) studied curves with some specified
curvature. He proposed an equation of the form
y +a ( x ) y 2 +b ( x ) y + c ( x )=0
'

around 1720. He communicated this to the Bernoulli’s. It was Daniel Bernoulli


who had actually solved this equation. As noted by Ranjan Roy (2011), Riccati had
published his equation in 1722 with a note that D. Bernoulli giving the solution in
terms of an anagram. Furthermore, when a=0 , the Riccati equation reduces to a
Bernoulli equation. We will show that the Ricatti equation can be transformed into
a second order linear differential equation. However, there are special cases in
which we can get our hands on the solutions. For example, if a, b, and c are
constants, then the differential equation can be integrated directly. We have
dy
=−( ay 2 + by+ c )
dx
This equation is separable and we obtain
dy
x−C=−∫ 2
ay +by +c .
When a differential equation is left in this form, it is said to be solved by
quadrature when the resulting integral in principle can be computed in terms of
elementary functions.2 2 By elementary functions we mean well known functions
like polynomials, trigonometric, hyperbolic, and some not so well know to
undergraduates, such as Jacobi or Weierstrass elliptic functions. If a particular
solution is known, then one can obtain a solution to the Riccati equation. Let the
known solution be y 1 ( x ) and assume that the general solution takes the form
y ( x )= y 1 ( x )+ z ( x ) for some unknown function z ( x ) . Substituting this form into the
1
v ( x )=
differential equation, we can show that z ( x ) satisfies a first order linear

differential equation. Inserting y= y 1 + z into the general Riccati equation, we have


dy dz dy
0= +a ( x ) y 2 +b ( x ) y +c= + az 2 +2 azy 1 + bz+ 1 + ay 21 +by 1 + c=
dx dx dx
(1)
dz dz
+a ( x ) [ 2 y 1 z+ z2 ] +b ( x ) z−a ( x ) z 2 = + [ 2 a ( x ) y 1 +b ( x ) ] z
dx dx
The last equation is a Bernoulli equation with n=2 . So, we can make it a linear
'
1 ' z
z= , z =− 2
equation with the substitution v v . Then, we obtain a differential
equation for v ( x ) . It is given by
v −( 2 a ( x ) y 1 ( x ) +b ( x ) ) v =a ( x ) .
'

Example 1.
2 x 2x x '
Find the general solution of the Riccati equation, y − y +2 e y−e −e =0 using
x
the particular solution y 1 ( x )=e . We let the sought solution take the form
y ( x )=z ( x ) +e x Then, the equation for z(x) is found as
dz
=z 2
. dx
1
z=
This equation is simple enough to integrate directly to obtain C−x . Then, the
solution to the problem becomes
1
y ( x )= +e x
C−x

Lecture 5
Applications
In this section we will look at some simple applications which are modeled with
first order differential equations. We will begin with simple exponential models of
growth and decay
1.3.1 Growth and Decay
Some of the simplest models are those involving growth or decay. For example, a
population model can be obtained under simple assumptions. Let P ( t ) be the
population at time t . We want to find an expression for the rate of change of the
dp
population, dt . Assuming that there is no migration of population, the only way
the population can change is by adding or subtracting individuals in the population.
The equation would take the form
dP
=Rate In−Rate Out
dt
The Rate In could be due to the number of births per unit time and the Rate Out by
the number of deaths per unit time. The simplest forms for these rates would be
given by
Rate In=bP and the Rate Out=mp
Here we have denoted the birth rate as b and the mortality rate as m . This gives
the total rate of change of population as
dp
=bP−mP=kP
dt
(1.27)
Equation (1.27) is a separable equation. The separation follows as we have seen
earlier in the chapter. Rearranging the equation, its differential form is
dP
=kdt
P
Integrating, we have
dP
∫ P =∫ kdt
ln|P|=kt +C
(1.28)
Next, we solve for P ( t ) through exponentiation, Integrating, we have
|P ( t )|=e kt+C
P ( t ) =±e kt +C
(1.29)
kt
C
=±e e
= Ae kt
C
Here we renamed the arbitrary constant, ±e as A
If the population at t =0 is P0 , i.e., P ( 0 )=P 0 , then the solution gives
P ( 0 )= Ae 0 =A=P 0 . So, the solution of the initial value problem is
P ( t ) =P0 e kt
Equation (1.27) the familiar exponential model of population growth: Malthusian
population growth.
dP
=kP
dt
This is easily solved and one obtains exponential growth (k > 0) or decay (k < 0).
This Malthusian growth model has been named after Thomas Robert Malthus
(1766-1834), a clergyman who used this model to warn of the impending doom of
the human race if its reproductive practices continued.
Example 1.8.
If 150.0 g of Thorium-234 decays to 137.6 g of Thorium234 in three days, what is
its half-life?
This is another simple decay process. If Q ( t ) represents the quantity of unstable
material, then Q ( t ) satisfies the rate equation
dQ
=kQ
dt
with k < 0.
kt
The solution of the initial value problem, as we have seen, is Q ( t ) =Q0 e . Now, let
1
Q ( τ )= Q 0
the half-life be given by τ. Then, 2 . Inserting this fact into the solution,
we have
Q ( τ )=Q0 e kt
1
Q0 =Q0 e kt
2
1 kt
=e
2
t
Noting that Q ( t ) =Q0 ( e ) , we solve Equation (1.31) for
k

−1
e k =2 . τ

Then, the solution can be written in the general form


t

τ
Q ( t ) =Q 0 2 .
ln 2
k =− <0
Note that the decay constant is τ . Returning to the problem, we are
given
3

τ
Q ( 3 )=1502 =137 . 6
Solving to τ,
3
− 136 . 7
τ
2 =
150
−3 ln 2=ln .9173 τ
3 ln 2
τ =− =24 . 09
ln 9173
(1.32)
Therefore, the half-life is about 24.1 days
1.3.4 Mixture Problems
Mixture problems often occur in a first course on differential equations as
examples of first order differential equations. In such problems we consider a tank
of brine, water containing a specific amount of salt with pure water entering and
the mixture leaving, or the flow of a pollutant into, or out of, a lake. The goal is to
prdict the amount of salt, or pollutant, at some later time. In general one has a rate
of flow of some concentration of mixture entering a region and a mixture leaving
the region. The goal is to determine how much stuff is in the region at a given time.
This is governed by the equation
Rate of change of substance = Rate In − Rate Out.
The rates are not often given. One is generally given information about the
concentration and flow rates in and out of the system. If one pays attention to the
dimentsion and sketches the situation, then one can write out this rate equation as a
first order differential equation. We consider a simple example.
Example 1.10. Single Tank Problem A 50 gallon tank of pure water has a brine
mixture with concentration of 2 pounds per gallon entering at the rate of 5 gallons
per minute. At the same time the well-mixed contents drain out at the rate of 5
gallons per minute. Find the amount of salt in the tank at time t. In all such
problems one assumes that the solution is well mixed at each instant of time.
Let x (t ) be the amount of salt at time t . Then the rate at which the salt in the tank
increases is due to the amount of salt entering the tank less that leaving the tank.
To figure out these rates, one notes that
dx
dt has units of pounds per minute. The amount of salt entering per minute is given
by the product of the entering concentration times the rate at which the brine
enters. This gives the correct units:

(2
pounds
gal )( )
5
gal
min
=10
pound
min
Similarly, one can determine the rate out as

(x pounds
50 gal )( )
5
gal
=
x pounds
min 10 min
Thus, we have
dx x
=10−
dt 10
This equation is solved using the methods for linear first order equations. The
x
10
integrating factor is μ= e , leading to the general solution
−t
10
x (t )=100+ Ae
Using the initial condition, one
finds the particular solution
( )
−t
10
x (t )=100 1−e
Often one is interested in the long time behavior of a system. In this case we have
that lim t →∞ x ( t )=100 lb . This makes sense because 2 pounds per galloon enter during
this time to eventually leave the entire 50 gallons with this concentration. Thus,
lb
50 gal×2 =100 lb
50 gal

Lecture 6
Differential equations of second – order.
Reduction of order
Some second-order equation can be reduced to first-order equation, rendering
then susceptible to the simple methods of solving equations of the first order. The
following are three types of such second-order equations:
Type 1: Let
y //=f ( x ) (1)
Integrating this equation (1), we obtain
y =∫ f (x )dx +C 1
¿

Integrating this equation once again we get


y=∫ dx ∫ f ( x)dx+C1 x+C 2
where C 1=constant , C2 =constant
Example 1. Solve the differential equation
y //=x +sin x
Solution. This equation relates to the first type
x2
y =∫ ( x +sin x )dx +C1 =
¿
−cos x +C 1
2
Then
y=∫ ( x2
2 )
−cos x +C 1 dx +C 2=

x3
−sin x +C 1 x+C 2
6
Type 2: Second-order equations with the dependent variable mussing.
This is an equation of the type
¿
F ( x , y , y // )=0 (2)
The dependent variable y does not explicitly appear in the equation. This type
of second-order equation is easily reduced to a first-order equation by the
transformation
¿
y = p.
// '
This substitution obviously implies y = p , and the original equation
becomes a first-order equation for p
¿
F ( x, p , p )=0
Suppose we have managed to integrate this equation and have obtained its
general solution p=ϕ (x , C1 ) . Then we have
¿
y =ϕ ( x ,C 1 )
and therefore the general solution of equation (2) is thus obtained:
y=∫ ϕ(x , C1 )dx +C2
Example 2. Solve the differential equation
xy // = y ¿
¿ ¿
Solution. Since the dependent variable y is missing, let y = p and y = p .
//

These substitutions transform the given second-order equation into the first-
order equation
¿
xp = p
It is a separable equation. Separating the variables, we obtain
dp dx
=
p x
Integrating, we have

dP dx
∫ P =∫ x
Then ln p=ln x+ ln C1 or ln p=ln xC 1
and hence
p=xC 1
x2
y =C1 x ⇒ y=∫ C 1 x +C 2=C 1
¿
+C 2
So 2
Type 3. Second-order nonlinear equations with the independent variable
missing.
Let it be of the form
F ( y , y ¿ , y // )=0 (3)
The independent variable x does not explicitly appear in the equation.
The method for reducing the order of these second-order equations begins
with the same substitution as for Type 2 equations, namely, replacing y/ as p. But
instead of simple writing y// as p/, the trick here is to express y// in terms of a first
derivative with respect to y.
Therefore we write
y //= ( )
d dy dp dp dy
= =
dx dx dx dy dx
=p
dp
dy
Now we deduce from equation (3) the equation

(
F y , p, p
dp
dy
=0)
which is a first-order equation.
If we manage to integrate it and to find its general solution p=ϕ ( y , C 1 ) then
we have
dy
=ϕ ( y ,C 1 )
dx
and therefore the general solution of equation (3) can be directly written in the
form
dy
∫ ϕ( y , C ) =x+C2
1 .
Example 3. Solve the differential equation
¿
1+( y )2 =2 yy //
dp
¿ y //= p
Solution. The substitutions y = p and dy transform this second-order
equation for y into the following first-order equation for p:
dp
1+ p2 =2 yp
dy
Separating the variables, we obtain
2 pdp dy
=
1+ p2 y
Integrating, we have
2 pdp dy
∫ 1+ p 2 =∫ y +ln C 1
It follows that
2
ln (1+ p 2 )=ln y+ ln C1 or 1+ p =C1 y
⇒ p 2=C 1 y−1 ⇒ p= C1 y −1 √
¿
Now, since p= y , this last result becomes
dy
=√ C1 y−1
dx
Separating the variables, we get
dy
∫ =∫ dx+C2
√ 1
C y −1
2
√C y−1=x+C2
C1 1
So
4 ( C1 y −1 )
=( x +C 2 )2
or C21

.
Second – Order Linear Differential Equations

A second-order linear differential equation has the form


d2 y dy
+ p (x ) + q( x ) y=f ( x )
dx 2 dx , (1)

where p( x ), q( x ) and f ( x ) are continuous functions. If f ( x )≠0 equation (1) is


nonhomogeneous. If f ( x )=0

d2 y dy
2
+ p (x ) + q( x ) y=0
dx dx (2)

equation (2) is called homogeneous linear equation.

Theorem 1. If y 1 ( x ) and y 2 (x ) are both solutions of the linear homogeneous


equation (2) and C1 and C2 are any constants, then the linear combination
y ( x )=C1 y 1 (x )+C2 y 2 ( x )

is also a solution of equation (2)


Proof. Since y 1 and y 2 are solution of (2), we have
¿
y 1// + p( x ) y 1 +q ( x ) y 1=0
and
¿
y 2// + p( x ) y 2 + q( x ) y 2 =0
Therefore, using the basic rules for differentiation, we have
¿ ¿
y + py +qy =(C 1 y 1 +C 2 y 2 )// + p (x )(C1 y 1 +C 2 y 2 ) +
//

¿ ¿
q ( x )(C1 y 1 +C2 y 2 )=(C 1 y //1 + C2 y 2// )+ p ( x )(C1 y 1 + C2 y 2 )+
+q ( x )( C 1 y 1 +C 2 y 2 )=C1 [ y //1 + p ( x ) y ¿1 +q ( x ) y 1 ] +
+C 2 [ y 2// + p( x ) y ¿2 + q( x ) y 2 ] =C 1⋅0+C 2⋅0=0
Thus, y=C 1 y 1 +C 2 y 2 is a solution of equation (2). The other fact we need is given by
the following theorem. It says that the general solution is a linear combination of
two linearly independent solutions y 1 and y 2 .
This means that neither y 1 and y 2 is a constant multiple of the other. For
2 2 x
instance, the functions f ( x )=x and g( x )=5 x are linearly dependent, but f ( x )=e
x
and g( x )=xe are linearly independent.
Theorem 2. If y 1 and y 2 are linearly independent solutions of equation (2),
then the general solution is given by
y ( x )=C1 y 1 (x )+C2 y 2 ( x )
where C and C 2 are arbitrary constants.
1

Definition. Let y 1 ( x ) and y 2 (x ) be two differentiable functions. The


Wronskian W ( y 1 , y 2 ) , associated to y 1 and y 2 , is the function
W ( y 1 , y 2 )=¿| y 1 ( x ) y 2 ( x ) ¿|¿ ¿ ¿
¿ (3)
Theorem 3. If y 1 ( x ) and y 2 (x ) are linearly dependent, then Wronskian
W ( y 1 , y 2 )=0 .
Theorem 4. If y 1 ( x ) and y 2 (x ) are linearly independent solution of equation
(2), then W ( y 1 , y 2 )≠0 .
Theorem 5. If y 1 ( x ) and y 2 (x ) are two solutions of equation (2), then

( )
x

W ( y 1 , y 2 )( x )=W ( y 1 , y 2 )(x 0 )exp −∫ p (t )dt


x0
.
Proof. Since y 1 and y 2 are solutions of (2) we have
¿
y 1// + p( x ) y 1 +q ( x ) y 1=0 (4)
¿
y 2// + p( x ) y 2 + q( x ) y 2 =0 (5)
Now we multiply (4) by y 2 and multiply (5) by y 1 . Subtract the resulting two
equations to obtain.
¿ ¿
y 1 y 2//− y //1 y 2 + p ( x )( y 1 y 2 − y 1 y 2 )=0 (6)
Recall the definition (3) and observe that
dW
= y 1 y 2// − y //1 y 2
dx
Hence (6) is the equation
dW
+ p( x )W ( x )=0
dx (7)
Separating the variables, we get
dW
=− p( x )dx
W

Integrating, we have
x
ln W =−∫ p( x ) dx +ln C
x0

or
x
W
ln =−∫ p( x ) dx
C x 0

So

( )
x

W ( y 1 , y 2 ) ( x )=C exp −∫ p( x ) dx
x0

where C=W ( y 1 , y 2 )( x 0 )

Lecture 7
Second-order linear homogeneous differential equation with constant
coefficients

We now study solutions of the homogeneous, constant coefficient differential


equation, written as
ay // + by ¿ +cy =0 (1)
Where a,b, and c are constants and a≠0 . We “guess” a solution of the form
kx
y ( x )=e (where k is a constant)
¿
y =ke kx , y // =k 2 e kx
kx
If we substitute these expressions into equation (1), we see that y=e is a
solution if
ak 2 ekx +bke kx +cekx =0
or
(ak 2 + bk +c )e kx =0
kx kx kx
But e is never 0. Since e >0 . Thus y=e is a solution of equation (1) if k
is a root of the equation
ak 2 +bk +c=0 (2)
Equation (2) is called the auxiliary equation (characteristic equation) of the
differential equation (1).
It should be noted that it is algebraic equation that is obtained from the
differential equation by replacing y // by k2, y/ by k and y by 1. Sometimes the roots
k1 and k2 of characteristic equation can be found by factoring. In other cases they
are found by using the quadratic formula:
−b+ √ b 2−4 ac −b−√ b2 −4 ac
k 1= k 2=
2a , 2a (3)
2
we distinguish three cases according to the sign of the discriminant b −4 ac
2
Case 1. b −4 ac >0
In this case the roots k1 and k2 of the auxiliary equation are real and distinct, so
k1 x k2 x
y 1 =e and y 2 =e are two linearly independent solution of equation (1). (Note
k x k x
that e is not a constant multiple of e ). Therefore, by theorem 2, we have the
2 1

following fact:
2
If the roots k1 and k2 of the auxiliary equation ak +bk +c=0 are real and
unequal, then the general solution of
¿
ay // +by +cy=0 is
k1x k2 x
y=C 1 e +C 2 e (4)
// ¿
Example 1. Solve the equation y + y −6 y=0
Solution. The auxiliary equation is
2
k +k −6=(k −2)(k + 3)=0
whose roots are k1=2, k2 =-3. Therefore by (4) the general solution of the given
differential equation is
y=C 1 e 2 x +C 2 e−3 x
2
Case 2. b −4 ac=0
In this case k1=k2; that is, the roots of the auxiliary equation are real and equal. Let
us denote by k the common value of k1 and k2. Then, from formula (3), we have
b
k =−
2 a so 2 ak +b=0 (5)
kx kx
We know that y 1 =e is one solution of equation (1). We now verify that y 2 =xe is
also a solution:
¿
ay //2 + by 2 +cy 2 =a(2 ke kx +k 2 xekx )+b(e kx + kxekx )+cxe kx =
¿(2 ak + b)e kx +( ak 2 +bk + c )xe kx =0⋅( ekx )+ 0⋅( xekx )=0
The first term is 0 by equation (5); the second term is 0 because k is a root of the
kx kx
auxiliary equation. Since y 1 =e and y 2 =xe are linearly independent solutions.
Theorem 2 provides us with the general solution. If the auxiliary equation
ak 2 +bk +c=0 has only one real root k, then the general solution of
¿
ay // +by +cy=0 is
y=C 1 e kx +C 2 xekx (6)
// ¿
Example 2. Solve the equation y −2 y + y=0
2
Solution. The auxiliary equation k −2 k +1=0 can be factored as (k −1) =0
2

So the only root is k=1. By (6) the general solution is


y=C 1 e x +C2 xe x
2
Case 3. (b −4 ac )<0
In this case the roots k 1 and k 2 of the auxiliary equation are complex numbers.
We can write
k 1=α +iβ , k 2=α−iβ ,
where α and β are real numbers.

[ b
In fact α=− , β=
2a
√ 4 ac −b2
2a ]
Then, using Euler’s equation
e iθ =cos θ+i sin θ
we write the solution of the differential equation as
k1x k2 x
y=C 1 e +C 2 e =C1 e( α +iβ) x +C 2 e(α−iβ )x =
=C 1 e αx (cos βx +isin βx )+C 2 e αx (cos βx−isin βx )=
¿ e αx [(C 1 +C 2 ) cos βx +i(C1 −C 2 )sin βx ]=
~ ~
¿ e αx [ C1 cos βx+ C 2 sin βx ]
~ ~
where C 1 =C 1 +C 2 , C 1=i(C 1−C2 )
This gives all solutions (real or complex) of the differential equation.
~ ~
The solutions are real when the constants C1 and C2 are real. We summarize
the discussion as follows.
2
If the roots of the auxiliary equation ak +bx+ c=0 are the complex
// ¿
numbers k 1=α +iβ , k 2 =α −iβ , then the general solution of ay +by +c=0 is
y=e αx [ C 1 cos βx +C2 sin βx ] (7)
// ¿
Example 3. Solve the equation y +4 y +13 y=0
Solution. The auxiliary equation is
k 2 +4 k +13=0
By the quadratic formula, the roots are
k 1, 2 =−2±3 i
By (11) the general solution of the differential equation is
y=e−2 x (C1 cos 3 x +C 2 sin 3 x )

Initial-Value Problem
An initial-value problem for the second-order equation (1) consists of finding
a solution y of the differential equation that also satisfies initial conditions of the
form
¿
y ( x 0 )= y 0 y ( x 0 )= y 1
where y 0 and y 1 are given constants.
Example 4. Solve the initial-value problem
¿
y // + y ¿ −6 y=0; y ( 0)=1 and y (0)=0
Solution. From Example 1 we know that the general solution of the
differential equation is
y ( x )=C1 e 2 x +C 2 e−3 x
Differentiating this solution, we get
¿
y (x )=2 C1 e 2 x −3 C2 e−3 x .
To satisfy the initial conditions we require that
y (0 )=C 1 +C 2=1
¿
y (0)=2C 1−3C 2 =0 .
2
C 2= C 1
We have from second equation 3 and from the first
2 3 2
C 1 + C 1=1 ⇒C 1 = , C 2=
3 5 5
Thus, the required solution of the initial-value problem if
3 2
y= e2 x + e−3 x
5 5
Example 5. Solve the initial-value problem
y // + y=0 y (0 )=2 y ¿ ( 0)=3
Solution. The auxiliary equation is
k 2 +1=0 or k 2 =−1 , whose roots are ±i . Thus α=0 , β=1 and since e 0 x =1 ,
the general solution is
y ( x )=C1 cos x +C 2 sin x
'
Since y ( x )=−C sin x +C 2 cos x
the initial conditions become
y (0 )=C 1=2 y ¿ (0 )=C 2=3
Therefore, the solution of initial-value problem is
y ( x )=2cos x+3 sin x
// ¿
Summary: Solution of ay +by +c=0
2
Roots of ak +bk +c=0 General solution
k 1 , k 2 - real and distinct y=C 1 e
k 1x
+C 2 e
k2 x

k 1=k 2=k y=C 1 e kx +C 2 xekx


k 1 , k 2 - complex: α ±iβ y=e αx (C 1 cos βx +C 2 sin βx )

Lecture 8
Nonhomogeneous Linear Differential Equations
Let us consider second-order nonhomogeneous linear differential equations
with constant coefficients, that is, equation of the form
¿
ay // + by +cy =f (x ) (1)
where a,b,c are constants and f(x) is a continuous function. The related
homogeneous equation
¿
ay // +by +cy=0 (2)
is called the complementary equation and plays an important role in the solution
of the original nonhomogeneous equation (1).
Theorem. The general solution of the nonhomogeneous differential equation
(1) can be written as
y ( x )= y p ( x )+ y c ( x ) ,
where y p is a particular solution of equation (1) and y c is the general solution
of the complementary equation (2).
Proof. All we have to do is verify that if y is any solution of equation (1), then
y− y p is a solution of the complementary equation (2).
Indeed
'
a ( y− y p ) // +b ( y− y p ) +c ( y− y p )=
¿ ay // + ay //p +by ¿ −by ¿p +cy−cy p =
¿( ay // +by ¿ + cy )−(ay //p +by ¿p +cy p )=
¿ f ( x )−f ( x )=0

which is what we had to prove.


We know from last Lecture 11 how to solve the complementary equation.
Therefore, theorem 1 says that we know the general solution of the
nonhomogeneous equation as soon as we know a particular solution y p . There are
two methods for finding a particular solution: The method of undetermined
coefficients is straightforward but works only for a restricted class of functions
f ( x ) . The method of variation of parameters works for every function f ( x ) but it is
usually more difficult to apply in practice.

The method of Undetermined Coefficients

I. We first illustrate the method of undetermined coefficients for the equation


¿
ay // + by +cy =f (x )
where f ( x ) is a polynomial of the form
f ( x )=Pn ( x )=a0 x n + a1 x n−1 +. . .+ an
It is reasonable to guess there is a particular solution y p that is a polynomial of
// ¿
the same degree as f ( x ) because if y is a polynomial, then ay +by +cy is also a
r
polynomial. We therefore will look for y p of the form y p =Qn ( x ) x , where Qn ( x ) is a
polynomial of the same degree as f ( x ) with unknown coefficients and r is number
of the roots of the auxiliary equation of (2), that is equal to zero.
// ¿ 2
Example 1. Solve the equation y + y −2 y=x .
Solution. The auxiliary equation of
¿
y // + y −2 y=0 is
k 2 +k −2=(k−1 )(k +2 )=0
with roots k 1=1 , k 2=2 .
So the solution of the complementary equation is
y c =c 1 e x + c 2 e−2 x
2
Since f ( x )=x is a polynomial of degree 2, we seek a particular solution of the
form
y p ( x )= Ax 2 +Bx +C
Then
¿
y p ( x )=2 Ax+B and y //p ( x )=2 A
So, substituting into the given differential equation, we have
2 A +(2 Ax+B )−2( Ax 2 +Bx+C )=x 2
or
−2 Ax 2 +(2 Ax−2 B )x +(2 A+B−2C )= x2

Polynomials are equal when their corresponding coefficients are equal. Thus

{−2A=1¿{2A−2B=0¿¿ ¿
The solution of this system of equation is
1 1 3
A=− , B=− , C=−
2 2 4
A particular solution is therefore
1 1 3
y p ( x )=− x 2 − x−
2 2 4
and, by theorem 1, the general solution is
1 1 3
y= y c + y p =C 1 e x +C 2 e−2 x − x 2 − x−
2 2 4
Example 2. Solve the equation
¿
y // + y =5 x+3
Solution. The auxiliary equation of
// ¿
y + y =0 is
k 2 +k =0
with roots k 1=0 k 2=−1
So the solution of complementary equation is
y c =C1 +C2 e−x
Since f ( x )=5 x +3 is a polynomial of degree 1 and one of the roots of auxiliary
equation is 0 (r=1), then we look for a particular solution of the form
y p ( x )=( Ax +B ) x=Ax 2 +Bx
¿
Then p =2 Ax+B and y p =2 A
//
y
So, substituting into the given equation, we obtain
2 A +2 Ax +B=5 x+ 3
or
2 Ax +(2 A+ B )=5 x+3
Polynomials are equal when their coefficients are equal. Thus

{2 A=5¿¿¿¿
The solution of this system of equations is
5
A= ; B=−2
2
Therefore, a particular solution is
5
y p ( x )= x 2 −2 x
2
and, the general solution is
5
y= y c + y p =C 1 +C 2 e−x + x 2 −2 x
2
αx
II. If the right side of equation (1) f ( x ) is of the form e P n ( x ) , where Pn ( x) is

an n th degree polynomial we look for y p in the form


y p =Q( x ) e αx x r ,

where Qn ( x ) is a polynomial of the same degree as Pn ( x) with unknown coefficients


and r is number of the roots of the auxiliary equation of (2), which coincides with
α .
// 3x
Example 3. Solve y +4 y=e
2
Solution. The auxiliary equation is k +4=0 with roots ±2 i , so the solution of
the complementary equation is
y c (x )=C 1 cos2 x +C 2 sin 2 x
3x ¿ 3x // 3x
For a particular solution we try y p ( x )= Ae . Then y p =3 Ae and y p =9 Ae .
Substituting into the differential equation, we have
9 Ae 3 x + 4 Ae 3 x=e 3 x
1
3x 3x
A=
So 13 Ae =e and 13

Thus, a particular solution is


1 3x
y p ( x )= e
13
and the general solution is
1 3x
y ( x )=C1 cos 2 x +C 2 sin 2 x + e
13
Example 4. Solve the equation
¿
y //−2 y −3 y=( x+2 )e3 x
Solution. The auxiliary equation is
k 2−2 k −3=0 with roots k 1=−1 , k 2 =3 .

So the solution of the complementary equation is


y c (x )=C 1 e−x +C 2 e 3 x

Since x +2 is a polynomial of degree 1 and one of the roots of auxiliary


equation is coincided with 3 in exponent, then we look for particular solution in
the form
y p =x ( Ax+B)e 3 x

or y p =( Ax 2 +Bx )e 3 x

Then
¿
y p =(2 Ax+B )e3 x +3( Ax 2 +Bx )e3 x =
=(3 Ax 2 +3 Bx+2 Ax+B )e 3 x
and
y //p =(6 Ax+3 B+2 A )e 3 x +3(3 Ax 2 +3 Bx+2 Ax+B )e 3 x =
=(9 Ax 2 +12 Ax+9 Bx+6 B+2 A )e3 x
Substituting into the differential equation, we have
( 9 Ax 2 +12 Ax+9 Bx +6 B+2 A )e3 x−
−2(3 Ax 2 +3 Bx+2 Ax+B)e 3 x −
−3( Ax 2 +Bx )e 3 x=( x+2)e3 x
or 9 Ax 2 +12 Ax +9 Bx +6 B+2 A−
−6 Ax 2 −6 Bx−4 Ax−2 B−
2
−3 Ax −3 Bx=x +2
Simplifying, we get
8 Ax+(2 A+ 4 B)=x+ 2
whence

{8 A=1¿¿¿¿
The solution of this system of equation is
1 7
A= B=
8 and 16

Thus, a particular solution is

y p ( x )= ( 18 x +167 x ) e
2 3x

and the general solution is

y ( x )=C1 e− x +C 2 e3 x + ( 18 x +167 x) e
2 3x

III. If the right side of equation (1) f ( x ) is of the form M cos βx+ N sin βx , we take
as particular solution a function of the form
y p ( x )=( A cos βx +B sin βx ) x r
where A,B are unknown coefficients and r = number of the roots of the auxiliary

equation of (2), coinciding with βi


// ¿
Example 5. Solve y + y −2 y=sin x
Solution. We try a particular solution
y p ( x )= A cos x+B sin x
¿
Then y p ( x)=− A sin x+B cos x

y //p ( x )=−A cos x−B sin x


So substitution in the differential equation gives
(−A cos x−B sin x )+(−A sin x+B cos x )−
−2( A cos x+B sin x )=sin x
or
(−3 A +B )cos x +(−A−3 B )sin x=sin x
This is true if

{−3A+B=0¿¿¿¿
The solution of this system is
1 3
A=− B=−
10 and 10

So a particular solution is
1 3
y p ( x )=− cos x− sin x
10 10
In example 1 we determined that the solution of the complementary equation is
y c =C1 e x +C 2 e−2 x

Thus, the general solution of the given equation is


1
y ( x )=C1 e x +C 2 e−2 x− (cos x+3 sin x )
10
If f ( x ) is a sum of functions of the preceding types, we use the easily verified
yp yp
principle of superposition, which that if 1 and 2 are solution of
¿
ay // + by +cy =f 1 ( x )

and ay // + by ¿ +cy =f 2 ( x )

yp + yp
respectively, then 1 2 is a solution of
¿
ay // + by +cy =f 1 ( x )+f 2 ( x )
// x
Example 6. Solve y −4 y =xe +cos2 x
2
Solution. The auxiliary equation is k −4=0 with roots ±2 , so the solution of
the complementary equation is
y c (x )=C 1 e2 x +C2 e−2 x
// x
For the equation y −4 y =xe we try
x
y p 1 ( x )=( Ax +B )e
x
y p =( Ax +B+ A )e
¿
Then 1

y //p 1 =( Ax+2 A+ B )e x

So substitution in the equation gives


( Ax+2 A +B)e x −4 ( Ax+B)e x=xe x

or (−3 Ax+2 A−3 B )e x =xe x

Thus

{−3 A=1¿¿¿¿
1 2
A=− , B=−
So 3 9 and

(1 2
y p ( x )= − x− e x
1 3 9 )
//
For the equation y −4 y =cos2 x , we try
y p ( x )=C cos 2 x+ D sin 2 x
2

Substitution gives
−4 C cos2 x−4 D sin 2 x−4(C cos2 x+D sin 2 x )=cos 2 x
or −8 C cos 2 x−8 D sin 2 x=cos2 x

therefore −8 C=1 ; −8 D=0 and


1
y p ( x )=− cos2 x
2 8
By the superposition principle, the general solution is
y= y c + y p + y p2 =C1 e 2 x +C 2 e−2 x −
1 ( 1
3
2
) 1
x+ e x − cos 2 x
9 8
// ¿
Summary: A particular solution of ax + by +cy =f ( x )
f ( x) yp
I Pn ( x ) Qn ( x )x r , r is number of roots
of the auxiliary equation
equals 0
II Pn ( x )eαx Qn ( x )x αx⋅x r , r is number of
roots of the auxiliary equation
which coincides with α
III M cos βx+ N sin βx ( A cos βx +B sin βx ) x r ,r is
number of roots of the
auxiliary equation which
coincides with βi

Lecture 9
The Method of Variation of Parameters
Suppose we have already solved the homogeneous equation
ay // +by ¿ +cy =0
and written the solution as
y ( x )=C1 y 1 (x )+C2 y 2 ( x ) (1)

where y 1 and y 2 are linearly independent solutions. Let us replace the constants (or

parameters) C1 and C2 in equation (1) by arbitrary functions u1 (x ) and u2 ( x ) . We


look for a particular solution of the nonhomogeneous equation
ay // + by ¿ +cy =f (x )
of the form
y p ( x)=u 1 ( x) y 1 ( x)+u2 ( x ) y 2 ( x) (2)
This method is called variation of parameters because we have varied the
parameters C1 and C2 to make them functions. Differentiating equation (2), we get
¿ ¿ ¿ ¿ ¿
y p =(u1 y 1 +u2 y 2 )+(u 1 y 1 +u2 y 2 ) (3)

Since u1 and u2 are arbitrary functions, we can impose two conditions on them.

One condition is that y p is a solution of the differential equation; we can choose the
other condition so as to simplify our calculations. In view of the expression in
equation (3), let us impose the condition that
u¿1 y 1 + u¿2 y 2 =0 (4)
Then
¿ ¿ ¿ ¿
y //p =u 1 y 1 +u2 y 2 +u1 y //1 +u2 y 2//
Substituting in the differential equation, we get
¿ ¿ ¿ ¿
a (u1 y 1 +u2 y 2 +u1 y 1// +u2 y 2// )+
+b (u1 y ¿1 +u2 y ¿2 )+C (u1 y 1 +u 2 y 2 )=f (x )
or
¿ ¿
u1 (ay 1// +by 1 + cy 1 )+u2 ( ay 2// +by 2 + cy 2 )+
+ a(u¿1 y ¿1 + u¿2 y ¿2 )=f ( x ) (5)

But y 1 and y 2 are solution of the complementary equation, so


¿ ¿
ay 1// + by 1 +cy 1=0 and ay //2 + by 2 +cy 2 =0

and equation (5) simplifies to


a (u¿1 y ¿1 +u¿2 y ¿2 )=f ( x ) (6)
Equations (4) and (6) form a system of two equations in the unknown
¿ ¿
functions u1 and u2 . After solving this system we may be able to integrate to find
u1 and u2 and then the particular solution is given by equation (2).
π
y // + y=tan x , 0< x <
Example1. Solve the equation 2
k =±i , so the solution
2
Solution. The auxiliary equation is k +1= 0 with roots 1,2
//
of y + y= 0 is
y c =C1 sin x +C 2 cos x
Using variation of parameters, we look for a solution of the form
y p ( x)=u 1 ( x)sin x+u 2 ( x)cos x
Then
¿ ¿ ¿
y p =(u1 sin x+u 2 cos x )+(u1 cos x−u2 sin x )
Set
¿ ¿
u1 sin x +u2 cos x =0 (7)
Then
¿ ¿
y //p =u 1 cos x−u2 sin x−u 1 sin x−u2 cos x
For y p to be a solution we must have
¿ ¿
y //p + y p =u 1 cos x−u2 sin x=tan x (8)
Solving equations (7) and (8), we get
¿
u1 ( sin2 x+ cos2 x )=cos x tan x
¿
u1 =sin x , u1 (x )=−cos x

We seek a particular solution, so we don’t need a constant of integration here.


Then from equation (7), we obtain
sin x
¿ ¿ sin2 x cos2 x−1 1
u2 = u 1=− = =cos x−
cos x cos x cos x cos x

So
u2 ( x )=sin x−ln|tan ( x2 + π4 )|
Therefore

[
y p ( x )=−cos x sin x + sin x−ln|tan ( )]
x π
+ | cos x=
2 4

=−cos x ln|tan ( )
x π
+ |
2 4
and the general solution is
y ( x )=C1 sin x +C 2 cos x−cos x ln|tan ( )
x π
+ |
2 4

Lecture 10
Complex Numbers
Definitions
Definition 1.1 Complex numbers are defined as ordered pairs ( x , y )
Points on a complex [Link] axis, imaginary axis, purely imaginary
[Link] and imaginary parts of complex number. Equality of two complex
numbers
Definition 1.2 The sum and product of two complex numbers are defined as
follows:
( x 1 , y 1 ) + ( x 2 , y 2 ) =( x 1 + x 2 , y 1 + y 2 )
( x 1 , y 1 )⋅( x 2 , y 2 ) =( x 1 x 2− y 1 y 2 , x 1 y 2 + x2 y1 )
In the rest of the chapter use z , z 1 , z 2 for complex numbers and x , y for real
[Link] and z=x +iy notation.
Algebraic Properties
1. Commutativity
z 1 + z 2 =z 2 + z 1 z 1 z 2=z 2 z 1
2. Associativity
( z 1 + z 2 ) + z 3 = z1 + ( z 2 + z 3 )( z 1 z 2 ) z 3 =z 1 ( z 2 z 3 )
3. Distributive Law
z ( z 1 + z 2 ) =zz 1 + zz 2
4. Additive and Multiplicative Indentity
z +0= z z⋅1=z
5. Additive and Multiplicative Inverse
−z=(−x ,− y )
x
( −y
z−1 = 2 2 , 2 2 , z≠0 .
x +y x + y )
6. Subtraction and Division
z1
=z 1 z −1
z 1−z 2 =z 1 + ( −z2 ) z2 2
,
7. Modulus or Absolute Value
|z|=√ x 2 + y 2
8. Conjugates and properties
z̄=x−iy=( x ,− y )
z1 ±z 2 =z 1±z 2

()
z1 z1
=
z2 z2
z1 z 2 =z 1 z 2

9.
|z|2 =z z
z+z z−z
Re z= , Im z=
2 2i
[Link] Inequality
|z 1 +z 2|≤|z 1|+|z 2|

Polar Coordinates and Euler Formula


1. Polar Form: for Ÿ z≠0 ,
z=r ( cos θ+ isin θ )
y
where r=|z|and tan θ=
x . θ is called the argument of z . Since θ+2 nπ
is also an argument of z , the principle value of argument of z is take
such that −π <θ≤π For z=0 the arg z is undefined.
2. Euler formula: Symbollically,
e iθ =( cos θ+i sin θ )

3.
i ( θ1 +θ2 )
z 1 z 2=r 1 r 2 e
z1 r 1 i ( θ 1−θ2 )
= e
z2 r2
z n =r n e nθ

[Link]’s Formula
( cos θ+ isin θ )n =cos nθ+i sin nθ

Roots of Complex Numbers Let


Let z=re i 0 then
1 1
z =r n n
( n + n ))
(
exp i
θ 2 πk

There are only n distinct roots which can be given by k=0,1,...,n−1 . If θ is a


θ
principle value of arg z . then n is called the principle root.
1

( ) (e )
1 iπ iπ iπ i2 π iπ i4π
1+i 3 + +
3= 4 12 12 3 12 3
are e ,e ,e
Example [Link] three possible roots of √ 2
Regions in Complex Plane

1. ε −nbd of z 0 is defined as a set of all points z which satisfy


|z−z 0|<ε
2. Deleted nbd of z 0 is a nbd of z 0 excluding point z 0 .
3. Interior Point, Exterior Point, Boundary Point, Open set and closed set.
4. Domain, Region, Bounded sets, Limit Points.

2 Functions of Complex Variables


Functions of a Complex Variable
A function f defined on a set m is a rule that uniquely associates to each point z
of S a complex number ω Set S is called the domain of f and ω is called the
value of f at z and is denoted by
f ( z )=ω
1
f ( z )=
Example 2.1 Write z 2 in u+iv
form .
x 2− y 2 2 xy
u ( x , y )= ( x , y )=
22
( x 2+ y ) ( x + y 2 )2
2
and
−2
u ( r , θ )=r cos2 θ v ( r , θ )=−r−2 sin 2 θ
and

Domain of f is C−{ 0 } .
A multiple-valued function is a rule that assigns more than one value to each point
of domain.
Example 2.2
f ( z )= √ z This function assigns two distinct values to each z ( ¿ 0 ) . One can choose
the function to be single-valued by specifying
√ z=+ √ r e

2
where θ is the principal value.
Elementary Function
1. Polynomials

P ( z )=a 0 +a 1 z + a2 z 2 +. ..+ an z n
Where the coefficients are real. Rational Functions.
2. Exponential Function
z2 z3
e z=1+ z + + +.. .
2! 3 !

Converges for all . For real the definition coincides with usual exponential
z

function. Easy to see that


e iθ =cos θ+i sin θ . Then
e z=e x ( cos y +i sin y )
z z z 1+ z 2
e 1 e 2 =e
a.
e z+2 πi =e z
b.
( x ,0 ) ( x ,2 π ) maps to a circle of radius e x centered at
c. A line segment from to
origin
d. No Zeros.
3. Trigonometric Functions
Define
eiz +e−iz
cos z=
2
e iz −e−iz
sin z=
2

sin z
tan z=
cos z
2 2
a. sin z +cos z=1
2 sin z1 cos z 2=sin ( z1 + z 2 ) +sin ( z 1 −z 2 )
b.
2 cos z 1 cos z 2 =cos ( z 1 + z 2 ) +cos ( z1 −z 2 )
c.
2 sin z1 sin z 2 =−cos ( z 1 + z 2 ) +cos ( z 1−z 2 )
d.
e. sin ( z +2 π )=sin z and cos ( z+2 π )=cos z
f. sin z=0 iff z=nπ n=( 0 ,±1 ,. . . )
π
cos z=0 iff z = +nπ n=( 0 ,±1 , .. . )
g. 2
h. These functions are not bounded.
i. A line segment from ( 0 , y ) to ( 2 π , y ) maps to an ellipse with semimajor axis
equal to cash y under sin function.

[Link] Functions
Define
e z +e− z
cosh z=
2

e z −e−z
sinh z=
2

sinh ( iz ) =isin z cosh ( iz )=cos z


sinh 2 z +cosh 2 z=1
sinh ( z +2 πi )=sinh ( z ) cosh ( z+2 πi )=cosh ( z )
sinh z=0 iff z=nπi n=0,±1,...

cosh z=0 iff z= ( π


2 )
+nπ i
n=0,±1,...
5. Logarithmic Function
Define
log z=logr +i ( θ+2 πn )
log z
then e =z .

a. Is multiple-valued. Hence cannot be considered as inverse of exponential


function.
b. Principle value of log function is given by
log z=logr +iΘ
Where Θ is the principal value of argument of z
c.

Analytic Functions
Limits
A function f is defined nbd of z 0 .
Definition 3.1 The limit of the function f ( z ) as z → z 0 is number ω 0 if, for any
given ε > 0 there exists a δ >0 such that
|z−z 0|<δ ⇒|f ( z )−ω0|<ε .
lim z→ z f ( z )=5 z 0
Example 3.1 f ( z )=5 z . show that 0 .
2
2 ( )
lim z→ z 0 f z =z 0
Example 3.2 f ( z )=z . Show that .
Example 3.3 f ( z )=z / z̄ show that the limit of f does not exist as z → 0 .
ω 0 =u0 +iv 0 . lim f ( z ) =ω0
Theorem 3.1 Let f ( z )=u ( x , y )+iv ( x , y ) and z→ z 0
if and only
lim
if ( x , y ) →( x , y )
0 0

lim
u=u0 and ( x , y ) →( x , y ) v=v 0 .
0 0

lim
Example 3.4 f ( z )=sin z . show that the z→ z 0 f ( z )=sin z 0
Example 3.5 f ( z )=2 x +iy Show that the lim z→ 2i f ( z )=4 i .
2

lim f ( z ) =ω0 lim F ( z )=W 0


Theorem 3.2 if z→ z 0 and z→ z0

lim [ f ( z ) + F ( z ) ] = ω0 +W 0
z→ z0
;
lim f ( z ) F ( z )=ω 0 W 0
z→ z0
;
ω0
lim f ( z ) / F ( z )= W 0¿ 0
z→ z0 W0 .
This theorem immediately makes available the entire machinery and tools used for
real analysis to be applied to complex analysis. The rules for ending limits then can
be listed as follows:
lim c=c .
1. z→ z0

n n
lim z =z 0 .
2. z→ z0

lim P ( z )=P ( z 0 )
3. z→ z0
if P is a polynomial in z .
lim exp=exp ( z 0 )
4. z→ z0

lim sin ( z )=sin z 0


5. z→ z0
.

Continuity
Definition 3.2A function f , defined in some nbd of z 0 is continuous at z 0 if
lim f ( z ) =f ( z 0 )
z → z0
.
This definition clearly assumes that the function is defined at z 0 and the limit on
the LHS exists. The function f is continuous in a region if it is continuous at all
points in that region. If functions f and g
Are continuous at z 0 then f +g , fg and f / g ( g ( z 0 ) ≠0 ) are also continuous at z 0 . If a
function f ( z )=u ( x , y )+iv ( x , y ) is continuous at z 0 then the component functions u

and v are also continuous at ( x 0 , y 0 ) .


Derivative
Definition 3.3A function f , defined in some nbd of z 0 is differentiable at z 0 if
f ( z )−f ( z 0 )
lim
z→ z0 z−z 0
df
z '
( ) ( z0 )
exists. The limit is called the derivative of f at 0 and is denoted by f z 0 or dz .
2
Example 3.6 f ( z )=z . Show that f ( z )=2 z .
'

Example 3.7 f ( z )=|z|2 . Show that this function is differentiable only at z=0 . In
2
real analysis |x|is not differentiable but |x| is.
If a function is differentiable at z , then it is continuous at z.
The converse in not true. See example 3.7.
Even if component functions of a complex function have all the partial
derivatives , does not imply that the complex function will be differentiable. See
example 3.7.
Some rules for obtaining the derivatives of function are listed here. Let f and g be
differentiable at z .
d
( f ±g ) ( z )=f ' ( z )±g ( z )
1. dz .
d
( fg ) ( z )=f ' ( z ) g ( z ) + f ( z ) g' ( z )
2. dz
d 2
( f /g )( z )=( f ' ( z ) g ( z )−f ( z ) g' ( z ) ) / [ g ( z ) ] if g ( z )≠0
3. dz .
d
( f ∘ g ) ( z )=f ' ( z ) ( g ( z ) ) g' ( z )
4. dz .
d
c=0 .
5. dz
d n
z =nz n−1
6. dz .
Cauchy-Riemann Equations
Theorem 3.3 if f ( z 0 ) exists then all the first order partial derivatives of component
'

function u ( x , y ) and v ( x , y ) exist and satisfy Cauchy-Riemann Conditions:


u x=v y
u y=−v x
2 2 2
Example 3.8 f ( z )=z =x − y +i 2 xy . Show that Cauchy-Riemann conditions are
satisfied.
2 2 2
Example 3.9 f ( z )=|z| =x + y . Show that the Cauchy-Riemann conditions are
satisfied only at z=0
Theorem 3.4 let f ( z )=u ( x , y )+iv ( x , y ) be defined in some nbd of the point z 0 . If the
first partial derivatives of u and v exist and are continuous at z 0 and satisfy Cauchy-
Riemann equations at z 0
then f is differentiable at z 0 and
'
f ( z )=u x +iv x =v y−iu y
Example 3.10 f ( z )=exp ( z ) . Show that f ( z )=exp ( z ) .
'

Example 3.11 f ( z )=sin ( z ) . Show that f ( z )=cos ( z ) .


'

z̄ 2
f ( z )=
Example 3.12 z . Show that the CR conditions are satisfied at z=0 but the
function f is not differentiable at 0.

If we write z=re then we can write Cauchy-Riemann Conditions in polar
coordinates:
1
ur = v θ
r
uθ =−rv r
Analytic Functions
Definition 3.4 A function is analytic in an open set if it has a derivative at each
point in that set.
Definition 3.5 A function is analytic at a point z 0 if it is analytic in some nbd of z 0 .
Definition 3.6 A function is an entire function if it is analytic at all points of C .
Example 3.13 f ( z )=1 /z is analytic at all nonzero points.
Example 3.14 f ( z )=|z|2 is not analytic anywhere.
A function is not analytic at a point z 0 , but is analytic at some point in each nbd of
z 0 then z 0 is called the singular point of the function f .
Harmonic Function
Definition 3.7 Areal valued function H ( x , y ) is said to be harmonic in a domain of
xy plane if it has continuous partial derivatives of the first and second order and
satisfied Laplace equation:
H xx ( x , y )+ H y ( x , y )=0 .
Theorem 3.5 If a function f ( z )=u ( x , y )+iv ( x , y ) is analytic in a domain D then the
functions u and v are harmonic in D .
Definition 3.8 if two given functions u ( x , y ) and v ( x , y ) are harmonic in domain D
and their first order partial derivatives satisfy Cauchy-Riemann Conditions
u x=v y
u y=−v x
Then v is said to be harmonic conjugate of u .
2 2
Example 3.15 Let u ( x , y )= x − y and v ( x , y )=2 xy . Show that v is hc of u and not
vice versa.
3
Example 3.16 u ( x , y )= y −3 xy . find harmonic conjugate of u .

Lecture 11
Integral of a function of a complex variable. The
Cauchy integral theorem. The Cauchy Formula.
Example : Show that a half circle in upper half plane with radius R and centered
at origin can be parameterized in various ways as given below:
1. x (t )=R cos t , y ( t )=R sin t , where t : 0→π .
2. x (t )=t , y ( t ) =√ R −t , where t :−R →R .
2 2

3. x (t )=R ( 2 t−1 ) , y (t )=2 R √ t−t , where t :0→1 .


2

Definition 4.1 A set of points z=( x , y ) in complex plane is called an are if


x=x ( t ) , y= y ( t ) , ( a≤t≤b )
Where x (t ) and y ( t ) are continuous of the real parameter t .
Example 4.3 x (t )=cost , y ( t ) =sin ( 2t ) , where t : 0 →2 π . Show that the curve cuts
itself and is closed. An are is called simple if t 1≠t 2 ⇒ z ( t 1 ) ≠z ( t 2 ) . An are is closed if
z ( a )=z ( b ) .An are is differentiable if z ' ( t )=x ' ( t ) +iy ( t ) exists and x ' ( t ) and y ' (t ) are
'
continuous. A smooth are is differentiable and z ( t ) is nonzero for all t .
Definition 4.2 Length of a smooth are is defined as
b
L ( C )=∫|z ' ( t )| dt
a
The length is invariant under parameterization change
Definition 4.3 A contour is a constructed by joining finite smooth curves end to
end such that z (t ) is continuous and z ( t ) is piecewise continuous.
'

A closed simple contour has only first and last point same and does not cross itself.
Contour Integral
If C is a contour in complex plane defined by z (t )=x ( t )+iy ( t ) and a function
f ( z )=u ( x , y )+iv ( x , y ) is defined on it . The integral of f ( z ) along the contour C is
denoted and defined as follows:
b b b
∫ f ( z ) dz=∫ f ( z ) z ( t ) dt=∫ ( u x −v y ) dt+i∫ ( u y' +v x ' ) dt=
' ' '

C a a a

=∫ ( udx−vdy ) +i∫ (udy+vdx )


The component integrals are usual real integrals and are well defined. In the last
form appropriate limits must placed in the integrals .
Some very straight forward rules of integration are given below:
∫ ωf ( z ) dz=ω∫ f ( z ) dz
1. C C where ω is a complex constant.
∫ ( f ( z )+g ( z ) ) dz=∫ f ( z ) dz+∫ g ( z ) dz
2. C C C

∫ f ( z ) dz=∫ f ( z ) dz+∫ f ( z ) dz
3. C 1−C 2 C1 C2

|∫ f ( z ) dz≤∫|f ( z (t ) ) z ( t )||dt
'

4. C C

|∫ f ( z ) dz|≤ML,
5. If |f ( z )|≤M for all z ∈ C then C where L is length of the
countour C .
2
Example 4.4 f ( z )=z , Find integral of f from (0,0) to (2,1) along a straight
line and also along st line from (0,0) to (2,0) and from (2,0) to (2,1).
Example 4.5 f ( z )=1 /z . Find the integral from (2,0) to (-2,0) along a
semicircular path in upper plane given by |z|=2 .
π
|∫ f ( z ) dz|≤ for f ( z )=1/ ( z 2 −1 ) and C :|z|=2
Example 4.6 Show that C
3 from 2 to
2i.
Cauchy-Goursat Theorem
Theorem 4.1 (Jordan Curve Theorem)

Every simple and closed contour in complex plane splits the entire plane into two
domains one of which is bounded. The bounded domain is called the interior of the
countour and the other one is called the exterior of the contour.
Define a sense direction for a contour.
Theorem 4.2 Let C be a simple closed contour with positive orientation and let D
be the interior of C ,
If P and Q are continuous and have continuous partial derivatives P x ,P y ,Q y at all
points on C and D , then
∫ ( p ( x , y ) dx+Q ( x , y ) dy ) =∫∫ [ Qx ( x , y )−P y ( x , y ) ] dxdy
C
Theorem 4.3 (Cauchy-Goursat Theorem) Let f be analytic in a simply connected
domain D . If C is any simple closed contour in D , then
∫ f ( z ) dz=0
C
2
Example 4.7 f ( z )=z , exp ( z ) , cos ( z ) etc are entire functions so integral about any
loop is zero.
Theorem 4.4 Let C 1 and C 2 be two simple closed positively oriented contours such
that C 2 lies entirely in the interior of C 1 . If f is an analytic function in a domain
D that contains C 1 and C 2 both and the region between them, then
∫ f ( z ) dz=∫ f ( z ) dz
C1 C2

f ( z ) =1 /z
∫ f ( z ) dz
Example 4.8 Find C if C is any contour containing origin.
Choose a circular contour inside C .
1
∫ z−z dz=2 πi
Example 4.9 C 0 if C contains z 0 .
2 zdz
∫ z 2+2
Example 4.10 Find C where C :|z|=2 . Extend the Cauchy Goursat theorem to
multiply connected domains.
Antiderivative
Theorem 4.5 (Fundamental Theorem of Integration) Let f be defined in a
simply connected domain D and is analytic in D . If z 0 and z are points in D and
C is any contour in D joining z 0 and z then the function
F ( z )=∫ f ( z ) dz
C
'
is analytic in D and F ( z )=f ( z ) .
Definition 4.4 If f is analytic in D and z 1 and z 2 are two points in D then the
definite integral is defined as
z2

∫ f ( z ) dz=F ( z 2) −F ( z1 )
z1

where F is an antiderivative of f .
2−i
2 11
∫ z 2 dz=z 3 /3|2+i
0 = +i
3 3
Example 4.11 0
i
∫ cos zdz=sin z|i1=sin i−sin 1
Example 4.12 1
z2

∫ dzz =log z 2−log z 1


Example 4.13 z1
Cauchy Integral Formula
Theorem 4.6 (Cauchy Integral Formula) Let f be analytic in domain D . Let C
be a positively oriented simple closed contour in D . If z 0 is in the interior of C then
1 f ( z ) dz
f ( z0)= ∫
2 πi C z−z 0
.

1
f ( z )=
. ∫ f ( z ) dz C :|z−i|=2
2
Example 4.14 z + 4 Find C if
z
f ( z )= z ∫ f ( z ) dz
Example 4.15 2 +1 Find C if C is square with vertices on (±2 ,±2 ) .
Theorem 4.7 If f is analytic at a point, then all its derivatives exist and are
analytic at that point.
n! f ( z ) dz
( z 0 ) = 2 πi ∫
( n)
f
C ( z −z 0 )n+1 .
Lecture 12
PROBABILITY

Probability is a key part of mathematics. It plays an important role in the money markets,
in weather reporting, and many other areas of human life.
In everyday speech, the word “probable” is used in vague senses. For example, we say “it
will probably rain tomorrow”, “the patient will probably recover (or die)”, “our football team
will probably win”, “I will probably get my salary tomorrow” and so on.
The concept of probability is important and useful because it gives us more than just a
reflection of past experience.

Events. Types of Events

The most commonly used term in Probability theory is “event”. In everyday life we often
say that a certain event is highly probable whereas some other event is improbable. The “event”
can be almost any observable phenomenon.
All events that we may observe or that may occur in our daily life one can subdivide into
three following types: certain, impossible and random events.
A certain event is an event which occurs when a certain set of conditions is realized.
An impossible event is one which cannot occur when a certain set of conditions is
realized.
A random (stochastic) event is one that may occur or may not occur when a certain set of
conditions is realized.
Every realization of the indicated set of conditions is called a trial or an experiment.
Let us explain first what we mean when we say “a trial” or “an event”. For instance, when
tossing a coin we can consider the fact that it shows heads to be an event. In this case tossing the
coin serves as a trial. (an experiment).
Let us make the following conclusions and give definitions.
A trial or an experiment is a process that can be repeated and gives rise to a number of
outcomes.
An event is a collection (or set) of one or more outcomes.
A sample space is the set of all possible outcomes of an experiment. Events are denoted by
capital letters.
The events are called equally likely (or equally probable) if there is no ground to believe
that some one of them is more probable than the others.

Empirical Probability

A probability that is estimated from observations is called empirical or experimental


probability.
Out of 205468 births is Azerbaijan in 2015, there were 3146 multiple births (twins, triplets,
3146
etc.). The fraction of multiple births is 205468 or about 0.015; this is an estimate of probability
of a pregnancy being a multiple birth in Azerbaijan.
The probability of an event A occurring is denoted by P(A). From observation, we can
estimate P(A) according to the following definition.
Definition.

number of times A occurs


P( A )=
number of times A could have occurred .
Notice, that, according to this definition, P(A) must be between 0 and 1 inclusive.
Obviously, if we are given a probability and the number of times the event could have occurred,
we can estimate how many times we think that the event might occur.

Theoretical Probability

We can always estimate the probability of an event empirically by performing an


experiment repeatedly, but in some cases it is possible to predict the probability before doing any
experiments.
Definition.
If A is any event, the probability that A will occur is given by

number of times A occurs in the sample space


P( A )=
number of items in the sample space
or

number of ways event A can occur


P( A )=
total number of passible outcomes
assuming that all the possible outcomes are equally likely.

m
P( A )=
In the summary form: n
where m is the number of outcomes favourable to A, and n is the number of all the possible
outcomes.

Properties of probabilities
Let us now list some properties of probabilities:
1. The probability of a random event is between 0 and 1. The event A is random
⇒ 0< P( A )<1 .
2. The probability of a certain (sure) event is 1.
The event A is certain ⇒ P( A )=1 .
3. The probability of an impossible event is zero.
The event A is impossible ⇒ P( A )=0 .
4. The probability that event A will not occur (is denoted by Ā ) is 1− P( A ) .
5. The more likely that an event will occur, the higher its probability (the closer to 1 it is);
the less likely that an event will occur, the lower its probability (the closer to 0 it is).

0 1

Our football Flipping Snowing at


team will Heads on a least once
Let us now consider some examples.
Example 1.
A fair six sided die is thrown once and the number landing face up is recorded.
(a) Find the probability of the die landing with the number 6 face up.
(b) Find the probability of throwing an odd number.
(c) Find the probability of throwing a number 8.
(d) Find the probability of throwing a number less than 15.
Solution:
(a) There are six faces and one has the number 6 on it, so the probability of landing with the
1
P(6 )=
number 6 face up is 6.
(b) The odd numbered faces are 1,3, and 5, so the the probability of throwing an odd number is
3 1
P(odd )= =
6 2.
(c) There are no faces with the number 8, so the probability of landing with the number 8 face up
0
P(8 )= =0
is 6 .
In the given case, the event is impossible.
(d) Since the number of any face of the die less than 15, it follows that the number of outcomes
favourable to this event is equal to the number of all the possible outcomes.
6
=1
Consequently, P (number <15)= 6 . In this case, the event is certain.
Example 2.
A fair spinner below has eight faces, that is there are eight possible outcomes. We spin the
spinner once and the number indicated on it is recorded.

24 6
20 8

17 11
15 14
Find the following probabilities:
(a) P(8)
(b) P(even)
(c) P(odd)
(d) P(prime number)
(e) P(number <10)
(f) P(number >16)

Solution.
Since each region is the same size, it is equally likely that the spinner will stop in any of
the eight regions.
(a) There is 1 chance in 8 that it will stop in the region marked 8. So we say that the probability
1
P(8 )=
of spinning a 8 is one eighth and write 8.
(b) There are 5 chances in 8 that the spinner will land in a region with an even number in it, so
5
P(even)=
8.
(c) There are 3 chances in 8 that the spinner will land in a region with an odd number in it, so
3
P(odd )=
8.
(d) There are 2 chances in 8 that the spinner will land in a region with a prime number in it, so
2 1
= =
P (prime number) 8 4 .
(c) There are 2 chances in 8 that the spinner will stop in a region with a number less than 10 in it,
so
2 1
= =
P(number <10) 8 4.
(f) There are 3 chances in 8 that the spinner will stop in a region with a number greater than 16 in
it, so
3
= .
P(number >16) 8

Example 3.
A box contains 10 balls labeled with the numbers from 1 to 10. We draw one ball. What is
the probability that the number of the drawn ball:
(a) does not exceed 10
(b) prime number
(c) a factor of 10

Solution.
10
= =1
(a) P(¿ 10 ) 10 , the event is certain.
4 2
= =
(b) P(prime number) = P(2,3,5,7) 10 5 .
4 2
= =
(c) P(factor of 10) = P(1,2,5,10) 10 5 .
Example 4.
There are 12 balls in the urn, of which 3 are green, 4 red and 5 blue. What is the probability
of drawing.
(a) a green ball,
(b) a red ball,
(c) a blue ball.
Solution.
3 1
= =
(a) P(green) 12 4
4 1
= =
(b) P(red) 12 3
5
= .
(c) P(blue) 12
Counting Techniques

The probability formula for equally likely outcomes uses the size of the sample space. In
some simple experiments, this may be easily determined, but some experiments require more
sophisticated counting techniques.
The basis of most counting techniques is the Counting Principle.
Counting Principle. If two jobs need to be completed and there are m ways to do the first
job and n ways to do the second job, then there are m⋅n ways to do one job followed by the
other.
This principle can be extended to any number of jobs or experiments.
Counting Principle (General Case)
Consider a set of k experiments. Suppose the first experiment has n1 outcomes, the second
has n2 outcomes, and so on. Then the total number of outcomes is 1 2
n ⋅n ⋅.. .⋅n k for all k
experiments.
Example. How many integers between 100 and 1,000 consist of three different odd digits?
Solution. We are looking for 3-digit numbers, such as 157,359, and 753, all of whose
digits are odd and all of which are different. The best way to answer this question is to use the
counting principle. Think of writing a 3-digit number as three jobs that need to be done. The first
job is to select one of the five odd digits (1,3,5,7,9) and use it as the digit in the hundreds place.
This can be done in 5 ways. The second job is to select one of the four remaining odd digits for
the ten place. This can be done in 4 ways. Finally, the third job is to select one of the three odd
digits not yet used to be the digit in the ones place. This can be done in 3 ways. So, by using the
counting principle, the total number of ways to write a 3-digit number with three different odd
digits is 5⋅4⋅3=60 .

Combinatorics

Many problems in probability theory require that we count the number of ways that
particular event can occur. For this, we need to know some concepts of combinatorics (factorial,
permutations, combinations).
Combinatorics is a branch of mathematics concerning the study of finite or countable
discrete structures. The combinatorics studies the number of selections (or variants, or ways)
subordinated to the certain conditions. Combinatorial problems arise in many areas of
mathematics, notably in probability theory. Combinatorics also has many applications in
computer science and statistical physics.
Factorial.
Definition. Let n be a positive integer. We define n! (read “n factorial”) by
n !=n(n−1)(n−2)⋅. . .⋅3⋅2⋅1 .
By convention, we set 0! =1 .
The factorial n ! gives the number of ways in which n distinct objects can be permuted.
Permutations.
Definition. The different arrangements or selections of a given number of distinct objects
are called permutations.
The number of all the possible permutations of n distinct objects is
Pn =n !

Arrangements (Permutations)
Definition. The different arrangements or selection of a given number of distinct objects
(things) taken k at a time are called arrangements (or permutations).
The number of all the possible arrangements of n things, taken k at a time, is given by:
n!
Ank=P n, k =n( n−1 )( n−2 ). ..(n−k +1 )=
(n−k )!
n
In particular An =Pn , n =n ! , i.e. An =Pn .
n

Combinations.
Definitions. Each of the different groups or selections of a given number of objects, and
which can be formed by taking some or all of a number of objects is called a combination.
The number of all combinations of n things, taken k at a time is given by:

C kn =¿ ( n ¿ ) ¿ ¿ ¿
¿
Note. It is useful to remember:
 In permutations the order matters
 In combinations the order does not matter
A kn n!
C kn = =
Properties: 1. Pk k !(n−k )!
k k
2. An =C n⋅Pk
0 n
3. C n =Cn =1
k n−k
4. C n =Cn
k k−1 k
5. C n =Cn−1 +C n−1

Example 1.
There are 10 balls in the box, of which 6 are green and 4 blue. We draw two balls. What is
the probability that they are
(a) 2 green balls
(b) 2 blue balls
(c) 1 green, 1 blue
Solution.
C 26 15 1
= =
C 2 45 3
(a) P(2 green) = 10
C 24 6 2
= =
C210 45 15
(b) P(2 blue) =
C16⋅C 14 6⋅4 8
= =
C 210 45 15
(c) P(1 green, 1 blue) =
Example 2.
A bag contains 4 red, 3 blue and 8 green beads.
Five beads are selected at random from the bag without replacement. Find the probability
that they are
(a) 5 green beads,
(b) 2 red and 3 green,
(c) 4 red and 1 blue
(d) 1 red, 2 blue and 2 green
Solution.
C 58 8
=
5 429
(a) P(5 green) = C15
C24⋅C 38 16
=
C 5 143
(b) P(2 red and 3 green) = 15

C 44⋅C 13 1
=
C 515 1001
(c) P(4 red and 1 blue) =
C14⋅C 23⋅C28 16
=
C515 143
(d) P(1 red, 2 blue and 2 green) =
Example 3.
Six students from a group of 30 have passed the test with excellent marks, ten students
with good marks, and nine students have got satisfactory marks. What is the probability that
three students chosen randomly from this group have got failing marks for the test?
Solution. The number of students that have got failing marks is 30−(6+10+ 9)=5 . Then
3
the number of cases favourable to the event is determined by the equation m=C 5 , i.e. m=10.
The number of all events here is
30 !
n=C330 = =28⋅29⋅5
3 ! 27 !
3
m C 5 10 1
P= = 3 = =
n C 28⋅29⋅5 406
Therefore 30 .
Example 4.
There are 1000 tickets in the lottery, of which 500 are winning tickets and 500 are non-
winning. We buy two tickets. What is the probability of both tickets being winning?
Solution. The number of all possible outcomes here is
1000 !
n=C21000 = =999⋅500
2 ! 998 !
The number of outcomes favourable to the event here is
500 !
m=C 2500= =499⋅250
2 ! 498 ! .

Thus, we have
2
m C 500 499 ⋅250 499
P= = 2 = =
n C 999⋅500 1998
1000 .

Probability Addition and Multiplication Rules

Now we shall generalize the sample space method to efficiently calculate probabilities of
combined events.
Definition. The union of event A and event B is written A∪B and represents the event
that either A or event B occurs or both occur.
Definition. The intersection of event A and B is written A∩B and represents the event
that both A and B occur.
We can use Venn diagrams to illustrate the concepts of union and intersection. Events can
be represented graphically by a Venn diagram. Venn diagrams are named after English
mathematician John Venn (1834-1923). We use set notation to identify different areas on a Venn
diagram.
A rectangle represents the sample space and it contains
closed curves that represent A B S events. It includes all the
possible outcomes of an experiment so the probability of
the sample space is 1 or P(S)=1.

A∪B A∩B
A B S A B S

Ā B̄
A B S A B S

We are also interested in events not occurring. For example, Ā( or A ¿ ) is the complement
of A and is the event “A does not occur”, P( Ā )=1−P ( A ) .
Venn diagrams can help us solve probability problems.
Theorem (Probability Addition Rule)
P( A∪B )=P( A )+P( B)−P ( A∩B ) .
It is useful to remember that we can rearrange this if we want to find the probability of the
intersection.
P( A∩B )=P( A )+P( B)−P ( A∪B )
Definition. Two events are said to be exclusive (mutually exclusive) if they cannot occur
at the same time.
Obviously, if there is no possibility of A and B occurring at the same time, that is A and B
are mutually exclusive, then P( A∩B )=0 and the above formula reduces to
P( A∪B )=P( A )+P( B) .
Definition. The event consisting in the non-occurrence of the event A is said to be an event
opposite, or contrary, to the event A and is denoted Ā( or A ¿ ) .
The union of the events A and Ā yields a certain event, and hence, P( A∪ Ā )=1 , and
since the events A and Ā are mutually exclusive, we have
P( A )+ P( Ā )=1 or P( Ā )=1−P ( A ) .
Example 1.
A and B are two events and P(A) =0.6, P(B)=0.5 and P( A∪B )=0 . 8 . Find the following:
(a) P( A∩B )
P( Ā ) A B S
(b)
0.3 0.3 0.2
(c) P( Ā∪B )
(d) P( Ā∩B ) 0.2
Solution.
(a) P( A∩B )=P( A )+P( B)−P ( A∪B )
P( A∩B )=0 . 6+0 . 5−0. 8
P( A∩B )=0 . 3
(b) P( Ā )=1−P ( A )
P( Ā )=1−0.6=0.4
(c) P( Ā∪B )=(0.2+0.2)+0.3=0.7
(d) P( Ā∩B )=P( Ā )+P( B)−P ( Ā∪B )
P( Ā∩B )=0.4+0.5−0.7=0.2
Example 2.
A and B are two events and P(A) =0.4, P(B)=0.3 and P( A∩B )=0 . 1 . Find the following:
(a) P( A∪B )
A B S
(b) P( B̄) 0.1 0.2
0.3
(c) P( A∩B̄ )
(d) P( A∪B̄ )
0.4

Solution.
(a) P( A∪B )=P( A )+P( B)−P ( A∩B )
P( A∪B )=0 . 4 +0 . 3−0 . 1=0 . 6
(b) P( B̄)=1−P( B)
P( B̄)=1−0.3=0.7
(c) P( A∩B̄ )=0 . 3
(d) P( A∪B̄ )=P( A )+P( B̄)−P ( A∩ B̄ )
P( A∪B̄ )=0.4+0.7−0.3=0.8

Example 3.
C and D are two events and P(C) =0.4, P(D)=0.5 and P(C∪D )=0 . 6 . Find the following:
(a) P(C∩D )
C D S
(b) P( C̄ )
0.1 0.3 0.2
(c) P(C∪ D̄ )
0.4
(d) P( C̄∪D )
Solution.
(a) P(C∩D )=P(C )+P( D)−P (C∪D)
P(C∩D )=0 . 4+0. 5−0 .6=0 . 3
(b) P( C̄ )=1−P(C )
P( C̄ )=1−0.4=0.6
(c) P(C∪ D̄ )=0 . 8
(d) P( C̄∪D )=P( C̄ )+P( D)−P ( C̄∩D)
P( C̄∪D )=0.6+0.5−0.2=0.9
Example 4.
There are 20 students in a certain tutor group at Baku-Oxford School. There are 12
students in the tutor group studying French, 11 students studying Spanish and five students
studying both Spanish and French.
Find the probability that a randomly chosen student in the tutor group
(a) studies Spanish
(b) studies Spanish and French
(c) studies Spanish but not French
(d) does not study Spanish or French
Solution.
Draw a Venn diagram to represent this information. There are 20 students in the sample
space. A student is chosen at random so all outcomes are equally likely.
11
P( S )= =0 .55
(a) 20
5 F S
P( S∩F )= =0 .25 5 6
(b) 20 7
6
P( S∩ F̄ )= =0 .3 2
(c) 20
2
P( S̄∩ F̄ )= =0 .1
(d) 20
Example 5.
A card is chosen at random from a pack of 52 playing cards. H is the event ‘the card
chosen is a Heart’ and Q is the event ‘the card chosen is a Queen! Find the following:
(a) P(Q ) (d) P( H∪Q )
(b) P( H ) (e) P( H̄ )
(c) P( H∩Q ) (f) P( Q̄∩H )
Solution.
Draw a Venn diagram to represent this information. There are 52 cards in the sample
space. A card is chosen at random so all outcomes are equally likely.
4 1
P(Q )= =
(a) 52 13
H Q
13 1
P( H )= = 12 1 3
(b) 52 4
36
1
P( H∩Q )=
(c) 52
16 4
P( H∪Q )= =
(d) 52 13
1 3
P( H̄ )=1− =
(e) 4 4
12 3
P( Q̄∩H )= =
(f) 52 13

Let us now consider two events A and B. The probability of an event B may be different if
we know that a dependent event A has already occurred.
Consider the Venn diagram. A B The event A has happened, so
we are considering probabi- lities inside this closed curve.
a–i i b–i
We are looking for the probability of B given A has
happened so we divide i by a .
S
Thus
P( B∩ A )
P( B given A )=
P(A)

Definition. The probability of B given A, written P( B |A ) , is called the conditional


probability of B given A and so:
P( B∩ A )
P( B |A )=
P(A) . (1)
In other words, the conditional probability of the event B relative to the event A is
understood as the probability of the occurrence of the event B defined relative to the hypothesis
that the event A has occurred.
Similarly, we have
P( A∩B)
P( A |B)=
P( B) . (2)
(1) and (2) give us a useful formula for the probability of the intersection P( A∩B ) .
Theorem (Probability Multiplication Rule)
P( A∩B )=P( B )⋅P( A |B )=P( A )⋅P( B |A ) .
Definition. Two events A and B are said to be independent if one event has no effect on
another.
Therefore if A and B are independent, the probability of A happening is the same whether
or not B has happened. In other words, if A and B are independent, the conditional probability of
one of them relative to the other is equal to the absolute (inconditional) probability of the first
event:

P( B |A )=P(B ) and P( A |B)=P( A )


In this case the following equalities hold true:
P( B | Ā )=P(B|A )=P( B ) ,
P( A | B̄)=P( A|B )=P( A ) .
Thus, it is useful to remember that A, B independent ⇒ Ā ,B; A , B̄; Ā , B̄ are all
independent pairs.
Theorem. The probability of the intersection of independent events is equal to the product
of their probabilities:
A and B are independent ⇒ P ( A∩B)=P( A )⋅P (B )
Example 6.
A and B are two events such that P( A )=0 . 2 , P (B )=0 . 6 and P( A |B)=0 .3 . Find the
following
(a) P( B |A )
(b) P( Ā ∩ B̄)
(c) P( Ā ∩B)
Solution. First we find
P( A∩B )=P( A|B )⋅P (B )=0 . 3⋅0 . 6=0. 18
Now we draw a Venn diagram. This will help to find any other probabilities in the
question.

P( B∩ A ) 0 .18
P( B |A )= = =0. 9
(a) P(A) 0 .2
(b) P( Ā∩B̄ )=0 . 38 A B

(c) P( Ā∩B )=0 . 42


0.02 0.18 0.42

0.38

Example 7.
A and B are two events such that P( A )=0 . 6 , P( B)=0. 5 and P( A∩B )=0 . 4 . Find the
following
(a) P( A∪B )
(b) P( B|A ) A B
(c) P( A|B) 0.2 0.4 0.1

(d) P( A| B̄) 0.3

Solution. We draw the Venn diagram for better understanding although we can solve the
problem without it.
(a) P( A∪B )=P( A )+P( B)−P ( A∩B )
P( A∪B )=0 . 6+0 . 5−0. 4=0. 7
P( B∩ A ) 0 . 4 2
P( B |A )= = = =0 .(6 )
(b) P(A) 0.6 3
P( A∩B) 0 . 4
P( A |B)= = =0 . 8
(c) P( B) 0 . 5
P( A∩ B̄) 0 .2
P( A | B̄)= = =0. 4
(d) P( B̄) 0 .5
Example 8.
A and B are mutually exclusive and P( A )=0 . 3 and P( B )=0 . 4 . Find
(a) P( A∪B )
(b) P( A ∩ B̄)
(c) P( Ā ∩ B̄)
Solution. It is clear that when events A and B are mutually exclusive they have no
outcomes in common. Therefore remembering it we
draw the corresponding A 0.4 Venn diagram
B
0.3
(a)Since P( A ∩B)=0 we have
0.3

P( A ∪B)=P ( A )+P( B)=0 .3+0. 4=0. 7


(b) P( A ∩ B̄)=P ( A )=0.3
(c) P( Ā ∩ B̄)=1−P( A∪B )=1−0.7=0.3
Example 9.
2 1 4
P( A )= , P( A|B )= , and P( A∪B )= . . Find P( B)
3 5 5 .
Solution. P( A∪B )=P( A )+P( B)−P ( A∩B )=
=P ( A )+P( B)−P ( A |B )⋅P( B)=
=P ( A )+P( B)⋅(1−P( A|B))
Now using the given values we finally obtain
4 2 1
( )
= +P( B) 1− ⇒ P(B )=
5 3 5
1
6
Example 10.
1
P( A )=
Events A and B are independent and 4
1
and P( B )= A B
7 . Find 6 1 3
28 28 28
(a) P( A∩B ) 18

(b) P( A ∩ B̄) 28

(c) P( Ā ∩ B̄)
Solution. A and B are independent, so
1 1 1
P( A∩B )=P( A )⋅P( B)= ⋅ =
(a) 4 7 28 .
If A and B are independent, then so are A and B̄ , and hence
1 6 6 3
P( A∩B̄ )=P( A )⋅P( B̄)= ⋅ = =
(b) 4 7 28 14 .
If A and B are independent, then so are Ā and B̄ , and therefore
3 6 18 9
P( Ā∩B̄ )=P( Ā )⋅P( B̄)= ⋅ = =
(c) 4 7 28 14 .
Example 11.
A box contains 6 white and 8 red balls. We draw two balls (without replacing the drawn
ball into the box). Find the probability of both balls being white.
Solution. Suppose the event A is the drawing of a white ball in the first trial and the event
B is the drawing of a white ball in the second trial. By the probability multiplication rule for the
case of dependent events we have
6 5 15
P( A∩B )=P( A )⋅P( B|A )= ⋅ =
14 13 91
Example 12.
The probability of winning a certain game is 0.2. Suppose the game is played on two
different occasions. What is the probability of
(a) winning both times?
(b) losing both times?
(c) winning once and losing once?

Solution.
(a) The results of the two different trials are independent, so the probability of winning
both times can be found by multiplying the probability of winning each time.
P(winning both games)=0 . 2⋅0 .2=0 . 04
(b) Since losing is the compliment of winning, the probability of losing is 1−0. 2=0. 8 .
The probability of losing both times can be found by multiplying the probability of
losing each time
P(losing both games)=0 . 8⋅0 . 8=0. 64
(c) The complement of the event (winning once and losing once ) is the set of the two
events in parts (a) and (b).
The event in parts (a) and (b) are mutually exclusive, because it is impossible to win
both times and lose both times, so their probabilities may be added.
P(winning once and losing once)=
=1−(0 .04 +0 . 64 )=0 . 32 .

Lecture 13
Bernoulli’s Formula. The Most Probable Number of Occurrences of an Event
If n independent trials are performed in each of which the probability of occurrence of the
event A is the same and is equal to p, then the probability of the event A occurring m times in
these n trials is expressed by Bernoulli’s formula:
Pm, n =C mn pm q n−m
where q=1− p . Thus we have
Po , n =C on po qn−o =q n ,
P1 , n=C 1n p1 q n−1 =npq n−1 ,
n(n−1) 2 n−2
P2 , n=C 2n p2 qn−2= p q ,
1⋅2
. .. .. . .. .. . .. .. .. . .. .. . .. .. . .. .. . .. .. . .. .. . .. .. .

Pn , n =p n
Definition. The number
m0 is called the most probable number of occurrences of the

event A in n trials if at
m=m0 the value of Pm,n is not less than all the other values of Pm,n , i.e.
Pm , n ≥Pm ,n mi≠m0 .
0 i at
m
If p≠0 and p≠1 , the number 0 can be determined from the double inequality
np−q≤m0 ≤np+ p .
The difference between the end point values in this double inequality is 1:
(np+ p )−(np−q )= p+q=1 .
If np+ p is not an integer, then the double inequality specifies only one most probable
value
m 0 . Now if np+ p is an integer, then there are two most probable values,
¿
m0 =np−q and m //0 =np+ p
Theorem. The probability that the event will occur (in n independent trials):
a) less than k times (¿ k ) is found by the formula
Po ,n +P 1,n+...+P k−1 ,n
b) more than k times (¿ k ) is found by the formula
Pk+1 ,n +Pk+2 ,n +...+Pn ,n
c) no less than k times (¿ k ) is found by the formula
Pk ,n +P k+1 ,n +P k+2 ,n +...+P n,n
d) no more than k times (¿ k )is found by the formula
Po ,n +P 1,n+...+P k−1 ,n+Pk ,n .
Let us consider some examples.
Example 1. The probability of occurrence of the event A is 0.4. What is the probability of
the event A occurring not more than three times in 10 trials?
Solution. Here p=0.4, q=0.6. We have:
probability of occurrence of event A 0 times is
P0 , 10=q 10 ;
probability of occurrence of event A 1 time is
P1 ,10 =10 pq 9 ;
probability of occurrence of event A 2 times is
P2 ,10 =45 p2 q 8 ;
probability of occurrence of event A 3 times is
P3 , 10=120 p 3 q7 .
The probability of the event A occurring not more than three times is equal to
P=P 0,10 +P1,10 +P2 ,10 +P3 ,10
that is
P=q10 +10 pq 9 +45 p2 q 8 +120 p3 q7
or
P=q7 (q3 +10 pq 2 +45 p2 q+120 p3 )
Putting p=0.4, q=0.6, we obtain
P=0. 67 (0 . 216+1 . 44+4 .32+7 . 68 )≈0 . 38 .
Example 2. Determine the probability of the fact that in a family having five children there
are three girls and two boys. The probabilities of a girl and a boy being born are assumed to be
equal.
Solution. The probability of a girl being born is p=0.5, then q=1− p=0 .5 (the probability
of a boy being born).
Therefore, the sought-for probability is
5! 5
P3 ,5=C 35 p3 q2 = (0.5)3 (0.5)2=
3! 2! 16 .

Example 3. Under the conditions of the previous problem find the probability of the fact
that there will not be more than three girls among the children born to the family.
Solution. We have

P0 , 5= ()
15 1
=
2 32 ;
P1 ,5 =5⋅ ()
15 5
=
2 32 ;

P2 ,5 =10⋅ =()
15 5 15 5
P =10⋅ =
2 16 ; 3 , 5 2 16 . ()
13
P=P 0, 5 +P 1, 5 +P2 , 5 +P3 , 5 =
16 .
Example 4. Two chess-players of the same level play chess. What is more probable to win:
two games out of four or three games out of six?
Solution. As players of the same level, then the probability of winning is equal to 0.5; then
the probability of loss is 0.5. Let us find the probability of the fact that two games out of four
will be won. Applying the Bernoulli’s formula we get
6
P2 , 4 =C 24 p2 q2 =
16 .
Now we find the probability of the event that three games out of six will be won. We have
5
P3 , 6 =C36 p 3 q3 =
16 .
P >P
Since 2 , 4 3, 6 , then of four games to win two is more likely than three games out of six.
Example 5. We toss a coin five times. Find the probability that the Heads comes up
(a) less than two times.
(b) no less than two times.
Solution.
1 5 3
P0 , 5 +P1 ,5 = + =
(a) 32 32 16
13
P2 ,5 +P3 ,5 +P4 , 5 +P 5, 5 =1−(P 0 ,5 +P1, 5 )=
(b) 16

Example 6. We toss a coin eight times. Find the probability that the Heads comes up no
more than three times.
Solution. We have
P=P 0, 8 +P 1, 8 +P 2, 8 +P 3, 8 =

¿
2()
1 8 0 1 2 3
(C 8+C 8+C8 +C 8)=
=
2()
18
(1+8+28+56 )=
93
256 .
Example 7. There are 10 white and 40 red balls in the box. We successively draw 14 balls,
register the colour of each drawn ball and replace it into the box. Determine the most probable
number of occurrences of a white ball.
10 1 4
n=14 , p= = , q=1− p=
Solution. Here 50 5 5.
Using the double inequality
np−q≤m0 ≤np+ p
at the values of n, p and q indicated, we obtain
14 4 14 1
− ≤m0 ≤ +
5 5 5 5,
i.e. 0 2≤m ≤3
.
Thus, the problem admits of two solutions:
¿
m 0 =2 , m //0 =3
Example 8. The probability of a marksman hitting the target is 0.8. He fires 20 shots.
Determine the most probable number of times he hits the target.
Solution. Here n=20 , p=0 . 8 , q=0 .2 . It follows that
20⋅0 ,8−0 , 2≤m0 ≤20⋅0 , 8+0 , 8
i.e
15 . 8≤m0 ≤16 . 8 .
Since m is an integer, we have 0
m =16
.
Example 9. As a result of long observations it was established that the probability of rain
3
falling on October 14 in Baku is 8 . Determine the most probable number of rainy days on
October 14 in Baku for 10 years.
3 5
n=10 , p= , q=
Solution. Here 8 8.
Thus we have
3 5 3 3
10⋅ − ≤m0 ≤10⋅ +
8 8 8 8
1 1
3 ≤m0 ≤4 ,
or 8 8 i.e. m0 =4 .

Example 10. A balloon manufacturer claims that 95% of his balloons will not burst when
blown up. If you have 20 of these balloons to blow up for a birthday party what is the probability
that none of them burst when blown up?
Solution. To solve this problem we use the Bernoulli’s formula. Here
m=n=20 , p=0 .95 , q=0 . 05 . We have
P20 , 20=C 20 20 0 20
20 p q =0. 95 =0 .3584 .. .≈0. 358 .

Total Probability Formula


B ,B ,..., Bn be pairwise mutually exclusive (neither two of
Definition. Let the events 1 2
B ,B ,..., Bn are said to be form a complete
them can take place simultaneously). The n events 1 2
group of events if only one them can occur as a result of some trial.
Theorem. If the event A is known to occur together with one of the events 1 2
B ,B ,..., B
n
forming a complete group of mutually exclusive events, then the probability of the event A can
be found from the formula
P( A )=P( B1 )⋅P( A|B 1 )+P( B2 )⋅P( A|B2 )+.. .+
+P( Bn )⋅P( A|Bn )
n
P( A )=∑ P(B i )⋅P ( A|Bi )
or i=1
This formula is known as the total probability formula.
Proof. According to the condition the event A can occur together with one of the mutually
exclusive events
B1 ,B 2 ,..., Bn . In other words the event A can be represented as a union of the
events
B1 A=B1 ∩ A , B 2 A=B2 ∩A , . . . , Bn A=B n∩ A , i.e.
A=B 1 A + B2 A + .. . + Bn A
Using the probability addition rule, we obtain
P( A )=P( B1 A + B2 A + ... + Bn A )=
=P (B1 A )+ P (B 2 A )+ .. . +P( Bn A ) .
Now, using the probability multiplication rule, we get

P( A )=P( B1 )P( A|B1 )+


+ P( B2 )P ( A|B2 )+. ..+P( Bn ) P( A|B n ) .

The theorem has been proved.


Let us now assume that the event A can occur together with one of the events
H 1 , H 2 , .. . ,H n forming a complete group of mutually exclusive events. Since we do not know
which one of these events occurs they are called hypotheses.
Suppose the event A has occurred. Provided the event A has occurred let us find the
conditional probability of the event H 1 , i.e. P( H 1|A ) .
By the probability multiplication rule
P( AH 1 )=P( A )⋅P ( H 1|A )=P ( H 1 )⋅P ( A|H 1 )
whence
P( AH 1 ) P ( H 1 )⋅P ( A|H 1 )
P( H 1|A )= =
P(A) P( A )
Replacing P( A ) by the total probability formula we obtain
P( H 1 )⋅P( A|H 1 )
P( H 1| A )=
P( H 1 )⋅P ( A|H 1 )+. ..+ P (H n )⋅P ( A|H n ) .
Similarly we can obtain the formulas for the conditional probability of the other
hypotheses.
Thus, provided the event A has occurred, the conditional probability of the event
H i (i=1,2,...,n) can be determined by the formula
P ( AH i ) P ( H i )⋅P( A|H i )
P( H i| A )= =
P( A ) n
∑ P( H i )⋅P( A|H i )
i =1
which is known as Bayes’ formula.
The probabilities P( H i|A ) calculated by Bayes’ formula are often called probabilities of
hypotheses.
Example 1. We have four boxes. The first box contains 2 red and 8 yellow balls, the
second, 3 red and 2 yellow balls, the third,1 red and 1 yellow ball, and the fourth, 4 red and 6
yellow balls. The event
H i is the selection of the i-th box (i=1,2,3,4). The probability of
i
selecting of the i-th box is 10 , i.e.
1 2 3 4
P( H 1 )= , P( H 2 )= , P( H 3 )= , P( H 4 )=
10 10 10 10 .
We randomly select one of the boxes and draw a ball from it. Calculate the probability of
the ball being red.
Solution. Suppose the event A is the drawing of a red ball. If follows from the hypothesis
1
that the conditional probability of drawing a red ball from the first box is equal to 5 , i.e.
2 1
P( A|H 1 )= =
10 5 ;
3 1 2
P( A|H 2 )= P( A|H 3 )= P( A|H 4 )=
similarly, 5, 2, 5.
The probability of drawing a red ball can be found by the formula of total probability:
P( A )=P( H 1 )⋅P( A|H 1 )+P( H 2 )⋅P( A|H 2 )+
+P( H 3 )⋅P( A|H 3 )+P( H 4 )⋅P( A|H 4 )=
1 1 2 3 3 1 4 2
¿ ⋅ + ⋅ + ⋅ + ⋅ =0 . 45 .
10 5 10 5 10 2 10 5
Example 2. There are three urns identical in appearance. The first urn contains 24 green
balls, the second urn contains 12 green and 12 red balls, and the third urn contains 24 red balls.
We draw a green ball from a randomly selected urn. Find the probability of the ball being drawn
from the first urn.
H ,H ,H
Solution. Assume that 1 2 3 are the hypotheses consisting in selecting the first, the
second and the third urn respectively. Let A be the event of drawing a green ball. Since the
selection of any of the urns is equally likely then
1
P( H 1 )=P( H 2 )=P( H 3 )=
3.
It is clear that the probability of drawing a green ball from the first urn is P( A|H 1 )=1 ; the
12 1
P( A|H 2 )= = ;
probability of drawing a green ball from the second urn is 24 2 the probability
of drawing a green ball from the third urn is P( A|H 3 )=0 .
Therefore, the desired probability P( H 1| A ) (i.e. the probability of the green ball being
drawn from the first urn) can found from Bayes’ formula
P( H 1 )⋅P( A|H 1 )
P( H 1| A )= =
P( H 1 )⋅P( A|H 1 )+ P( H 2 )⋅P( A|H 2 )+ P (H 3 )⋅P ( A|H 3 )
1
⋅1
3 2
= = .
1 1 1 1 3
⋅1+ ⋅ + ⋅0
3 3 2 3
Example 3. There are two boxes. The first box contains 8 blue and 7 red balls, the second,
4 blue and 6 red balls. We draw one ball from the second box and place it into the first one, then
we randomly draw one ball from the first box.
What is the probability of the drawn ball being blue?
Solution. Let A be the event of drawing a blue ball. After a ball was drawn from the
second box and placed into the first, two collections of balls have turned out in the first box:
(1) 8 blue and 7 red balls it contained prior to replacement;
(2) one ball replaced from the second box.
8
P( A|H 1 )= ,
The probability of appearance of a blue ball belonging to the first collection is 15
4 2
P( A|H 2 )= =
and from the second collection, 10 5 .
15
P( H 1 )= ,
The probability that he randomly drawn ball belongs to the first collection is 16 and to
1
P( H 2 )=
the second, 16 .
Using the total probability formula, we obtain
P( A )=P( H 1 )⋅P( A|H 1 )+P ( H 2 )⋅P ( A|H 2 )=
15 8 1 2 21
= ⋅ + ⋅ = =0 . 525 .
16 15 16 5 40
Example 4. The hospital receives an average of 50% of patients with the disease F, 30% of
patients with the disease L, and 20% of patients with the disease C. The probability that the
patient will completely recovered from the illness F is equal to 0.7; for the illnesses L and C,
these probabilities are equal to 0.8 and 0.9, respectively. The patient admitted to the hospital was
discharged healthy. Find the probability that the patient was suffering from the disease F.
Solution. If follows from the hypothesis that
P( H 1 )=0 . 5 , P( H 2 )=0. 3 , P( H 3 )=0 . 2
where P( H 1 ) is the probability of the fact that the patient in the hospital is suffering from the
disease F. The probabilities P( H 2 ) and P( H 3 ) are defined similarly. Let A be the event that the
patient admitted to the hospital was discharged healthy.
It is clear that
P( A|H 1 )=0 . 7 , P ( A|H 2 )=0. 8 , P( A|H 3 )=0 . 9 .
Now using the total probability formula, we obtain
P( A )=P( H 1 )⋅P( A|H 1 )+P( H 2 )⋅P( A|H 2 )+
+P( H 3 )⋅P( A|H 3 )=0. 5⋅0. 7+0. 3⋅0 . 8+0 . 2⋅0 . 9=
¿ 0 . 35+0 . 24+0 . 18=0 . 77
Therefore, the desired probability P( H 1| A ) (i.e. the probability of the fact that the patient that
had been discharged was suffering from the disease F) can be found from the Bayes formula
P( H 1 )⋅P ( A|H 1 ) 0 .35 5
P( H 1| A )= = =
P( A ) 0 .77 7 .

Lecture 14
Random Variable and the Law of Its Distribution

Mathematics has many applications in most areas of modern day life. If you construct a
mathematical model of a real world situation, you can learn about the real situation by analyzing
the mathematical model.
A mathematical model is a simplification of a real world situation. It can be used to make
predictions about a real world problem. By analyzing the model an improved understanding of
the situation may be obtained.
Statistics play an important role in this process. In statistics you collect observations or
measurements of some variable. Such observations are known as data.
Definition. A random variable is a variable quantity which randomly assumes a certain
numerical value resulting from the outcome of a trial. This value depends on chance and,
generally speaking, varies as the trials are repeated. Examples of random variables are the
number of girls in a family, the number of students attending a lecture, the duration of life of a
person and so on.
Definition. A variable is said to be discrete if it can take only specific values in a given
range.
Definition. A variable is said to be continuous if it can take any value in a given range.
Example 1. State whether or not each of the following variables is discrete or continuous.
(a) Number of people on a bus
(b) Time required to run 100m
(c) Number of boys in a family
(d) Weigh of watermelon
(e) The number of apples on the trees in an orchard
(f) Shoe size
(g) Length
(h) Time waiting in a queue.
It is clear that (a), (c), (e) and (f) are discrete variables since these variables can’t take any
value from a given range. On the other hand, (b), (d), (g) and (h) are continuous variables
because these variables can assume any value in a given interval.
We can define these concepts more precisely in terms of mathematics.
A random variable is a quantity whose value depends on chance. A random variable can
assume one or another value from a certain number set, but it is not known beforehand which
value it will assume. A random variable is designated by capital letters X, Y,…, and the values
that the random variable can take are represented by the corresponding lower-case letters x,y,…
Definition. If the values that the given random variable X can assume form a discrete
x , x ,..., x ,...,
(finite or infinite) number series 1 2 n then the random variable is called discrete.
Definition. If the values that the given random variable X can assume fill up the whole
finite or infinite interval (a,b) then the random variable is said to be continuous.
x
To each value n of a random variable X of a discrete type there corresponds a definite
probability pn. To specify a discrete random variable completely, you need to know its set of
possible values and the probability with which it takes each one; this information is best
displayed in a table.

X x1 x2 … xn
P( X =x ) p1 p2 … pn (

Definition. The relationship establishing in one way or another the connection between the
possible values of a random variable and their probabilities is called the Law of distribution of
a random variable.
The law of distribution of a random variable you can specify in a table, analytically (i.e. by
means of formulas) and graphically.
Definition. A table representing the correspondence between the possible values of
variable and their probabilities is called the Law of distribution of a discrete random variable.
The table (1) is called the Law of distribution or the probability distribution of a
discrete random variable. The total of all the probabilities in a probability distribution must
p + p +.. .+ p =1
always equal 1. In this case 1 2 n . This fact can be useful if we do not have
complete information about the probabilities.
Example 2. A fair six-sided die is rolled. Write down the probability distribution of the
outcome of rolling a fair die.
Solution.

X 1 2 3 4 5 6
P( X =x ) 1 1 1 1 1 1
6 6 6 6 6 6
Here the sum of all the probabilities is equal to 1.
6
∑ Pi = 16 + 16 + 16 + 16 + 16 + 16 =1
i=1
Example 3. Three fair coins are tossed. The number of heads X, is counted. Write down
the probability distribution of getting heads.
Solution. In this experiment we have eight possible outcomes HHH, HHT, HTH, HTT,
THH, THT, TTH, TTT.

Consequently,
Number of Heads (X) 0 1 2 3
P( X =x ) 1 3 3 1
8 8 8 8
Here the sum of all the probabilities is equal to 1.
4
∑ Pi = 18 + 38 + 38 + 18 =1
i=1
Example 4. A discrete random variable X has the following probability distribution:
X 1 2 3 4
P( X =x ) 1 k 1 3
5 4 10
Find the value of k.
Solution. For a discrete random variable the sum of all the probabilities must always equal
1.
1 1 3 1
+ k + + =1⇒ k=
5 4 10 4
Example 5. Given P( X =x )=kx for x=1,2,3,4. Find k.
Solution. According to the condition we can make a table to show the probability
distribution

X 1 2 3 4
P( X =x ) k 2k 3k 4k

1
k + 2k + 3 k +4 k=1 ⇒10 k =1⇒ k =
We have 10 .
Let us now consider a continuous random variable.
To each interval (a,b) belonging to the range of a random variable of the continuous type
there corresponds a definite probability P( a< X <b ) that the value assumed by the random
variable will fall in that interval.
It is convenient to represent the law of distribution of a continuous random variable with
the aid of the so-called probability density function f ( x ) . The probability P( a< X <b ) of the
fact that the value assumed by the random variable X will fall in the interval (a,b) is defined by
the equality
b
P(a< X <b )=∫ f ( x )dx
a .
Definition. The graph of the probability density function f ( x ) is called a distribution
curve.
In terms of geometry, the probability that the random variable will fall in the interval (a,b)
is equal to the area of the corresponding curvilinear trapezoid bounded by the distribution curve,
the Ox axis and the straight lines x=a, x=b.

f (x)

o a b x
The probability density function f ( x ) possesses the following properties:
1. f ( x )≥0 (i.e f ( x ) is non-negative)
+∞

2. −∞
∫ f ( x)dx=1 .
Moreover, if all the values of the random variable X belong to the interval (a,b), the last
property can be written as
b
∫ f ( x )dx=1
a .

Probability Distribution Function


We have shown above that a continuous variable X can be represented by using the
probability density function f ( x ) . However, this method is not the only one. The law of
distribution of a continuous random variable can be also represented with the aid of the so-called
probability distribution function.
Definition. Let x be an arbitrary real number.
Consider the function
F ( x )=P( X < x )
This function F ( x ) is called the probability distribution function of the random variable X.
The function F ( x ) defines the probability of the fact that the random variable X will
assume a value less than x.
The function F ( x ) exists both for discrete and for continuous random variables. If f ( x ) is
the probability density function of the continuous random variable X, then
+∞
F( x)= ∫ f (t )dt
−∞ .
¿
It follows from the last equality that f ( x )=F ( x ) .
The function f ( x ) is sometimes called a probability distribution differential function,
and the function F ( x ) , a probability distribution integral function.
It should be noted some properties of a probability distribution function F ( x ) .

Properties

1. All the values assumed by F ( x ) belong to the interval [0,1]:


0≤F( x )≤1 .
Proof. It follows from the definition of F ( x ) as a probability. The probability is always
non-negative number which is not greater than 1.
2. F ( x ) is a non-decreasing function, F ( x)↑ , i.e.
x 2 > x 1 ⇒ F ( x 2 )≥F ( x1 )
Proof. Let x 2 > x 1 . The event, consisting in the fact that X will assume a value less than x 2
, may be subdivided into two following inconsistent events:
E1: X will assume a value less than x 1 with the probability P( X < x 1 )
E2: X will assume a value satisfying the inequality x 1≤ X < x 2 with the probability
P( x 1≤ X < x 2 ) .
By the probability addition rule

P( X < x 2 )=P ( E 1 + E2 )=P ( X < x 1 )+ P ( x 1 ≤X < x 2 )


whence
P( X < x 2 )−P ( X < x 1 )=P( x 1≤ X< x 2 )
or
F ( x2 )−F ( x 1 )=P( x 1≤ X < x 2 )≥0 ⇒
F ( x2 )≥F ( x 1 )
and we get what had to prove.
[Link] probability of the fact that a random variable X will assume a value belonging to an
interval (a,b) is equal to an increment of the function F ( x ) on that interval:
P(a≤X < b)=F(b )−F (a ) . (*)
Proof. From the previous property we have
F ( x2 )−F ( x 1 )=P( x 1≤ X < x 2 ) .
Putting x 2 =b and x 1=a we obtain (*) .
4. The probability of the fact than the continuous random variable X will assume a certain
one value is equal to zero:
P( X =x 1 )=0 .
Proof. We have
P(a≤X <b)=F(b )−F (a )
Putting a=x 1 and b=x 1 + Δx we get
P( x 1≤ X < x 1 + Δx )=F ( x 1 + Δx )−F ( x1 ) .
Let Δx → 0 . Since X is continuous random variable, F ( x ) is continuous. Consequently
Δx →0 ⇒ F ( x 1 + Δx )−F ( x1 )→0 ⇒ P( X =x1 )=0.
The property has been proved.
Note that, using this property, it is easy to prove the following equalities:
P(a≤X <b)=P(a< X <b )=
=P (a<X ≤b )=P(a≤X ≤b )
For example, the equality
P(a< X≤b)=P(a< X <b )
is proved as follows:
P(a< X≤b)=P(a< X <b )+ P ( X=b)=P (a< X< b ) .
5. if all the possible values of a random variable belong to (a,b), then:
(1) F ( x )=0 for x≤a
(2) F ( x )=1 for x≥b .
Proof. (1) Let x 1≤a (Fig. 1).
Then the event X < x 1 is x1 a b impossible and hence P( X < x 1 )=0
(2) Let x 2 ≥b (Fig.2). a
Fig.1
b x2
In this case the event X < x 2 is a Fig.2 certain one and therefore
P( X < x 2 )=1 .
6. If all the possible values of a continuous random variable lie on the whole x-axis, then
lim F ( x )=0; lim F ( x )=1 .
x →−∞ x →+∞
Lecture 15
Expectation of a Discrete Random Variable

Definition. The expectation (or mean value) of a discrete random variable is the sum of
the products of the values of the random variables by the probabilities of these values.
The expectation (or mean value) of a random variable X is written E(X). The expectation is
also known as mathematical expectation, average, mean value, or mean. If the random variable X
has the following probability distribution

x x1 x2 … xn
P( X =x ) p1 p2 … pn

then the expectation can be calculated as


E( X )=x 1 p1 +x 2 p2 +.. .+x n pn
or
n
E( X )=∑ x i p i
i=1
Example 1. A discrete random variable X has probability distribution

x 1 2 3 4
P( X =x ) 0.4 0.3 0.2 0.1

Calculate E(X).
Solution. According to the definition we have to calculate the product xP( X=x ) for all
possible values of x and add up the results:
E( x )=1⋅0 . 4+2⋅0 .3+3⋅0 . 2+4⋅0 .1=2 .
Example 2. A random variable X has probability distribution P( X =x )=k ( x+1 ) for
x=2, 3, 4 , 5, 6. Find E(X).
Solution. According to condition we have the following probability distribution

x 2 3 4 5 6
P( X =x ) 3k 4k 5k 6k 7k

First we find k. Since for a discrete random variable the sum of all the probabilities must
add up to one we get
1
k= =0 , 04
25 k =1 or 25
It follows that the probability distribution will be:

x 2 3 4 5 6
P( X =x ) 0.12 0.16 0.2 0.2 0.28
4
Now we can easily find E(X):
E( x )=2⋅0 . 12+3⋅0 .16 +4⋅0 . 2+5⋅0 . 24+6⋅0 .28=4 . 4
Example 3. A random variable X has the following probability distribution

x 1 2 3 4 5
P( X =x ) 0.1 a b 0.2 0.1

Given E(X)=2.9, find the value of a and the value of b.


Solution. By definition
E( x )=0 .1+2 a+3 b+0 . 8+0 .5=2 .9
whence
2 a+3 b=1 .5
On the other hand, the sum of all the probabilities must be equal to one:
0 . 1+a+b+0 .2+0 . 1=1 ⇒ a+b=0 . 6
To determine a and b we have the following system of two equations with two unknowns:

{2 a+3b=1.5 ¿¿¿¿
Solving this system, we find a=0.3 and b=0.3.
Note the following:
1. The expectation of a random variable, intuitively, is the average value of repetitions of the
experiment it represents.
2. The expected value (expectation) of a random variable is greater than the least value and
less than the highest possible value that the variable can take.
3. The expectation of a random variable need not be one of the values that the variable can
take.

Properties of Expectation
Note some important properties of expectation.
1. The expectation of a constant variable is equal to the constant itself:
E(C )=C
Proof. We shall consider a constant C as a discrete random variable which can assume
only one possible value C with the probability p=1. Hence,
E(C )=C⋅1=C
So, if C is a constant, then E(C )=C .
2. A constant factor can be taken out of the sign of the expectation:
E(CX )=CE( X )
Proof. Suppose the probability distribution of the discrete random variable X is:

X x1 x2 … xn
P( X =x ) p1 p2 … pn

Then the Law of distribution of the random variable CX can be written as


CX Cx 1 Cx 2 … Cx n
P p1 p2 … pn

The expectation of the random variable CX is calculated as follows:


E(CX )=Cx1 p1 +Cx 2 p2 +. . .+ Cxn pn =
¿ C ( x1 p1 + x 2 p 2 +.. .+ x n pn )=CE( X )
Thus,
E(CX )=CE( X ) .
3. If X and Y are two independent random variables, then
E( XY )=E ( X )⋅E (Y ) .
Proof. Suppose the independent random variables X and Y are given by their probability
distributions. To simplify the calculations we consider a small number of possible values.

X x1 x2 X y1 y2
P( X =x ) p1 p2 P(Y = y ) q1 q2

Then the law of distribution of the random variable XY can be written as

XY x1 y1 x2 y1 x1 y2 x2 y2
P p1 q 1 p2 q 1 p1 q 2 p2 q 2

The expected value of the random variable XY can be written as:


E( XY )=x 1 y 1⋅p 1 q1 + x2 y 1⋅p2 q 1 + x 1 y 2⋅p1 q2 + x 2 y 2⋅p2 q 2=
¿ y 1 q 1 ( x 1 p 1 + x 2 p2 )+ y 2 q 2 ( x 1 p 1 + x 2 p 2 )=
¿( x 1 p1 + x 2 p2 )⋅( y 1 q1 + y 2 q2 )=E ( X )⋅E(Y )
Thus,
E( XY )=E ( X )⋅E (Y ) .
4. If X and Y are two random variables, then
E( X +Y )=E ( X )+ E(Y )
Example 1. Two independent random variables X and Y are given by the following
probability distributions

X 3 5 8 Y 4 7
P( X =x ) 0.1 0.3 0.6 P(Y = y ) 0.2 0.8

Find E( XY ) .
Solution. We find the expectations of each of the given variables
E( X )=3⋅0 .1+5⋅0 .3+8⋅0 . 6=6 . 6
E(Y )=4⋅0. 2+7⋅0. 8=6 . 4 .
Since the random variables X and Y are independent the expectation E( XY ) can be
calculated as
E( XY )=E ( X )⋅E (Y )=6 .6⋅6 . 4=42 . 24 .
Example 2. Two fair six-sided dice numbered 1 to 6 are thrown once. The random
variables X and Y represent the values on the upper face of each of the dice. Find E( X +Y ) .
Solution. We have
X 1 2 3 4 5 6
P( X =x ) 1 1 1 1 1 1
6 6 6 6 6 6

Y 1 2 3 4 5 6
P(Y = y ) 1 1 1 1 1 1
6 6 6 6 6 6

Now we find E( X ) and E(Y ) .


1 1 1 1 1 1 7
E( X )=1⋅ +2⋅ +3⋅ +4⋅ +5⋅ +6⋅ =
6 6 6 6 6 6 2
7
E(Y )=
It is clear that 2 . Therefore
7 7
E( X +Y )=E ( X + E (Y )= + =7
2 2 .

Variance of a Discrete Random Variable

Suppose two discrete random variables X and Y are given by the following probability
distributions

X -0.02 0.03 Y -700 300


P( X =x ) 0.6 0.4 P(Y = y ) 0.3 0.7

Here we find the expectations of these variables:


E( X )=−0. 02⋅0. 6+0. 03⋅0 , 4=0
E(Y )=−700⋅0 .3+300⋅0 .7=0
The mathematical expectations of these variables are the same and the possible values are
different. Moreover, X can take possible values close to the expectation, and Y can take possible
values far from the expected value.
This example shows that knowing only the mathematical expectation of a random variable,
it is impossible to judge what the possible values it can take and how these values are spread
around the expectation. Therefore, along with the mathematical expectation we use another
characteristic that helps to estimate how the possible values of a random variable are spread
around the expected value. This new characteristic is called the variance of a random variable.
Let X be a random variable and E(X) its mathematical expectation.
Definition. The difference X −E( X ) between the random variable X and its expectation
E(X) is called the deviation of the random variable.
Suppose the probability distribution of the random variable X is:

X x1 x2 … xn
P( X =x ) p1 p2 … pn

Then the deviation X −E( X ) has the following probability distribution

X −E( X ) x 1−E ( x ) x 2 −E( X ) … x n −E( X )


P p1 p2 … pn

Theorem. The expectation of the deviation is equal to zero:


E( X−E( X ))=0
Proof. Using the properties of the mathematical expectation and taking into account that
E( X ) - constant, we obtain
E( X−E( X ))=E( X )−E (E ( X ))=E ( X )−E( X )=0 .
Definition. The variance of a random variable is the expectation of the square of the
deviation of the random variable its expectation.
The variance of X is usually written as Var (X) and by definition
Var ( X )=E[ X−E ( X )]2 .
The variance of a random variable is spread of its values about its expectation.
Theorem. The variance is found by the formula
Var ( X )=E( X 2 )−( E( X ))2 .
2
Proof. The expectation E( X ) is constant and hence, 2 E( X ) and E ( X ) are also constant.
Taking it into account and using the properties of the mathematical expectation, we obtain

Var ( X )=E [ X−E ( X ) ] =E [ X 2−2 XE( X )+E 2 ( X ) ]=


2

=E ( X 2 )−2 E( X )E ( X )+E ( E2 ( X ))=


=E( X 2 )−2 E 2 ( X )+ E2 ( X )=E ( X 2 )−(E ( X ))2 .

The theorem has been proved.

Properties of Variance

1. If C is a constant, then Var (C )=0 .


Proof. By definition
Var( C )=E [ ( C−E (C ) ) ]=E [ ( C−C ) ]=E ( 0 )=0
2 2

So, Var(C )=0


2. If C is a constant, then
2
Var (CX )=C ⋅Var ( X ) .
Proof. We have

Var (CX )=E [(CX−E (CX ))2 ]=E [ C 2 ( X −E( X ))2 ]=


=C 2 E [( X −E( X ))2 ]=C 2⋅Var ( X ) .
3. If X and Y are independent random variables, then
Var ( X +Y )=Var ( X )+Var (Y ) .
Proof. According to the formula for calculating the variance we obtain
Var ( X +Y )=E [( X+ Y )2 ]−E [ ( X + Y ) ] 2
Removing the brackets and using the properties of the expectation we get

Var ( X +Y )=E [ X 2 +2 XY +Y 2 ]−[ E( X )+E (Y )] =


2

¿ E( X 2 )+2 E( X ) E(Y )+E (Y 2 )−E2 ( X )−2 E ( X )E(Y )−E 2 (Y )=


¿ E( X 2 )−E2 ( X )+E (Y 2 )−E2 (Y )=Var ( X )+Var (Y ) .
4. If X and Y are independent random variables, then
Var ( X−Y )=Var ( X )+Var (Y ) .
Proof. According to the property 3 we get
Var ( X−Y )=Var( X )+Var(−Y ) .
Now using the property 2 we obtain
Var ( X−Y )=Var ( X )+(−1)2⋅Var (Y )
or
Var ( X−Y )=Var ( X )+Var (Y ) .

Example. A fair six-sided die is thrown. What is Var ( X ) if X is outcome of one fair die?
Solution. We have
1 1 1 1 1 1 7
E( X )=1⋅ +2⋅ +3⋅ +4⋅ +5⋅ +6⋅ =
6 6 6 6 6 6 2
1 1 1 1 1 1 91
E( X 2 )=12⋅ +22⋅ +3 2⋅ + 4 2⋅ +52⋅ +6 2⋅ =
6 6 6 6 6 6 6
Var ( X )=E( X 2 )−E2 ( X ) = − ()
91 7 2 35
=
6 2 12 .

Expectation and Variance


of a Continuous Random Variable

The concepts of the expectation and the variance can be extended to a continuous random
variable. Suppose f ( x ) is the probability density function of the random variable X.
Definition. The expectation of the continuous random variable X is specified by the
equality
+∞
E( X)= ∫ xf ( x)dx
−∞
(provided the value of the integral is finite).
Definition. The variance of the continuous random variable X is specified by the formula
+∞
Var( X)= ∫ [ x−E( X)] f ( x)dx .
2
−∞

Standard Deviation

Definition. The quantity σ = Var( X ) is called the standard deviation of the random
variable X.
The standard deviation is a measure of the spread of values (scores) within of data. The
standard deviation is a measure that is used to quantify how the values of a set of data are spread.
This measures the average distance of data items from the expectation.
Example. A discrete random variable X has the following law of distribution:

X -5 2 3 4
P 0.4 0.3 0.1 0.2

Find Var(X) and σ .


Solution. The variance can be calculated by the formula
2 2
Var ( X )=E( X )− [ E ( X ) ] .
To this end first we find the expectation
E( X )=−5⋅0 . 4+2⋅0 .3+3⋅0 .1+4⋅0 .2=−0 .3 .
2
The discrete random variable X has probability distribution

X2 25 4 9 16
P 0.4 0.3 0.1 0.2

2
We find E( X )
E( X 2 )=25⋅0 . 4 +4⋅0 . 3+9⋅0. 1+16⋅0. 2=15 ,3 .
Now we find the variance:
2 2 2
Var ( X )=E( X )− [ E ( X ) ] =15 .3−(−0 . 3) =15 . 21 .
Therefore
σ =√ Var( X )=√ 15 .21=3.9 .

Uniform Distribution

The distribution of random variables whose all values lie in an interval [a,b] and possess a
constant probability density on that interval is known as uniform distribution.
Let us find the probability density function f ( x ) of the uniform distribution. It is known
that all the possible values of the random variable lie in the interval [a,b] on which the function
f ( x ) has constant value C. In other words, the random variable X does not assumes the values
out of the interval [a,b].
Thus,

f (x)=¿{0, if x<a¿{C,if a≤x≤b¿¿ ¿


f(x)

o a x
b

Let us now find the constant C. Since all the possible values of the random variable X
belong to the interval [a,b], the following equality holds true
b b

∫ f ( x ) dx=1 ∫ Cdx=1
a or a .
1
C=
Since C (b−a)=1 , we have b−a and, hence

{
1
f(x)=¿ { 0, if x<a¿ , if a≤x≤b ¿ ¿¿¿
b−a
Now we can easily find the mathematical expectation, the variance and the standard
deviation for a random variable with uniform distribution. We have
b b
x 1 b2 −a 2 a+b
E( X )=∫ xf (x )dx=∫ dx= ⋅ =
a a b−a b−a 2 2 .
Thus,
a+ b
E( X )= ,
2
which should be expected because of the symmetry of distribution.
To calculate the variance we use the formula
a+ b
2 2 E( X )=
Var ( X )=E( X )− [ E ( X ) ] taking into account the value 2 that has already
2
been found. Thus, it remains to calculate E( X ) . We have
b b
x2 b2 + ab+ a2
E( X )=∫ x f ( x )dx=∫
2 2
dx=
a a b−a 3 .
It follows that
2 2
b 2 +ab +a2 ( a+b ) ( b−a )
Var ( X )= − =
3 4 12
and, hence
b−a
σ =√ Var ( X )=
2 √3 .

Binomial Distribution

If the probability of occurrence of a random event in each trial is equal to p, then, as is


known, the probability of the event occurring m times in n trials is specified by Bernoulli’s
formula
Pm , n =C mn pm q n−m , where q=1− p . (*)
The distribution of the random variable X which can assume n+1 values 0,1,2,...,n
described by Bernoulli’s formula is known as a binomial distribution.
The law of distribution was called “binomial” because of the right side of the equality (*)
we can consider as the general term of the Newton’s binomial expansion:
( p+q )n =C nn pn +C n−1
n p n−1 q +.. .+C 0n q n .

Thus, the first termpn of the expansion defines the probability of the event occurring n
n−1
times in n independent trials; the second term n p q defines the probability of the event
n
occurring n-1 times;…; the last term q defines the probability of the event occurring not once
(i.e. never).
The mathematical expectation and the variance for the binomial distribution of a random
variable X are determined by the following formulas:
E( X )=np and Var ( X )=npq .

Poisson’s Distribution

The distribution of the random variable X which can assume any integer non-negative
values (0,1,2,...,n) described by the formula

am −a
P( X =m)= e
m! ,
is known as Poisson’s distribution.
The mathematical expectation and the variance for the Poisson’s distribution of a random
variable X are determined by the formulas:
E( X )=a and Var ( X )=a .

You might also like