0% found this document useful (0 votes)
6 views

de Introduction and Week 1 Lecture

Uploaded by

anasbro009
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

de Introduction and Week 1 Lecture

Uploaded by

anasbro009
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Differential Equations Lectures | Dr. M.

Rayees Ahmad
------------------------------------------------------------------------
Differential Equations Lecture Notes
Recall: (Notations of Derivative)

Order\Notation Leibniz Prime Dot


Notation Notation Notation
Function 𝒚 = 𝒇(𝒙)
1st Derivative 𝒅𝒚 𝒚′ = 𝒇′ (𝒙) 𝒚̇ = 𝒇̇(𝒙)
𝒅𝒙
2nd derivative 𝒅𝟐 𝒚 𝒚′′ = 𝒇′′ (𝒙) 𝒚̈ = 𝒇̈(𝒙)
𝒅𝒙𝟐
3rd Derivative 𝒅𝟑 𝒚 𝒚′′′ = 𝒇′′′ (𝒙) ⃛=⃛
𝒚 𝒇(𝒙)
𝒅𝒙𝟑
4th Derivative 𝒅𝟒 𝒚 𝒚(𝟒) = 𝒇(𝟒) (𝒙) ⋮
𝒅𝒙𝟒
⋮ ⋮ ⋮ ⋮
Higher Order 𝒅𝒏 𝒚 𝒚(𝒏) = 𝒇(𝒏) (𝒙) ⋮
Derivative 𝒅𝒙𝒏
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Definition: Differential Equation (DE)
An equation containing the derivatives of one or more dependent
variables, with respect to one or more independent variables, is said to
be a differential equation (DE).

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 𝜕𝑡

Why Differential Equations Are Important?


• Physical phenomena are often continuous processes, and
differential equations naturally express the continuous change
in quantities (such as position, velocity, temperature, or electric
field) over time or space.
• They provide a systematic way to model complex interactions,
predict future behaviour, and understand how different physical
systems evolve.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Applications of Differential equations:
Differential equations are powerful tools used to model various
natural and artificial phenomena where continuous change over
time or space is involved. Many types of phenomena can be
represented using differential equations, including those involving
motion, growth, decay, heat, and waves, etc.

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

All these scenarios can be represented mathematically in the form of


Differential equations. But we will start our mathematical modelling with very
simple scenarios, like population model, radioactive decay model, Newton’s
law of cooling/warming model.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Population Growth Model:
We are studying a population of bacteria undergoing binary fission.
Specifically, the population doubles every three hours.

1. How many bacteria will be present after 𝟓𝟏 hours if a culture is


inoculated with 𝟏 bacterium?
2. With how many bacteria should a culture be inoculated to have
𝟖𝟏, 𝟗𝟐𝟎 bacteria present after 𝟒𝟐 hours?
3. How long will it take for an initial population of 𝟔 bacteria to reach a
size of 𝟏𝟐, 𝟐𝟖𝟖?
How to Model it
Let 𝑷 represents the population of bacteria at any time 𝑡. Since,
𝒅𝑷
∝𝑷
𝒅𝒕
This implies that
𝒅𝑷
=𝒌𝑷
𝒅𝒕
where 𝒌 is constant of proportionality having initial condition 𝑷(𝟎) = 𝑷𝟎 .
After solving this mathematical model, we can answer all three questions
raised by the researchers/biologists about this bacterial population.
Differential Equations Lectures | Dr. M. Rayees Ahmad
------------------------------------------------------------------------
Also, we can have model of human population of a town or country to
estimate population after few years. Since this model is a differential
equation, so we have to learn the method to solve this particular types of
differential equation. That’s why we will learn types of DE first and some
methods to solve them accordingly.

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, 𝒌 >
𝟎.

The model for decay also occurs in biological applications such as


determining the half-life of a drug in a body, the time that it takes for 𝟓𝟎%
of a drug to be eliminated from a body by excretion or metabolism.

Let’s have a particular case of radioactive decay, the carbon dating. It is


so important that the person who used it first was awarded the Nobel prize
for chemistry in 𝟏𝟗𝟔𝟎.

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:

Let 𝑨 be the amount of 𝑪 − 𝟏𝟒 remaining at any time 𝒕.

Since, rate of decay is proportional to the amount of substance at time 𝒕

𝒅𝑨
∝𝑨
𝒅𝒕
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℃.

Furthermore, we know the temperature of a healthy person to be


around 37 ℃ (ignoring variation among people). Lastly, the room,
where the body has been found is kept at a constant temperature of
20℃.
Find the hour of the crime with the given information.
According to Newton’s empirical law of cooling/warming, the rate at which
the temperature of a body changes is proportional to the difference between
the temperature of the body and the temperatureof the surrounding medium,
the so-called ambient temperature.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Newton’s law of cooling/warming translates into the mathematical statement:
𝒅𝑻
∝ (𝑻 − 𝑻𝒎 )
𝒅𝒕
𝒅𝑻
= 𝒌 (𝑻 − 𝑻𝒎 )
𝒅𝒕
where,
𝑇 = Temperature of the body

𝑇𝑚 = 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)

Ordinary Differential Equation (ODE)


An equation containing the ordinary derivatives of one or more
dependent variables, with respect to a single (one) independent variables,
is called ordinary differential equation (ODE).
For example,
𝒅𝒚 𝒙
1) + 𝟓𝒚 = 𝒆
𝒅𝒙
𝒅𝒙 𝒅𝒚
2) + 𝒅𝒕 = 𝟐𝒙 + 𝒚
𝒅𝒕

Partial Differential Equation (PDE)


An equation containing the partial derivatives of one or more dependent
variables, with respect to two or more independent variables, is called partial
differential equation (PDE).
For example,
𝝏𝟐 𝒖 𝝏𝟐 𝒖 𝝏𝒖
1) + =𝟐
𝝏𝒙𝟐 𝝏𝒕𝟐 𝝏𝒕
𝝏𝒖 𝝏𝒗
2) =−
𝝏𝒚 𝝏𝒙
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Classification of Differential Equation by

Order and Degree


Order of Differential Equation:

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:

The degree of a differential equation is the power of the highest


order derivative term in a differential equation such that it is a
polynomial equation in its derivatives 𝒚′ , 𝒚′′ , … , 𝒚(𝒏) .

Special Case: Degree not Defined


• Most of the time we can arrange the given differential equation
in the form of polynomial where exponent is the order of
differentiation.
• But for some differential equation this cannot be done. Those
differential equations degree is not defined.
In other words, degree of a differential equation can only be defined
if and only if the polynomial function of derivatives can be generated
from the differential equation.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
For example,
𝒅𝟐 𝒚 𝒅𝒚
𝐬𝐢𝐧 ( 𝟐 ) + =𝟎
𝒅𝒙 𝒅𝒙
is not a polynomial equation in derivatives because of the sine
function. Therefore, its degree is not defined.
Some other examples of differential equation, where degree is
not defined are
𝟐 𝟐
𝒅𝟐 𝒚 𝒅𝒚 𝟑 𝒅𝟐 𝒚
• ( 𝟐 ) . 𝟑 ( ) = 𝒙 𝐥𝐨𝐠 ( 𝟐 )
𝒅𝒙 𝒅𝒙 𝒅𝒙

𝒅𝒚
• 𝒙 = 𝐬𝐢𝐧 (𝒅𝒙 − 𝒚 𝒄𝒐𝒔(𝒙))
𝒅𝒚
• 𝒙 − 𝒚 𝐬𝐢𝐧(𝒙) = 𝐥𝐨𝐠 ( )
𝒅𝒙

Note:

• The degree of the differential equation is always a positive


integer.
• The order of the differential equation is to be identified first, and
then the degree of the differential equation can be identified.
• The degree of the differential equation is comparable to the
degree of the variable in a polynomial expression.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Comparison of Order and Degree of Differential
Equation
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Classification of Ordinary Differential equations by
Linearity
Linear Ordinary Differential Equation:
A DE is said to be linear ODE, if it can be written in the form
𝒅𝒏 𝒚 𝒅𝒏−𝟏 𝒚 𝒅𝒚
𝒂𝒏 (𝒙) 𝒏 + 𝒂𝒏−𝟏 (𝒙) 𝒏−𝟏 + ⋯ + 𝒂𝟏 (𝒙) + 𝒂𝟎 (𝒙) 𝒚 = 𝒈(𝒙)
𝒅𝒙 𝒅𝒙 𝒅𝒙
or
𝒂𝒏 (𝒙)𝒚(𝒏) + 𝒂𝒏−𝟏 (𝒙)𝒚(𝒏−𝟏) + ⋯ + 𝒂𝟏 (𝒙)𝒚′ + 𝒂𝟎 (𝒙) 𝒚 = 𝒈(𝒙)
This is characterized by the following properties:
• The dependent variable 𝒚 and all its derivatives 𝒚′ , 𝒚′′ , … , 𝒚(𝒏) are of
the first degree. (i.e., Power of each term involving 𝒚 should be 𝟏).
• Each coefficient 𝒂𝒏 (𝒙), 𝒂𝒏−𝟏 (𝒙), … , 𝒂𝟏 (𝒙), 𝒂𝟎 (𝒙) of 𝒚′ , 𝒚′′ , … , 𝒚(𝒏)
depends on only the independent variable 𝒙.
• No Transcendental function (Trigonometric functions, exponential
functions, logarithmic functions) of dependent variable 𝒚 and/or its
derivative occur.

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

Non-Linear Ordinary Differential Equation:

A DE is said to be non-linear ODE, if it does not satisfy any of the


above 3 properties of linear differential equation.

In other words, a non-linear ordinary differential equation is simply one that


is not linear.

Examples:

𝒚′ = 𝒆𝒙 𝒔𝒆𝒄(𝒚)

1st order, non-linear ODE


Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Comparison of Linear and non-linear ODE:

Comparison of Linear and non-linear PDE:


Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Practice Problems for Students:
For the equations below:
• (𝟏 − 𝒙)𝒚′′ − 𝟒𝒙𝒚′ + 𝟓𝒚 = 𝐜𝐨𝐬 (𝒙)

• 𝒕𝟓 𝒚(𝟒) − 𝒕𝟑 𝒚′′ + 𝟔𝒚 = 𝟎
• 𝐬𝐢𝐧(𝜽) 𝒚′′′ − 𝐜𝐨𝐬(𝜽) 𝒚′ = 𝟐
• 𝒙̈ − 𝒙̇ + 𝒕 = 𝟎
𝒅𝟑 𝒚 𝒅𝒚 𝟒
• 𝒙 −( ) +𝒚=𝟎
𝒅𝒙𝟑 𝒅𝒙

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?

Work to do: Book DG Zill, 9th Edition

Complete the questions 1-10 of Exercise 1.1.


Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Existence of Solution:

Any function 𝒚, defined on an interval 𝐼 and possessing at least 𝑛 derivatives


that are continuous on 𝑰, which when substituted into an 𝑛𝑡ℎ-order ordinary
differential equation reduces the equation to an identity, is said to be a
solution of the equation on the interval.

Example # 1: Verification of a solution:


Verify that the indicated function is a solution of the given differential equation
on the interval (−∞, ∞).
𝟏
𝒅𝒚 𝒙𝟒
a) =𝒙𝒚 , 𝟐 𝒚=
𝒅𝒙 𝟏𝟔

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.

• Not every differential equation that we write, has a solution. For


𝒅𝒚 𝟐
example, ( ) + 𝟏 = 𝟎.
𝒅𝒙

INITIAL VALUE PROBLEMS (IVPs)


We are often interested in problems in which we seek a solution 𝒚(𝒙) of a
differential equation so that 𝒚(𝒙) satisfies prescribed side conditions, that is,
conditions imposed on the unknown 𝒚(𝒙) or its derivatives. On some interval
𝑰 containing 𝒙𝟎 the problem

𝒅𝒏 𝒚
𝑺𝒐𝒍𝒗𝒆: = 𝒇(𝒙, 𝒚, 𝒚′ 𝒚′′ , … , 𝒚(𝒏−𝟏) )
𝒅𝒙𝒏
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐: 𝒚(𝒙𝟎 ) = 𝒚𝟎 , 𝒚′ (𝒙𝟎 ) = 𝒚𝟏 , . . . ., 𝒚(𝒏−𝟏) (𝒙𝟎 ) = 𝒚𝒏−𝟏

where 𝒚𝟎 , 𝒚𝟏 , . . . , 𝒚𝒏−𝟏 are arbitrarily specified real constants, is called an initial-value


problem (IVP). The values of 𝒚(𝒙) and its first 𝒏 − 𝟏 derivatives at a single point
𝒚(𝒙𝟎 ) = 𝒚𝟎 , 𝒚′ (𝒙𝟎 ) = 𝒚𝟏 , . . . ., 𝒚(𝒏−𝟏) (𝒙𝟎 ) = 𝒚𝒏−𝟏 are called initial conditions.

Note:

• Initial conditions are such conditions which relate to one value of the
independent variable.

Example:

𝒚′′ + 𝒚 = 𝟎 ; 𝒚(𝟎) = 𝟏 , 𝒚′ (𝟎) = 𝟏


Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Boundary Value Problems:
• These conditions are specified at the extremes of the independent
variables in the equation.

• The conditions which relate to two different values of the independent variable.

Example:

𝒚′′ + 𝒚 = 𝟎 ; 𝒚(𝟎) = 𝟏 , 𝒚′ (𝟐) = 𝟏

Geometrical Interpretation of IVPs


If 𝒚′ = 𝒇(𝒙, 𝒚) is an ODE subject to the initial condition 𝒚(𝒙𝟎 ) = 𝒚𝟎 , we are
seeking a solution 𝒚(𝒙) of the differential equation 𝒚′ = 𝒇(𝒙, 𝒚) on an interval
𝑰 containing 𝒙𝟎 so that its graph passes through the specified point (𝒙𝟎 , 𝒚𝟎 ). A
solution curve is shown in blue in Figure 𝟏.

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) 𝒙 (𝟐 ) = 𝟎, 𝒙′ ( ) = 𝟏
𝟐

2) Verify that the indicated function is a solution of the given ODEs:


a) 𝒚′′ + 𝒚 = 𝐭𝐚𝐧(𝒙); 𝒚 = −( 𝐜𝐨𝐬(𝒙) ) 𝐥𝐧(𝐬𝐞𝐜(𝒙) + 𝐭𝐚𝐧(𝒙) )
b) 𝒚′′ − 𝟔𝒚′ + 𝟏𝟑𝒚 = 𝟎; 𝒚 = 𝒆𝟑𝒙 𝐜𝐨𝐬(𝟐𝒙)
3) Find values of 𝒎 so that 𝒚 = 𝒆𝒎𝒙 is a solution of the given ODEs:
a) 𝒚′ + 𝟐𝒚 = 𝟎
b) 𝟐𝒚′′ + 𝟕𝒚′ − 𝟒𝒚 = 𝟎

Work to do: (For Students)


Book: DG Zill 9th Edition
Do questions 1, 3, 6, 9, 35-38
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Direction Fields (Slope Fields):

Imagine we have a first-order differential equation:

𝒅𝒚
= 𝒇 (𝒙, 𝒚)
𝒅𝒙
• Suppose we cannot solve this equation analytically, nor can we find a
method to do so.

• Despite this, the situation isn’t as difficult as it might seem. Even


without an explicit solution, the differential equation can give us
insights into the behaviour of its solutions.

• We can begin studying first-order differential equations by


analyzing them qualitatively, which helps us understand the shape
and direction of the solution curves without actually solving the
equation.

• One useful technique for this qualitative analysis is the direction field,
also known as a slope field.

A direction field is a visual tool that allows us to graphically represent


the behaviour of solutions to a first-order differential equation.

It provides a qualitative picture of the solution curves by showing the slope


of the tangent to the solution at various points in the plane. This method
helps us understand what a solution curve would look like, even if we
cannot find its explicit form.

Constructing the Direction Field


𝒅𝒚
To create a direction field for the equation = 𝒇 (𝒙, 𝒚) , we follow these
𝒅𝒙
steps:

1. Choose points: Select a grid of points in the 𝒙𝒚-plane.

𝒅𝒚
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.

Interpreting the Direction Field


The resulting picture is a field of slopes, showing how the solution curves
flow through the plane. By following the direction of these short line
segments, we can trace out approximate solution curves, starting from
any initial condition. Each solution curve is tangent to the slope field at
every point, giving us a visual sense of how the system evolves.

Why is the Direction Field Useful?


• It allows us to visualize how solutions behave for different initial
conditions.

• We can detect features like equilibrium points, where the slope is


zero and the solution remains constant.

• It helps us understand the overall dynamics of the system, such as


whether solutions increase, decrease, or oscillate, even when an
analytical solution is not available.

General Applications of Direction Fields:

• Direction fields are particularly useful for visualizing qualitative


behaviour of solutions, such as equilibrium points, stability, and
general trends.

• They are used in fields like physics, engineering, and biology,


where differential equations model phenomena like population
growth, heat flow, and electrical circuits.

Applications of Direction Fields in Computer Sciences:


1. Dynamical Systems and Simulations

• In computer science, dynamical systems are often modelled using


differential equations. Direction fields help visualize and analyze these
systems, particularly in simulations related to:
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
o Physics engines: Used in game development and animation,
where objects follow laws of motion (modelled by differential
equations).

o Robotics: Modelling the behaviour of robotic systems, where


trajectory planning or motion paths are governed by differential
equations.

o Fluid dynamics: Simulating the behaviour of fluids (used in


computer graphics for visual effects).

2. Machine Learning and Neural Networks

• Differential equations play an important role in some areas of


machine learning, especially in advanced models like Neural
Ordinary Differential Equations (Neural ODEs).

• Neural ODEs use continuous-time models for certain neural


networks, where direction fields help visualize and understand the
evolution of these systems over time.

• Trajectory analysis in these networks can benefit from direction


fields, which offer a graphical way to see how a neural network model
progresses through its training dynamics.

3. Control Systems and Autonomous Systems

• In control theory, widely used in computer science and robotics,


differential equations describe how systems evolve over time.
Direction fields can help in analyzing and visualizing the behaviour of
these systems:

o Autonomous vehicles: Modelling the paths or trajectories of


autonomous cars, drones, or robots based on control inputs.

o Feedback control systems: Visualizing how the system


responds to changes and external inputs in real-time.

4. Data Science and Time Series Analysis

• Direction fields can be used to understand the evolution of time-series


Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
data or systems where changes occur over time (e.g., forecasting,
epidemiological models, financial systems).

• Modelling continuous change in systems like stock prices,


population dynamics, or disease spread (e.g., using differential
equations) can benefit from the visualization provided by direction
fields.

5. Complex Networks and Graph Theory

• 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.

• For example, in network optimization or flow systems, differential


equations describe how data or information flows, and direction
fields help in visualizing these flow patterns.

Example 1:

Consider the differential equation

𝒅𝒚
= 𝒇(𝒙, 𝒚) = 𝟎. 𝟐 𝒙 𝒚
𝒅𝒙
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
------------------------------------------------------------------------------------------

As shown in above figure, if a solution curve also passes through


the point (𝟐, 𝟑), it does so tangent to this line segment.

In other words, the lineal element is a miniature tangent line at that


point.

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 = 𝒇 (𝒙, 𝒚).
𝒅𝒙

• Visually, the direction field suggests the appearance or


shape of a family of solution curves of the differential
equation.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
𝒅𝒚
Example: The direction field for the DE = 𝟎. 𝟐 𝒙 𝒚 shown in
𝒅𝒙
figure below

was obtained by using computer software.

Example:

A single solution curve that passes through a direction field


must follow the flow pattern of the field; it is tangent to a line
element when it intersects a point in the grid.

The figure below shows a computer-generated direction field of the


differential equation
𝒅𝒚
= 𝒔𝒊𝒏(𝒙 + 𝒚)
𝒅𝒙
over a region of the 𝒙𝒚-plane.
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Differential Equations Lectures | Prepared By: Dr. M. Rayees Ahmad
------------------------------------------------------------------------------------------
Separable Variable Method

• The separable variable method is a technique used to solve


first-order ordinary differential equations where the
equation can be written in a form that allows the variables
to be separated.
• This method involves rearranging the differential equation
so that all terms involving the dependent variable are on
one side and all terms involving the independent variable
are on the other side.
• After separating the variables, you can integrate both sides
to find the solution.
Definition:
A first-order ordinary differential equation of the form
𝒅𝒚
= 𝒈(𝒙) . 𝒉(𝒚)
𝒅𝒙
is said to be separable or to have separable variables.
Examples:

Equation Type Explanation


𝒅𝒚 Separable In the first equation we can factor
= 𝒚𝟐 𝒙 𝒆𝟑𝒙+𝟒𝒚 Equation 𝑓(𝑥, 𝑦) = 𝒚𝟐 𝒙 𝒆𝟑𝒙+𝟒𝒚
𝒅𝒙
as
𝑓(𝑥, 𝑦) = (𝒙 𝒆𝟑𝒙 )(𝒚𝟐 𝒆𝟒𝒚 )
i.e., 𝒇(𝒙, 𝒚) = 𝒈(𝒙)𝒉(𝒚)
𝒅𝒚 Non- There is no way of expressing 𝒚 +
= 𝒚 + 𝐬𝐢𝐧(𝒙) Separable 𝐬𝐢𝐧(𝒙) as a product of a
𝒅𝒙
Equation function of 𝒙 times a function of 𝒚.

Example 1: Solving a Separable DE

You might also like