Title: Agenda for differential equations
1Agenda for differential equations
- 1. Complex numbers
- 2. Differential calculus
- 3. Integral calculus
- 4. Modeling
- 5. Element equations
- 6. System equations
- 7. Differential equations
- 8. Solving differential equations
21. Complex numbers
- Definition
- Arithmetic
- In-phase and quadrature
1. Complex numbers
3Definition
- A complex number, z, consists of the sum of a
real and imaginary number. - The symbols i and j have the value of the square
root of -1 - Example
imaginary axis
abi
b
a 3 b 4 z a bi z 3 4i
r
real axis
?
a
1. Complex numbers
4Arithmetic (1 of 2)
- Addition (abj) (cdj) (ac)(bd)j
- Subtraction (abj) - (cdj) (a-c)(b-d)j
- Multiplication (abj)(cdj) (ac-bd)(cbda)j
- Conjugate conj(abj) a-bj
- Absolute abs(abj) sqrt(a2b2)
- Argument arg(abj) atan2(b,a)
- Division (abj)/(cdj) (abj) conj(cdj)/
- abs(cdj)2
- abj r x ej?
- where r abs(abj ) and ? arg(abj )
1. Complex numbers
5Arithmetic (2 of 2)
Complex arithmetic using Excel
1. Complex numbers
6In-phase and quadrature (IQ)
- In-phase component of signal that is in-phase
with reference - Quadrature component of signal that is 90
degrees out of phase with reference
1. Complex numbers
72. Differential calculus
- Derivative of a function
- Elementary derivative operations
- Examples
- Critical points
- Partial differentiation
2. Differential calculus
8Derivative of a function
?f(x)
Lim f (x)
?x
0
?x
2. Differential calculus
9Elementary derivative operations
- D k 0
- D xn nxn-1
- D ln x 1/x
- D eax a eax
2. Differential calculus
10Examples (1 of 2)
- D k f(x) k D f(x)
- D (f(x) ? g(x)) D f(x) ? D g(x)
- D (f(x) g(x)) f(x) D g(x) g(x) D f(x)
- D (f(x)/g(x)) g(x) D f(x) - f(x) D g(x)/g(x)2
- D f(x)n nf(x)n-1 D f(x)
- D f (g(x)) Dg (f(g)) Dx g(x)
2. Differential calculus
11Examples (2 of 2)
- D sin x cos x
- D cos x -sinx
- D tan x sec2x
- D arcsin x 1/sqrt(1 - x2)
- D arctan x 1/(1 x2)
2. Differential calculus
12Critical points
f (x) 0 at critical point f (x) lt 0 at
maximum point f (x) gt 0 at minimum point f
(x) 0 at inflection point
f (x)
local maximum
inflection point
local minimum
global minimum singular point
x
2. Differential calculus
13Partial differentiation
- A partial derivative is a derivative that is
taken with respect to only one variable - z 4x3 - 5y2 2xy y -12
- ?z/ ?x 12x2 2y
- Partial derivatives are important in finite
element computations
2. Differential calculus
143. Integral calculus
- Integration
- Elementary integration operations
- Examples
- Integration by parts
- Initial values
- Definite integral
3. Integral calculus
15Integration
- Integration is the inverse operation of
differentiation
f (x) dx f (x) C
3. Integral calculus
16Elementary integration operations
k dx k x C xm dx xm1/(m1) C e kx dx
ekx/k C
3. Integral calculus
17Examples
sin x dx -cos x C 1/x dx ln x C ln
x dx x ln x - x C dx/(k2 x2) I/k
arctan(x/k) C
3. Integral calculus
18Integration by parts (1 of 3)
- Integration by parts is an integration technique
that is used when the function can be partitioned
into two parts with favorable properties
f(x) dg(x) f(x)g(x) - g(x) df(x) C
3. Integral calculus
19Integration by parts (2 of 3)
dg(x) ex dx ex g(x)
f(x) x2 2x df(x)
x2 ex dx x2 ex - ex (2x) dx C
3. Integral calculus
20Integration by parts (3 of 3)
dg(x) ex dx ex g(x)
f(x) 2x 2 df(x)
ex (2x) dx 2x ex - ex (2) dx C
2x ex - 2 ex
x2 ex dx x2 ex - 2x ex 2 ex C
3. Integral calculus
21Initial values
- The constant of integration C can be found only
if the value of the function is known at a point - If there are multiple integrations involved, then
multiple initial values are needed - Example, if f(x) 4 when x 1 then
(3x2 - 2x)dx x3- x2 C 13 - 12 C 4 C 4
3. Integral calculus
22Definite integrals
- A definite integral is restricted to the region
bounded by lower and upper limits
x2
f (x) dx f(x2 ) - f(x1)
x1
2
2x dx x2(2) - x2(1) 22 - 12 3
1
3. Integral calculus
234. Modeling
- Approaches to finding a model
- Linear systems
- Nonlinear systems
- Guidelines for equations
4. Modeling
24Approaches to finding a model
- 1. Lumped parameters
- Break system into smaller elements
- For each element, use the physical laws that
govern the element to write equations - Build a model of the system from these lumped
parameters - 2. System identification
- Stimulate the system and observe its response
- Works only with existing systems
4. Modeling
25Linear systems (1 of 3)
- A system is linear if and only if it obeys the
principle of superposition - H(?x1 ? x2) ?H(x1) ?H(x2), where H is the
system response
4. Modeling
26Linear systems (2 of 3)
system response
H
x1
y H(x1 x2)
x2
x
4. Modeling
27Linear systems (3 of 3)
y1 y2
slope K
y2
y1
x2
x1
x1 x2
4. Modeling
28Nonlinear systems (1 of 3)
- Occasionally, application of physical laws to a
system result in nonlinear equations. - The nonlinearity may be overcome by finding a
limited region of operation where linear
operation takes place
4. Modeling
29Nonlinear systems (2 of 3)
slope K
?(y1 y2)
y2
y1
c
x2
x1
x1 x2
4. Modeling
30Nonlinear systems (3 of 3)
y2
?(y1 y2)
y1
c
x2
x1
x1 x2
4. Modeling
31Guidelines for equations (1 of 4)
- 1. Understand the system -- sketch or describe in
qualitative terms - 2. Identify inputs and outputs, including
disturbances - 3. Express system in terms of elements that can
be expressed mathematically - 4. Develop equations for each element
4. Modeling
32Guidelines for equations (2 of 4)
- 5. Determine unknown parameter values by analysis
or experiment - 6. Adjust the model until it produces behavior
like the actual system - 7. Simplify the system if nonlinearities are
involved
4. Modeling
33Guidelines for equations (3 of 4)
- Ideally, the relationship should be linear
- A lumped-parameter model has time as its only
independent variable. This fact allows ordinary
differential equations to be used. If there are
more independent variables, partial differential
equations would need to be used, and they are
more difficult - Use idealized equivalent of the system e.g.
- Mass concentrated at a point rather than
distributed - Inductors have no resistance or capacitance
4. Modeling
34Guidelines for equations (4 of 4)
- The number of variables and the number of
equations needs to be the same. - Units need to be consistent
- Need to validate the model with prototypes or
data from similar systems - In practice, systems are not truly linear.
Variations in the plant or transducers can make
design much harder
4. Modeling
355. Element equations
- Proportional (P) relationship
- Integral (I) relationship
- Derivative (D) relationship
- PID
- Electrical components
- Rectilinear mechanical components
- Rotational mechanical components
- Fluid component
- Thermal components
5. Element equations
36Proportional (P) relationship
v(t)
i(t)
i(t)
a
b
R
i(t) current (A) through variable v(t)
voltage (V) across variable R resistance
(?) i(t) 1/R v(t) through variable constant
across variable
5. Element equations
37Integral (I) relationship
v(t)
i(t)
i(t)
a
b
L
i(t) current (A) through variable v(t)
voltage (V) across variable L inductance
(H) i(t) 1/L v(t) dt through variable
constant ( across variable) dt
5. Element equations
38Derivative (D) relationship
v(t)
i(t)
i(t)
a
b
C
i(t) current (A) through variable v(t)
voltage (V) across variable C capacitance
(F) i(t) C d/dt v(t) through variable
constant d/dt( across variable)
5. Element equations
39PID
- Proportional (P) -- through variable is
proportional to across variable - Integral (I) -- through variable is proportional
to integral of across variable - Derivative (D) -- through variable is
proportional to derivative of across variable
5. Element equations
40Electrical components
- Across variable potential difference v (V)
- Through variable current I (A)
P -- Resistor I -- Inductor D -- Capacitor
R(?) L(H) C(F)
5. Element equations
41Rectilinear mechanical components
- Across variable linear velocity v(m/s)
- Through variable force f(N)
P -- Linear damper I -- Linear spring D --
Mass
B(N/ms-1) K(N/m) M(kg)
5. Element equations
42Rotational mechanical components
- Across variable angular velocity ?(rad/s)
- Through variable torque T(Nm)
P -- Angular damper I -- Angular spring D --
Inertia
B(Nm/rads-1) K(Nm/rad) J(Nm/rads-2)
5. Element equations
43Fluid components
- Across variable pressure head h(m)
- Through variable volume flow rate q(m 3s-1)
P -- fluid resistance D -- fluid capacity
1/R(m2/s) A(m2)
5. Element equations
44Thermal components
- Across variable temperature difference ?(K)
- Through variable heat flow rate q(W)
P -- thermal resistance D -- thermal capacity
1/R(W/K) C(J/K)
5. Element equations
456. System equations
6. System equations
46Example -- suspension
body displacement x(t)
body mass
spring, k
shock absorber, b
m d2x/dt2 -b dx/dt - k x
wheel
6. System equations
477. Differential equations (de)
- Definition of de
- Order of a de
- Linear de
- Linear de with constant coefficients
- Nonlinear de
- Homogeneous de
- Nonhomongeneous de
- Auxiliary equation
7. Differential equations
48Definition of de
- A differential equation is a mathematical
expression combining a function (e.g., yf(x))
and one or more of its derivatives - Examples
- dy/dx - 5 y 0
- d2y/dx2 - 3 dy/dx 2y 0
- d2y/dx2 - (x25) dy/dx2 y sin 2x
7. Differential equations
49Order of a de
- The order of a differential equation is the order
of the highest derivative in the equation - Examples
- dy/dx - 5 y 0 -- 1st
- d2y/dx2 - 3 dy/dx 2y 0 -- 2nd
- d2y/dx2 - (x25) dy/dx2 y sin 2x -- 2nd
7. Differential equations
50Linear de
- A linear differential equation is an equation
consisting of a sum of terms each made of a
multiplier and either the function or its
derivatives - Examples
- dy/dx - 5 y 0 -- linear
- d2y/dx2 - 3 dy/dx 2y 0 -- linear
- d2y/dx2 - (x25) dy/dx2 y sin 2x --
nonlinear
7. Differential equations
51Linear de with constant coefficients
- If the multipliers are constant, then the
differential equation is said to have constant
coefficients - Examples
- dy/dx - 5 y 0 -- constant coefficients
- dy/dx - 5 xy 0 -- non- constant
7. Differential equations
52Nonlinear de
- If the function or one of its derivatives is
raised to a power or embedded in another
function, the differential equation is nonlinear - Example
- d2y/dx2 - (x25) dy/dx2 y sin 2x --
nonlinear
7. Differential equations
53Homogeneous de
- A homogeneous differential equation is one in
which each term contains either the function or
its derivatives. In other words, the sum of the
derivative terms is zero - Examples
- dy/dx - 5 y 0 -- homogeneous
- d2y/dx2 - 3 dy/dx 2y 0 -- homogeneous
7. Differential equations
54Nonhomogeneous de
- A nonhomogeneous differential equation is a sum
of derivative terms that doesnt equal zero - Example
- d2y/dx2 - (x25) dy/dx2 y sin 2x --
non-homogeneous
7. Differential equations
55Auxiliary equation
- The auxiliary equation is the polynomial formed
by replacing all derivatives in a linear,
constant coefficient, homogeneous differential
equation with variables raised to the the power
of the respective derivatives - Example
- d2y/dx2 - 3 dy/dx 2y 0 has an auxiliary
equation of s2 - 3s 2 0
7. Differential equations
568. Solving differential equations
- Introduction
- Examples
- Alternate expression
8. Solving differential equations
57Introduction
- There are a large number of types of differential
equations - Many types have closed form solutions others do
not - A type of differential equations of importance to
engineering is the linear, non-homogeneous
differential equation with constant coefficients
8. Solving differential equations
58Example 1
- de Dy - 2y 0
- auxiliary equation S - 2 0
- root 2
- solution y C e2x
- if y(0) 10, then C 10
8. Solving differential equations
59Example 2
- de D2y 3 Dy 2y 0
- auxiliary equation S2 3S 2 0
- roots -1, -2
- solution y C1 e-2x C2 e-x
- if y(0) 0, Dy(0) -1, then C1 1 and C2 -1
8. Solving differential equations
60Example 3
- de D2y y 0
- auxiliary equation S2 1 0
- roots i, -i
- solution y C1 cos x C2 sin x
8. Solving differential equations
61Example 4
- de D2y 2Dy 2y 0
- auxiliary equation s2 2s 2 0
- roots -1 i, -1 - i
- solution y C1 e-x cos x C2 e-x sin x
8. Solving differential equations
62Example 5
- de D2y 2Dy y 0
- auxiliary equation S2 2S 1 0
- roots -1 , -1
- solution y (C1 C2 x ) e-x
8. Solving differential equations
63Example 6
- de D5y 0
- auxiliary equation S5 0
- roots 0, 0, 0, 0, 0
- solution y C1 C2 x C3x2 C4 x3
C5x4
8. Solving differential equations
64Example 7
- de D4y 4 D3y 8 D2y 8 Dy 4 y 0
- auxiliary equation s4 4 s3 8 s2 8 s 4
(s2 2s 2)( s2 2s 2) 0 - roots -1 i, -1 - i, -1 i, -1 - i
- solution y (C1 C2 x) e-x cos x (C3 C4
x) e-x sin x
8. Solving differential equations
65Example 8 (1 of 2)
- de D2y Dy - 2y 2x -40 cos 2x
- homogeneous auxiliary equation s2 s - 2 0
- homogeneous roots 1, -2
- homogeneous solution yc C1 ex C2 e-2x
- particular roots 0, 0, 2i, -2i
- particular solution yp A Bx C cos 2x E
sin 2x - total solution y yc yp
8. Solving differential equations
66Example 8 (2 of 2)
- -2 yp -2A -2Bx -2C cos 2x -2E sin 2x
- D yp B 2Ecos2x - 2C sin 2x
- D2 yp -4C cos 2x -4E sin 2x
- constant terms -2A B 0
- X terms -2B 2
- cos x terms -2C 2E -4C -40
- sin x terms -2E -2C -4E 0
- constants A -0.5. B -1, C 6, E -2
8. Solving differential equations
67Example 9 (1 of 2)
- de D2y y sin x
- homogeneous auxiliary equation s2 1 0
- homogeneous roots i, -i
- homogeneous solution yc C1 cos x C2 sin x
- particular roots i, -i
- particular solution yp Ax cos x Bx sin x
- total solution y yc yp
8. Solving differential equations
68Example 9 (2 of 2)
- yp Ax cos x Bx sin x
- D yp A cos x - Ax sin x B sin x Bx cos x
- D2 yp -2A sin x - Ax cos x 2B cos x - Bx sin
x - cos x terms 2B 0
- sin x terms -2A 1
- constants A -0.5, B 0
8. Solving differential equations
69Example 10 (1 of 1)
- de D3y - Dy 4 e-x 3 e2x
- homogeneous auxiliary equation s3 - s 0
- homogeneous roots 0, 1, -1
- homogeneous solution yc C1 C2 ex C3 e-x
- particular roots -1, 2
- particular solution yp Ax e-x B e2x
- total solution y yc yp
8. Solving differential equations
70Example 10 (2 of 2)
- yp Ax e-x B e2x
- D yp A e-x - Ax e-x 2 B e2x
- D2 yp -2A e-x Ax e-x 4 B e2x
- D3 yp 3A e-x - Ax e-x 8 B e2x
- e-x terms -A 3A 4
- e2x terms -2B 8B 3
- constants A 2. B 0.5
8. Solving differential equations
71Example 11
- In the previous problem, y(0) 0, Dy(0) -1, D2
y(0) 2 - Determine C1, C2, C3
- Use the general solution y C1 C2 ex C3
e-x 2x e-x 0.5 e2x - Dy C2 ex - C3 e-x - 2x e-x 2e-x e2x
- D2 y C2 ex C3 e-x 2x e-x - 4e-x 2e2x
- y(0) 0 C1 C2 C3 0.5
- Dy(0) -1 C2 - C3 3
- D2 y(0) 2 C2 C3 -2
- C1 -4.5, C2 0, C3 4
8. Solving differential equations
72Example 12 (1 of 3)
- de D2 y 2D y 2y cos x
- homogeneous auxiliary equation s2 2s 2 0
- homogeneous roots -1i, -1-i
- homogeneous solution yc C1 e-x cos x C2 e-x
sin x - particular roots i, -i
- particular solution yp A cos x B sin x
- total solution y yc yp
8. Solving differential equations
73Example 12 (2 of 3)
- yp A cos x B sin x
- D yp - A sin x B cos x
- D2 yp - A cos x - B sin x
- cos x terms -A 2B 2A 1
- sin x terms -B -2A 2B 0
- constants A 0.2, B 0.4
8. Solving differential equations
74Example 12 (3 of 3)
- Use the general solution y C1 e-x cos x C2
e-x sin x 0.2 cos x 0.4 sin x - initial conditions y(0) 1, D y(0) 0
- Dy - C1 e-x cos x - C2 e-x sin x - C1 e-x sin
x C2 e-x cos x - 0.2 sin x 0.4 cos x - y(0) 1 C1 0.2
- Dy(0) 0 - C1 C2 0.4
- C1 0.8, C2 0.4
- y(x) 0.8 e-x cos x 0.4 e-x sin x 0.2 cos x
0.4 sin x
8. Solving differential equations
75Alternate expression (1 of 3)
- It is sometimes desirable to express a
higher-order differential equation as a set of
first-order equations - Matrix representation
- Computer solutions
8. Solving differential equations
76Alternate expression (2 of 3)
- Example
- D3y 2 D2Y 5Dy 10y r
- Choose
- y1 y
- y2 Dy Dy1
- y3 D2y Dy2
- Single equation replaced by three equations
- Dy1 y2
- Dy2 y3
- Dy3 r - 10 y1 - 5y2 - 2y3
8. Solving differential equations
77Alternate expression (3 of 3)
Dy1 Dy2 Dy3
y1 y2 y3
0 1 0 0 0 1 -10 -5 -2
0 0 r
8. Solving differential equations