You are on page 1of 26

MA108 ODE: Basic Concepts and Examples

Lecture 1 (D3 & D4)

Prachi Mahajan
IIT Bombay

Prachi Mahajan, IITB MA108: D3 & D4-01


Welcome

Lecture Hours Monday 2:00-3:25 (8A), Thursday 2:00-3:25 (8B)


Discussion Hour D3 Tuesday 11:35-12:30 (3B),
Discussion Hour D4 Monday 11:35-12:30 (4A),
Tutorial Hour Wednesday 3:00-4:00 (X2),
Course website http://moodle.iitb.ac.in

1 Please use the news forum on moodle to ask questions.


2 The meeting link remains the same for all the lectures and
discussion sessions throughout this course.
3 Attendance in the lectures and tutorials is strongly
encouraged.

Prachi Mahajan, IITB MA108: D3 & D4-01


Academic Honesty
Any form of academic dishonesty, including, but not limited to
cheating, will not be tolerated, and will invite the harshest possible
penalties as per institute norms.

Prachi Mahajan, IITB MA108: D3 & D4-01


Basic Concepts

Let y (x) denote a function in the variable x. An ordinary


differential equation is an equation containing one or more
derivatives of an unknown function y . Note that the equation may
contain y itself, and known functions of x (including constants).
In other words, an ODE is a relation between the derivatives
y , y 1 , . . . , y (n) and functions of x:

F (x, y , y 1 , . . . , y (n) ) = 0.

DE’s occur naturally in physics, engineering and so on. Can you


give some obvious examples? Velocity and acceleration being
derivatives, often give rise to DE’s.

Prachi Mahajan, IITB MA108: D3 & D4-01


Basic Concepts

Definition
The order of an ODE is n if the nth derivative of the unknown
function y is the highest derivative of y in the equation.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples

Example 1: A falling object.


A body of mass m falls under the force of gravity. The drag force
due to air resistance is c · v 2 where v is the velocity and c is a
constant. Then
dv
m = mg − c · v 2 .
dt
An ODE of first order.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples

Example 2: Radioactive decay.


A radioactive substance decomposes at a rate proportional to the
amount present. Let y (t) be the amount present at time t. Then

dy
=k ·y
dt
where k is a physical constant whose value is found by experiments
(−k is called the decay constant). ODE of first order.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples
Example 3: Electrical circuits.
Consider a basic RLC circuit:
resistance of the resistor - R ohms,
inductance of the inductor - L henrys,
capacitance of the capacitor - C farads.
These are wired and connected to an electromotive force V (t)
volts.
Let Q(t) (coulombs) be the total charge in the
capacitor at time t.
dQ By
I (t) = = current.
dt

dI Q(t)
Kirchhoff’s voltage law, L dt + RI + C = V (t), i.e.,
d 2Q dQ 1
L 2
+R + · Q = V (t).
dt dt C
ODE of second order.
Prachi Mahajan, IITB MA108: D3 & D4-01
Linear equations

Definition (Linear ODE)


The ODE F (x, y , y 0 , . . . , y (n) ) = 0 is called linear if F is a linear
function of the variables y , y 0 , . . . , y (n) . A linear ODE of order n is
of the form

a0 (x)y (n) + a1 (x)y (n−1) + . . . + an (x)y = b(x)

where a0 , a1 , . . . , an , b are functions of x and a0 (x) 6= 0.

Check list : If the dependent variable is y , no products of y


and/or its derivatives are there.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples Revisited

Example 1: A falling object.


A body of mass m falls under the force of gravity. The drag force
due to air resistance is c · v 2 where v is the velocity and c is a
constant. Then
dv
m = mg − c · v 2 .
dt
An ODE of first order. Linear or non-linear? (NL)

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples Revisited

Example 2: Radioactive decay.


A radioactive substance decomposes at a rate proportional to the
amount present. Let y (t) be the amount present at time t. Then

dy
=k ·y
dt
where k is a physical constant whose value is found by experiments
(−k is called the decay constant). ODE of first order. Linear.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples Revisited
Example 3: Electrical circuits.
Consider a basic RLC circuit:
resistance of the resistor - R ohms,
inductance of the inductor - L henrys,
capacitance of the capacitor - C farads.
These are wired and connected to an electromotive force V (t)
volts.
Let Q(t) (coulombs) be the total charge in the
capacitor at time t.
dQ By
I (t) = = current.
dt

dI Q(t)
Kirchhoff’s voltage law, L dt + RI + C = V (t), i.e.,
d 2Q dQ 1
L 2
+R + · Q = V (t).
dt dt C
ODE of second order. Linear or non-linear? (L)
Prachi Mahajan, IITB MA108: D3 & D4-01
Examples

Example 4: The motion of an oscillating pendulum.


Consider an oscillating pendulum of length L. Let θ be the angle it
makes with the vertical direction.

Then:
d 2θ g
+ sin θ = 0.
dt 2 L
(Recall: torque = m.i × a.a = - force × length.)

ODE of second order. Non-linear.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples

Example 5: Given an amount of a radioactive substance, say 1 gm,


find the amount present at any later time.
The relevant ODE is
dy
= k · y.
dt
Initial amount given is 1 gm at time t = 0. i.e.,

y (0) = 1.

By inspection, y = ce kt , for an arbitrary constant c, is a solution


of the above ODE. The initial condition determines c = 1. Hence

y = e kt

is a particular solution to the above ODE with the given initial


condition.

Prachi Mahajan, IITB MA108: D3 & D4-01


Examples
Example 6: Find the curve through the point (1, 1) in the xy -plane
having at each of its points, the slope − yx .
The relevant ODE is
y
y1 = − .
x
By inspection,
c
y=
x
is its general solution for an arbitrary constant c; i.e., a family of
hyperbolas.
The initial condition given is

y (1) = 1,

which implies c = 1. Hence the particular solution for the above


problem is
1
y= .
x

Prachi Mahajan, IITB MA108: D3 & D4-01


Geometric Meaning of Solutions of y 1 = f (x, y )
Consider the first order ODE
dy
= f (x, y ).
dx
Suppose that f (x, y ) is defined in a region D ⊆ R2 . If y = φ(x) is
a solution curve and (x0 , y0 ) is a point on it, then the slope at
(x0 , y0 ) is f (x0 , y0 ).
At each point (a, b) ∈ D, assign a unit vector with slope f (a, b).
The vector field H : D → R2 given by

H(a, b) = (1, f (a, b))

is called the direction field. A drawing of the vector field H at a


large number of points of D gives us approximate solution curves.

Along the curves f (x, y ) = c, where c is a constant, the slopes are


constant. These curves are called isoclines.
Prachi Mahajan, IITB MA108: D3 & D4-01
Geometric Meaning of Solutions of y 1 = f (x, y )

Example 7: Consider the first order linear ODE

y 1 = xy .

The isoclines are the hyperbolas xy = k, k 6= 0, and the


coordinate axes.
The direction fields are given by

H(x, y ) = (1, xy ).

Check that the solutions for the above ODE are


2 /2
y = c · ex ,

where c is a constant.

Prachi Mahajan, IITB MA108: D3 & D4-01


Isoclines & Direction Fields

Isoclines are in blue, direction fields are in black, and solution


curves are in red. Note that solution curves are approximated by
direction fields.
Prachi Mahajan, IITB MA108: D3 & D4-01
Solving first order ODE’s

Let’s now start building up a systematic way of attacking ODE’s.


As we remarked at the very start, there is no general method to
solve an arbitrary first order ODE:

y 1 = f (x, y ).

We consider special forms of the above ODE to find solutions.

Prachi Mahajan, IITB MA108: D3 & D4-01


Separable ODE’s
Definition (Separable ODE)
An ODE of the form
M(x) + N(y )y 1 = 0 (1)
is called a separable ODE.

Let’s first assume that y is a solution. Let M̃ and Ñ be


antiderivatives of M and N, i.e.,
M̃ 0 (x) = M(x) and Ñ 0 (y ) = N(y ) (2)
Then, from the chain rule
d
Ñ (y (x)) = Ñ 0 (y (x)) y 0 (x) = N (y ) y 0 (x)
dx
Then, (1) is equivalent to
d d
Ñ (y (x)) = − M̃(x)
dx dx
Integrating both sides with respect to x gives
Ñ(y ) + M̃(x) = c, (3)
where c is a constant.
Prachi Mahajan, IITB MA108: D3 & D4-01
Separable ODE’s

Example: Solve the differential equation:

y 1 = −2xy .

Separating the variables, we get:


dy
= −2xdx.
y
Integrating both sides, we get:

ln |y | = −x 2 + c1 .

Thus, the solutions are


2
y = ce −x .
How do they look?

Prachi Mahajan, IITB MA108: D3 & D4-01


Separable ODE’s

The solutions are


2
y = ce −x .
If we are given an initial condition

y (x0 ) = y0 ,

then we get:
2
c = y0 e x0
and
2 2
y = y0 e x0 −x .

Prachi Mahajan, IITB MA108: D3 & D4-01


Separable ODE’s
Example: Find the solution to the initial value problem:
dy y cos x
= ; y (0) = 1.
dx 1 + 2y 2
Assume y 6= 0. Then,

1 + 2y 2
dy = cos x dx.
y
Integrating,
ln |y | + y 2 = sin x + c.
As y (0) = 1, we get c = 1. Hence a particular solution to the IVP
is
ln |y | + y 2 = sin x + 1.
Note: y ≡ 0 is a solution to the DE but it is not a solution to the
given IVP.
Prachi Mahajan, IITB MA108: D3 & D4-01

You might also like