de Introduction and Week 1 Lecture
de Introduction and Week 1 Lecture
Rayees Ahmad
------------------------------------------------------------------------
Differential Equations Lecture Notes
Recall: (Notations of Derivative)
For example,
𝑑𝑦
• = 2𝑥𝑦 _____________________________(1)
𝑑𝑥
where 𝒚 is a dependent variable (unknown function), and 𝒙 is an independent
variable.
𝑑𝑦
• 𝑥 = 𝑦 − 1 ___________________________(2)
𝑑𝑥
𝑑2 𝑦 𝑑𝑦
• + + 𝑦 = 0 ________________________(3)
𝑑𝑥 2 𝑑𝑥
𝜕𝑢 𝜕𝑣
• =− _____________________________(4)
𝜕𝑦 𝜕𝑥
𝜕𝑥 𝜕𝑦
• + + 2 = 0 _________________________(5)
𝜕𝑦 𝜕𝑥
𝜕2 𝑢 𝜕2 𝑢 𝜕𝑢
• 2 + =2 _________________________(6)
𝜕𝑥 𝜕𝑡 2 𝜕𝑡
Since the time of Newton, humanity has realized that the behaviour of the
physical universe can be described and predicted using differential
equations. These equations form the mathematical language that captures
the essence of how physical systems change over time and space, making
them indispensable in fields like mechanics, electromagnetism,
thermodynamics, and quantum mechanics, etc.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Waves and Oscillations
Radioactive Decay:
Radioactive decay is the process by which an unstable atomic nucleus
loses energy by emitting radiation. This occurs when an atom's nucleus is
unstable and seeks to achieve a more stable form by transforming into a
different nucleus. The emission of radiation can take the form of alpha
particles, beta particles, or gamma rays. During this process, the atom
can transform into a different element or isotope.
For example, Radium, Ra-226, over time the highly radioactive radium, Ra-226,
transmutes into the radioactive gas radon, Rn-222. To model the phenomenon of
𝒅𝑨
radioactive decay, it is assumed that the rate at which the nuclei of a substance
𝒅𝒕
decay is proportional to the amount (more precisely, the number of nuclei) 𝑨(𝒕) of
the substance remaining at time 𝒕.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
𝒅𝑨
∝𝑨
𝒅𝒕
This implies that
𝒅𝑨
=𝒌𝑨
𝒅𝒕
where 𝒌 is constant of proportionality having initial condition 𝑨(𝟎) = 𝑨𝟎 .
We can see that decay model and population models are represented by
almost same initial value problem. For growth, 𝒌 < 𝟎, and for decay, 𝒌 >
𝟎.
Carbon Dating
You are presented with a document which purports to contain the recollections
of a Mycenaean soldier during the Trojan War. The city of Troy was finally
destroyed in about 𝟏𝟐𝟓𝟎 𝐵𝐶, or about 𝟑𝟐𝟓𝟎 years ago.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Given the amount of 𝒄𝒂𝒓𝒃𝒐𝒏 − 𝟏𝟒 contained in a measured sample cut from
the document, there would have been about 𝟏. 𝟑 × 𝟏𝟎–𝟏𝟐 grams of 𝑐𝑎𝑟𝑏𝑜𝑛 −
14 in the sample when the parchment was new, assuming the proposed age
is correct. According to your equipment, there remains 𝟏. 𝟎 × 𝟏𝟎–𝟏𝟐 grams. Is
there a possibility that this is a genuine document? Or is this instead a recent
forgery? Justify your conclusions.
How to Model:
𝒅𝑨
∝𝑨
𝒅𝒕
This implies that
𝒅𝑨
=𝒌𝑨
𝒅𝒕
where 𝒌 is constant of proportionality having initial condition 𝑨(𝒕𝟎 ) = 𝑨𝟎 .
At time 𝒕 = 𝟎, we have
𝒅𝑨
=𝒌𝑨; 𝑨(𝟎) = 𝑨𝟎
𝒅𝒕
Here in this model, we have an additional calculated information that
𝑪𝒂𝒓𝒃𝒐𝒏 − 𝟏𝟒 has a half-life of 𝟓𝟕𝟑𝟎 years.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Laws of Cooling/Warming
Assume you are a police officer at a crime scene with a dead body.
The forensics team measures the temperature of the body twice (assuming
they do not know the constant of proportionality κ): the 1st time, immediately
after their arrival, at 10 𝑝𝑚, the temperature of the body is found to be 33 ℃
and 1 hour later it is measured at 32.2℃.
𝑇𝑚 = Temperature of environment
𝑡 = time.
We will see, after learning two simple methods to solve such DE thathow its
solution takes the form
𝑻 = 𝑻𝒎 + 𝒄𝒆𝒌𝒕
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Types of Phenomena Represented by Differential Equations:
1. Physical Processes: Motion of objects, heat transfer, fluid
dynamics, wave propagation, electric circuits.
2. Biological Systems: Population dynamics, spread of diseases,
growth models.
3. Chemical Reactions: Rates of reactions, diffusion processes.
4. Economic Models: Change in stock prices, market behaviour
over time.
5. Control Systems: Feedback systems, regulation processes.
6. Signal Processing: Filter design, signal propagation.
7. Artificial Intelligence: Neural network dynamics, learning
models. etc.
Application Examples of Differential Equations in Computer
Science:
1. Machine Learning (Gradient Descent and Backpropagation):
o Ordinary differential equations (ODEs) are used to model
the training process in machine learning, where a neural
network learns by updating weights to minimize a loss
function.
o The gradient descent algorithm can be viewed as solving
a differential equation, where each step in the learning
process updates the model's parameters (weights)
according to the gradients (slopes) of the loss function.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Example:
𝒅𝑾
= −𝛁 𝑳(𝑾)
𝒅𝒕
where 𝑾 represents the weights, and 𝑳(𝑾) is the loss function. The
change in weights over time is proportional to the negative gradient
of the loss function.
2. Computer Vision (Image Processing and Edge Detection):
o Partial differential equations (PDEs) are used in image
processing to model the smoothing of images (blurring) and
extracting features like edges.
o The heat equation, for example, can be used for image
denoising and smoothing:
𝝏𝒖
= 𝜶 𝛁𝟐 𝒖
𝝏𝒕
where 𝒖 = 𝒖(𝒙, 𝒚, 𝒕) represents the pixel intensity at location (𝒙, 𝒚)
over time, and 𝜶 is a constant.
o Edge detection using differential equations like the
Laplacian of Gaussian operator, helps identify edges in
an image by detecting regions, where intensity changes
sharply.
3. Robotics (Control Systems):
o Differential equations play a critical role in robotic control
systems. The movement of robotic arms, drones, and other
autonomous systems are modelled by ordinary differential
equations to ensure smooth and precise motion.
o For example, the dynamic equation for the control of a
robotic arm can be modelled as:
𝑴(𝜽) 𝜽̈ + 𝑪(𝜽, 𝜽̇) + 𝑮(𝜽) = 𝝉
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
where 𝜽 represents joint angles, 𝑴(𝜽) is the inertia matrix, 𝑪(𝜽, 𝜽̇) is
the Coriolis matrix, 𝑮(𝜽) is the gravity vector, and 𝝉 is the control torque
applied.
4. Computer Networks (Traffic Flow and Congestion Control):
o Network traffic flow can be modelled using differential
equations to understand congestion control and predict
traffic patterns. The fluid flow model is one such
approach, using differential equations to describe how
packets of data move through the network.
o An example is the Transmission Control Protocol (TCP)
congestion control algorithm, which adjusts the sending
rate based on feedback about packet loss and delay. This
can be represented by a differential equation that
describes how the congestion window size changes
over time.
5. Simulation of Natural Phenomena (Physics-based
Rendering):
o In computer graphics and simulations, differential
equations are used to simulate natural phenomena such
as water waves, smoke, fire, and cloth dynamics.
o For example, fluid dynamics can be simulated using the
Navier-Stokes equations:
𝝏𝒖
+ (𝒖. 𝛁)𝒖 = −𝛁𝒑 + 𝒗 𝛁𝟐 𝒖 + 𝒇
𝝏𝒕
where 𝒖 is the velocity field, 𝒑 is pressure, 𝒗 is viscosity, and 𝒇 is an
external force.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
6. Cryptography (Elliptic Curve Cryptography):
o Elliptic curves are used in cryptographic algorithms, and
they are described by a differential equation of the form:
𝒚𝟐 = 𝒙𝟑 + 𝒂𝒙 + 𝒃
Differential equations and number theory work together in
cryptography to secure communication systems, like those used
in blockchain technologies and secure transactions.
In Conclusion, Differential equations are a fundamental tool in
computer science, especially in areas involving continuous
processes like machine learning, robotics, image processing,
network analysis, and simulations. These applications leverage the
power of differential equations to model and solve real-world
problems efficiently.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Classification of Differential Equations by Types
There are two basic types of differential equation (DE).
1. Ordinary Differential Equation (ODE)
2. Partial Differential Equation (PDE)
The order of a differential equation (either ODE or PDE) is the order of the
highest derivative appearing in the differential equation.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Degree of Differential Equation:
𝒅𝒚
• 𝒙 = 𝐬𝐢𝐧 (𝒅𝒙 − 𝒚 𝒄𝒐𝒔(𝒙))
𝒅𝒚
• 𝒙 − 𝒚 𝐬𝐢𝐧(𝒙) = 𝐥𝐨𝐠 ( )
𝒅𝒙
Note:
Examples:
• (𝒚 − 𝒙) 𝒅𝒙 + 𝟒𝒙 𝒅𝒚 = 𝟎
1st order, linear ODE
• 𝒚′′ − 𝟐𝒚′ + 𝒚 = 𝟎
2nd order, linear ODE
𝒅𝟑 𝒚 𝒅𝒚 𝒙
• 𝟑 + 𝒙 − 𝟓𝒚 = 𝒆
𝒅𝒙 𝒅𝒙
3rd order, linear ODE
• 𝒚′ − 𝒆𝒙 𝒚 + 𝟑 = 𝟎
1st order, linear ODE
• 𝒚′ − 𝒆𝒙 𝒚 = 𝟎
1st order, linear ODE
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
• 𝟑𝒚′′ − 𝟐𝒚′ = 𝟕
2nd order, linear ODE
𝒅𝟓 𝒚 𝒅𝒚
• 𝟒 ( )
𝟓 + 𝒄𝒐𝒔 𝒙 =𝟎
𝒅𝒙 𝒅𝒙
5th order, linear ODE
Examples:
𝒚′ = 𝒆𝒙 𝒔𝒆𝒄(𝒚)
• 𝒕𝟓 𝒚(𝟒) − 𝒕𝟑 𝒚′′ + 𝟔𝒚 = 𝟎
• 𝐬𝐢𝐧(𝜽) 𝒚′′′ − 𝐜𝐨𝐬(𝜽) 𝒚′ = 𝟐
• 𝒙̈ − 𝒙̇ + 𝒕 = 𝟎
𝒅𝟑 𝒚 𝒅𝒚 𝟒
• 𝒙 −( ) +𝒚=𝟎
𝒅𝒙𝟑 𝒅𝒙
a) State the order and degree of the given ordinary differential equation.
b) Determine whether the equation is linear or nonlinear?
c) Also tell that which variable is dependent and which variable is
independent?
Solution: One way of verifying that the given function is a solution is to see,
after substituting, whether each side of the equation is the same for every x in
the interval.
Consider the given ordinary differential equation
𝒅𝒚 𝟏
= 𝒙 𝒚𝟐 _______________________(𝟏)
𝒅𝒙
Consider L.H.S.
𝒅𝒚 𝒅 𝒙𝟒 𝟏 𝒅 𝟒 𝟏 𝟑
𝟏 𝟑 𝒙𝟑
= ( )= (𝒙 ) = (𝟒𝒙 ) = (𝒙 ) = _________(𝟐)
𝒅𝒙 𝒅𝒙 𝟏𝟔 𝟏𝟔 𝒅𝒙 𝟏𝟔 𝟒 𝟒
Consider R.H.S.
𝟏 𝟏
𝟏 𝒙𝟒 𝟐 (𝒙𝟐 )𝟐 𝟐 𝒙𝟐 𝒙𝟑
𝒙 𝒚𝟐 = 𝒙( ) = 𝒙( ) = 𝒙( ) = _________(𝟑)
𝟏𝟔 (𝟒)𝟐 𝟒 𝟒
we see that each side of the equation is the same for every real number 𝒙.
𝟏
𝒙𝟐 𝒙𝟒
Note that 𝒚 =𝟐 is, by definition, the nonnegative square root of .
𝟒 𝟏𝟔
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
b) 𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0; 𝑦 = 𝑥𝑒 𝑥
Solution:
Since given that
𝑦 = 𝑥𝑒 𝑥
This implies that
𝑦 ′ = 𝑥𝑒 𝑥 + 𝑒 𝑥
and
𝑦 ′′ = 𝑥𝑒 𝑥 + 2 𝑒 𝑥
Now consider the given ODE
𝑦 ′′ − 2𝑦 ′ + 𝑦 = 0
Consider 𝐿. 𝐻. 𝑆.
𝑦 ′′ − 2𝑦 ′ + 𝑦 = (𝑥𝑒 𝑥 + 2 𝑒 𝑥 ) − 2(𝑥𝑒 𝑥 + 𝑒 𝑥 ) + 𝑥𝑒 𝑥
= 𝑥𝑒 𝑥 + 2 𝑒 𝑥 − 2𝑥𝑒 𝑥 − 2 𝑒 𝑥 + 𝑥𝑒 𝑥
= 𝑥𝑒 𝑥 + 𝑥𝑒 𝑥 − 2𝑥𝑒 𝑥 + 2 𝑒 𝑥 − 2 𝑒 𝑥
= 2𝑥𝑒 𝑥 − 2𝑥𝑒 𝑥 + 2 𝑒 𝑥 − 2 𝑒 𝑥
= 0 = 𝑅. 𝐻. 𝑆
Note that, each differential equation possesses the constant solution
𝒚 = 𝟎, − ∞ < 𝒙 < ∞.
A solution of a differential equation that is identically zero on an interval 𝑰 is
said to be a trivial solution.
General Solution:
If solution containing as many arbitrary constants as the order of DE is called
general solution (GS).
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Particular Solution:
A solution obtained from general solution (GS) by giving particular values
to the constants, is called a particular solution.
Note:
• The graph of particular solution is called integral curve of DE.
𝒅𝒏 𝒚
𝑺𝒐𝒍𝒗𝒆: = 𝒇(𝒙, 𝒚, 𝒚′ 𝒚′′ , … , 𝒚(𝒏−𝟏) )
𝒅𝒙𝒏
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐: 𝒚(𝒙𝟎 ) = 𝒚𝟎 , 𝒚′ (𝒙𝟎 ) = 𝒚𝟏 , . . . ., 𝒚(𝒏−𝟏) (𝒙𝟎 ) = 𝒚𝒏−𝟏
Note:
• Initial conditions are such conditions which relate to one value of the
independent variable.
Example:
• The conditions which relate to two different values of the independent variable.
Example:
Figure 1
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
𝒅𝟐 𝒚
If = 𝒇(𝒙, 𝒚, 𝒚′ ) is an ODE subject to the initial conditions 𝒚(𝒙𝟎 ) = 𝒚𝟎 and
𝒅𝒙𝟐
𝒚′ (𝒙𝟎 ) = 𝒚𝟏 , we want to find a solution 𝒚(𝒙) of the differential equation 𝒚′′ =
𝒇(𝒙, 𝒚, 𝒚′ )on an interval 𝑰 containing 𝒙𝟎 so that its graph not only passes through
(𝒙𝟎 , 𝒚𝟎 ) but the slope of the curve at this point is the number 𝒚𝟏 . A solution curve
is shown in blue in Figure 𝟐.
Figure 2
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Question:
If
𝒚 = 𝒄𝟏 𝒆𝒙 + 𝒄𝟐 𝒆−𝒙
is a general solution of the second-order DE
𝒚′′ − 𝒚 = 𝟎
Then find the particular solution of the second-order IVP of this
differential equation having the given initial conditions.
a) 𝒚(𝟎) = 𝟏, 𝒚′ (𝟎) = 𝟐
b) 𝒚(𝟏) = 𝟎, 𝒚′ (𝟏) = 𝟑
Solution:
Given that
𝒚 = 𝒄𝟏 𝒆𝒙 + 𝒄𝟐 𝒆−𝒙 ____________(𝟏)
Since the first given initial condition is 𝒚(𝟎) = 𝟏, that is, at 𝒙 = 𝟎, the
value of 𝒚 = 𝟎. So putting values in equation (1), we have
𝟏 = 𝒄𝟏 𝒆𝟎 + 𝒄𝟐 𝒆−𝟎
𝟏
𝟏 = 𝒄 𝟏 𝒆𝟎 + 𝒄 𝟐 .
𝒆𝟎
Since 𝒆𝟎 = 𝟏, so
𝟏 = 𝒄𝟏 + 𝒄𝟐
𝒄𝟏 + 𝒄𝟐 = 𝟏 ___________(𝟐)
Now, taking derivative of equation (1), we have
𝒅 𝒅
(𝒚) = [𝒄 𝒆𝒙 + 𝒄𝟐 𝒆−𝒙 ] = 𝒄𝟏 𝒆𝒙 − 𝒄𝟐 𝒆−𝒙
𝒅𝒙 𝒅𝒙 𝟏
𝒚′ = 𝒄𝟏 𝒆𝒙 − 𝒄𝟐 𝒆−𝒙 ______________(𝟑)
Similarly, the given initial condition is 𝒚′ (𝟎) = 𝟐, that is, at 𝒙 = 𝟎, the
value of 𝒚′ = 𝟐. So putting values in equation (3), we get
𝟐 = 𝒄𝟏 𝒆𝟎 − 𝒄𝟐 𝒆−𝟎
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
𝟏
𝟐 = 𝒄 𝟏 𝒆𝟎 − 𝒄 𝟐 .
𝒆𝟎
Since 𝒆𝟎 = 𝟏, so
𝟐 = 𝒄𝟏 − 𝒄𝟐
𝒄𝟏 − 𝒄𝟐 = 𝟐 ___________(𝟒)
Here we have two equations (2) and (4)
𝒄𝟏 + 𝒄𝟐 = 𝟏 ___________(𝟐)
𝒄𝟏 − 𝒄𝟐 = 𝟐 ___________(𝟒)
By adding equation (2) and (4), 𝒄𝟐 will be cancelled and we get the value
of 𝒄𝟏 as
𝟑
𝒄𝟏 =
𝟐
Putting value of 𝑐1 in equation (2), we have
𝒄𝟏 + 𝒄𝟐 = 𝟏
𝟑
+ 𝒄𝟐 = 𝟏
𝟐
𝟑
𝒄𝟐 = 𝟏 −
𝟐
𝟏
𝒄𝟐 = −
𝟐
Hence, the solution becomes
𝒚 = 𝒄𝟏 𝒆𝒙 + 𝒄𝟐 𝒆−𝒙
𝟑 𝒙 𝟏 −𝒙
𝒚= 𝒆 − 𝒆
𝟐 𝟐
Note: Students will solve part (b) by yourself keeping in view the
solution of part (a).
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Practice Questions for Students
1) Question:
If
𝒚 = 𝒄𝟏 𝒄𝒐𝒔 (𝒕) + 𝒄𝟐 𝒔𝒊𝒏(𝒕)
is a general solution of the second-order DE
𝒙′′ − 𝒙 = 𝟎
Then find the particular solution of the second-order IVP of
this differential equation having the given initial conditions.
a) 𝒙(𝟎) = −𝟏, 𝒙′ (𝟎) = 𝟖
𝝅 𝝅
b) 𝒙 (𝟐 ) = 𝟎, 𝒙′ ( ) = 𝟏
𝟐
𝒅𝒚
= 𝒇 (𝒙, 𝒚)
𝒅𝒙
• Suppose we cannot solve this equation analytically, nor can we find a
method to do so.
• One useful technique for this qualitative analysis is the direction field,
also known as a slope field.
𝒅𝒚
2. Calculate the slope: For each point (𝒙, 𝒚), calculate the slope
𝒅𝒙
based on the given function 𝒇(𝒙, 𝒚).
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
3. Draw slope segments: At each point, draw a short line segment
with the calculated slope. These segments represent the tangent
lines to the solution curves at those points.
• While not directly related to graph theory, direction fields can be used
to study how certain network-based systems evolve over time,
especially if the dynamics of the system are described by differential
equations.
Example 1:
𝒅𝒚
= 𝒇(𝒙, 𝒚) = 𝟎. 𝟐 𝒙 𝒚
𝒅𝒙
At the point (𝟐, 𝟑), the slope of a line is 𝒇 (𝟐, 𝟑) = 𝟏. 𝟐.
The above figure shows a line segment (or lineal element) with
slope 𝟏. 𝟐 passing though (𝟐, 𝟑).
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Note:
• If we systematically evaluate 𝒇 over a rectangular grid of
points in the 𝒙𝒚-plane and draw a line element at each point
(𝒙, 𝒚) of the grid with slope 𝒇 (𝒙, 𝒚), then the collection of all
these line elements is called a direction field or a slope field
𝒅𝒚
of the differential equation = 𝒇 (𝒙, 𝒚).
𝒅𝒙
Example: