lec07

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

29

Lecture 7 – Differential Equations: Review

7.1 What is a Differential Equations

Definition: Differential Equations

A differential equation is an equation that relates a depen-


dent variable to one or more independent variables by means
of its differential coefficients with respect to the independent
variable(s).

7.2 Classification: ODE

Consider the following equation:


 3 2
d y d2 y dy dy
3
− 2 + 5 + 2x3 + 4y = e x cos x (23)
dx dx dx dx
There is one dependent variable (y) and one independent variable
(t) in this equation. Therefore, we refer to it as an ordinary differential
equation (ODE).

7.3 Classification: PDE

On the other hand, the equation:


 2
∂2 T ∂2 T

∂T ∂ T
ρC p =k + 2 + 2 (24)
∂t ∂x2 ∂y ∂z
has one dependent variable (T) and four independent variables (t,
x, y, and z). We refer to this equation as a partial differential equation
(PDE).

7.4 DE Order

Definition: Order

The order of a differential equation is the highest derivative


present in it.

7.5 Classification: Order

• For example, Equation (23) is a 3rd-order equation because of the


first term.

• Equation (24), on the other hand, is a 2nd-order equation because


of the derivatives of T with respect to x, y, and z are all second
order.

ChE 551: Process Control Dr. Yazan Hussain


30

7.6 Classification: Linearity

Definition: Linearity

A linear equation is one that has all its dependent variable


terms in linear form.

8 8
A dependent variable terms is any
term in which the dependent variable
• Equation (23) is considered non-linear because of the term appear either by itself or as a differen-
2 tial
d3 y/dx3 .

• Equation (24) is linear since all terms in which the dependent


variable (T) appears are linear.

• Notice that the independent variable is not considered with this


classification.

• For example, in Equation (23) the terms x3 and e x cos x are non-
linear, but they are do not make the differential equation non-linear.

7.7 Classification: Homogeneity

Definition: Homogeneity

A non-homogeneous equation is one in which an indepen-


dent variable (or a constant) appears on its own, without the
dependent variable.

• Equation (23) is non-homogeneous because of the terms 2x3 and


e x cos x.

• Equation (24) is homogeneous because all its terms contain the


dependent variable (T).

Exercise | DE Classification

Classify the following equations:


Equation Order Linear Homogenous
dy
+ y2 = sin x
dx
2
d2 y

dy
+ +y = 0
dt2 dt
 
∂ ∂C ∂C
r − kC =
∂r ∂r ∂t

7.8 Solution Techniques for ODE’s

• dy/dt, y0 , ẏ

ChE 551: Process Control Dr. Yazan Hussain


31

• Typically encountered when dealing with variations in one vari-


able with time, for example, change in temperature with time.
• Also appear when dealing with systems where simple transport
processes occur.
• 1st order equations, in general, can be solved analytically through
simple manipulations.
• The solution depends strongly on investigating the form of the
equation.

7.9 Separable Equations


dy can be written as
= f (t, y) −−−−−−−−−→ g(y)dy = h(t)dt (25)
dt
Example | Separable ODE

Show that the following first order ODE is separable and


solve.

y0 = t2 y2 − 2y2 + t2 − 2

Rearranging the RHS (right hand side):

y 0 = y2 ( t2 − 2) + ( t2 − 2)

y 0 = ( t2 − 2) + ( y2 + 1)
dy
= (t2 − 2)dx
y2 +1
Then:
dy
Z Z
= (t2 − 2)dt
y2 + 1

From integrating tables we find that the first integral is given


by the tan inverse of y. Then:

x3
tan−1 (y) = − 2t + C
3
or:

t3
 
y = tan − 2x + C
3

where C is an integration constant.

Example | Integration Constant

Consider the ODE:


dy
= ( t − 4)2
dt
The function to the right hand side ( f (t) = (t − 4)2 ), repre-

ChE 551: Process Control Dr. Yazan Hussain


32

sents the slope of the solution (y(t)) at any point (t, y).
The value of the slope depends strongly on where we are in
the Cartesian coordinates, as shown in the following figure.

40

30
dy/dt

20

10

0
0 2 4 6 8 10
t

For example, if we are at point (0, 10), the slope of y(t) will
be 16. At (2, 0), the slope will be 0, and at (10, 0) will be 36.
Based on the above observation, we note that the function
y(t) obtained from solving the ODE will show different be-
haviors depending on what point we start.
To see this, let us solve the ODE first. The solution can be
easily obtained by separation of variables as:

( t − 4)3
y= +C
3
Now, if we know that the function will pass through the point
(0, 0) we must have:

(−4)3
y (0) = 0 = + C → C = 21.3
3
Then, the solution will be:

( t − 4)3
y= + 21.3
3
If, on the other hand, the function passes through the point
(1, 0) we get:

( t − 4)3
y= −9
3
These two functions are shown in the next figure below. The
two solutions look similar but their absolute values are differ-
ent. This is due to the fact that the ODE is linear, that is, all y
terms appear raised to the first power. If the equation is not
linear, the solution will be affected by the given condition.

ChE 551: Process Control Dr. Yazan Hussain


33

100

80

60
y

40

20

0
0 2 4 6 8 10
t

The observed behavior in the example above is a character-


istic of the linear ODE’s. In such equations the integration
constant will shift the solution (y-axis shift) but will not
affect its form.

Example | Non-Linear Equation

Plot the solution for the ODE:


dy
= ty2
dt
for the boundary conditions: (i) (0, 0.1), and (ii) (0, −0.1).
The solution to the given equation is:

1
y=− (Prove!)
t2 /2 + C
For the first boundary condition we get C = −10 and for the
second we get C = 10. The two plot in the range t ∈ [2, 10]
is shown in the figure below. Notice that for the second case

there is a singularity at t = 20, whereas for the first case the
function is continuous over the entire range.

ChE 551: Process Control Dr. Yazan Hussain


34

0.1

5 C = −10 C = 10
5 · 10−2

0
0
y

−5 · 10−2

−0.1
−5

−0.15
2 4 6 8 10 −10 −5 0 5 10
t t

The observed behavior in the example above is due a char-


acteristic of the non-linear ODE’s. In such equations the
integration constant will not only shift the solution but will
affect its form.

7.10 Second-Order ODE’s

• d2 y/dt2 , y00 , ÿ

• Typically encountered when dealing with variations in one vari-


able with time, for example, change in temperature with time.

• Can also result from system of coupled equations (multiple first-


order equations).

• General formula:

d2 y dy
+ P + Qy = R (26)
dt2 dt
where P, Q, and R are f (t) (including constants).

• This is a linear, non-homogeneous ODE.

• The solution has two parts, particular (y p ) and complementary


(yc ):

y = yc + y p (27)

7.11 Constant Coefficients

• If P, Q, and R in Eq. (26) are constants and do not depend on t,


we can formulate a general form for yc .

• The solution is based on assuming the y will be of the form y =


Cm emt , where Cm and m are constants.

ChE 551: Process Control Dr. Yazan Hussain


35

• This is a quadratic equation that has two roots which can be


found using the quadratic formula:
p
Q Q2 − 4PR
m1,2 = − ± (28)
2P 2P

• Depending on the value of square root term (Q2 − 4PR), three


cases exist:

1. Q2 − 4PR > 0 which results in two, real, distinct roots. The


solution in this case is given by:

y = C1 em1 x + C2 em2 x (29)

2. Q2 − 4PR = 0 which results in a repeated root. The solution in


this case is given by:

y = (C1 + C2 x )emx (30)

3. Q2 − 4PR < 0 which results in two complex roots (α ± βi). The


solution is this case is given by:

y = (C1 sin βx + C2 cos βx )eαx (31)

Example | Linear 2nd-Order ODE

Solve the following equations:

d2 y dy
a) − 5 + 6y = 0
dt2 dt
The characteristic equation for this ODE is:

m2 − 5m + 6 = 0 → m1 = 2 and m2 = 3

which is the first case. Then, the solution will be:

y = C1 e2t + C2 e3t

d2 y dy
b) 2
+ 6 + 9y = 0
dt dt
The characteristic equation for this ODE is:

m2 + 6m + 9 = 0 → m1 = m2 = −3

which is the second case. Then, the solution will be:

y = (C1 + C2 t)e−3t

ChE 551: Process Control Dr. Yazan Hussain


36

d2 y dy
c) − 4 + 5y = 0
dt2 dt
The characteristic equation for this ODE is:

m2 − 4m + 5 = 0 → m1,2 = 2 ± i

which is the third case. Then, the solution will be:

y = (C1 sin t + C2 cos t)e2t

Exercise | Linear 2nd-Order ODE

Solve the following equations:

d2 y dy
a) − 3 + 2y = 0
dt2 dt

d2 y dy
b) 2
+2 +y = 0
dt dt

d2 y dy
c) 2
+ 5 + 6y = 0
dt dt

ChE 551: Process Control Dr. Yazan Hussain


49

References

[1] Google Colab. https://research.google.com/colaboratory/-


faq.html.

[2] Dale E. Seborg, Thomas F. Edgar, Duncan A. Mellichamp, and


Francis J. Doyle III. Process Dynamics and Control. Wiley,
November 2016.

ChE 551: Process Control Dr. Yazan Hussain

You might also like