Top Banner
Modeling and Simulation with ODE (MSE) Massimo Fornasier Fakult¨ at f¨ ur Mathematik Technische Universit¨ at M¨ unchen [email protected] http://www-m15.ma.tum.de/ Johann Radon Institute (RICAM) ¨ Osterreichische Akademie der Wissenschaften [email protected] http://hdsparse.ricam.oeaw.ac.at/ Department of Mathematics Technische Universit¨ at M¨ unchen Lecture 4
134

Modeling and Simulation with ODE (MSE)...From Picard-Lindel of back to Euler: \greed is good!" Instead of solving globally the xed point equation (3) by a multitude of iterations (4),

Jun 23, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Modeling and Simulation with ODE (MSE)Massimo Fornasier
Johann Radon Institute (RICAM) Osterreichische Akademie der Wissenschaften
[email protected] http://hdsparse.ricam.oeaw.ac.at/
Lecture 4
Why are you here? In this course we shall provides the rudiments (the basics!) of the numerical solution of differential equations, i.e, equations involving the derivatives of a (possibly) multivariate function u : ⊂ Rd → R:
F (x1, . . . , xd , u(x), ∂
∂x1∂xd , . . . ) = 0.
Often one of the variables indicates the time, e.g., x1 = t, and the equation governs a phenomena which evolves in time:
∂u
∂t + F (x , u,Du,D2u, . . . ) = 0.
Differential equations were for the first time formulated in the 17th
century by I. Newton (1671) and by G.W. Leibniz (1676).
Just old boring stuff?
Yes, of course!? But also NO, because the history did not stop ...
used by Euler, Maxwell, Boltzmann, Navier, Stokes, Einstein, Prandtl, Schrodinger, Pauli, Dirac,Turing, Black&Scholes ...........
I provide an important modeling tool for the physical sciences, theoretical chemistry, biology, socio-economic sciences, engineering sciences ....
I accessible to numerical simulations
For instance ... Fourier in Theorie analytique de la chaleur (1822) formulated and solved analytically the equation governing the heat conduction in homogenous media:
∂u
) = 0.
A similar equation is studied by Fornasier and March in 2007 to recolor ancient Italian frescoes from fragments:
See Restoration of color images by vector valued BV functions and variational calculus (M. Fornasier and R. March), SIAM J. Appl. Math., Vol. 68 No. 2, 2007, pp. 437-460.
Illustrations of differential equations and some of their (modern) applications
Reference: P. A. Markowich, Applied Partial Differential Equations - A Visual
Approach, Springer, 2006
I Gas dynamics Boltzmann equation I Fluid/gas dynamics: Navier-Stokes/Euler Equations I Kinetic modeling of granular flows I Chemotaxis and formation of biological patterns I Semiconductor modeling I Free boundary problems and interfaces I Reaction-diffusion equations I Monge-Kantorovich optimal transportation I Wave equations I Digital image processing I Socio-Economic modeling
From partial differential equations to ordinary differential equations
As we shall see in the course of this lecture, several partial differential equations (PDE) can be reduced, after discretization of the space variable, to a system of ordinary differential equations (ODE):
∂u
∂t + F (t, x , u,Du,D2u, . . . ) = 0⇒ u′h(t) + Fh(u(t)) = 0,
where h is a space discretization parameter.
The first part of this course is dedicated to the use of ODE for modeling physical and engineering problems, while the second part of the course is dedicated to their numerical solution by some of the most relevant numerical methods.
Program of the course in a nutshell
Modeling by ODE:
I First-order ODEs
I Runge-Kutta methods
K11 E. Kreyszig, Advanced Engineering Mathematics, 10th Edition, John Wiley & Sons, Inc., 2011
I09 A. Iserles, A First Course in the Numerical Analysis of Differential Equations (2nd ed.), Cambridge University Press, 2009.
QSG10 A. Quarteroni, F. Saleri, P. Gervasio, Scientific Computing with Matlab and Octave (3rd ed.), Springer, 2010.
Lecture notes:
Numerik_2013-08-04.pdf (password required)
References do not mean ...
that you do not come to the lecture and think to be smart ...
’cause I will NOT let you escape ...
At the end there will be the exam ... and I’ll be waiting for you there (REMEMBER IT!) ... you better show up! (just a friendly - Italian - invitation not to skip the lectures :-) !)
Just the classical email from the “smart” student ...
Sehr geehrter Herr Prof. Fornasier, mein Name ist [SmartStudentName]. Gestern habe ich die Prufung in ”Numerisches Programmieren II (CSE)” geschrieben. Ich habe extrem viel fur diese Prufung gelernt, da ich mich vor allem in PDEs spezialisieren mochte und im nachsten Semester auch “Numerik der PDEs” bei Prof. [ReallySmartProfName] horen werde. Mich zieht es innerhalb von CSE auch immer mehr in Richtung Numerik und daher investiere ich viel Kraft in dieses Thema. Ich habe mich mit wirklich allen Satzen, Beweisen und auch den Themen nach FEM (hyp./par. PDEs, die Sie nicht mehr behandelt haben) und auch daruber hinaus mit dem Buch von Iserles, “PDEs” von Lawrence Evans und weiterer Literatur beschaftigt und bin der Meinung, dass ich fur einen CSE-Studenten viel mehr Wissen als erforderlich besitze und viele Zusammenhange sehr gut verstanden habe. An dieser Stelle mochte ich meinen Unmut uber die gestrige Prufung ausdrucken. Ich hatte bereits in NP1 eine 1.0 und dies war auch gestern mein Ziel. Vermutlich habe ich nun gar nicht bestanden oder wenn, dann vielleicht hochstens mit einer 4.0. [...]
Vielen herzlichen Dank.
Let’s start ... why ODE?
As just mentioned, ODE comes often after the space discretization of PDE.
But ODE have their own dignity and relevance, since, actually, PDE can be derived as the “limit” of sytems of ODE governing the evolution of particles driven by Newton laws:
F = m · a.
Hence, ODE ⇒ PDE ⇒ ODE.
Particle systems Besides in physics, large particle systems arise in many modern applications:
Image halftoning via variational
protein-protein interaction network.
xi = vi ,
vi = ∑N
Several“social forces” encoded in the interaction kernel H:
I Repulsion-attraction
I Alignment
social forces.
An example inspired by nature
Mills in nature and in our simulations.
J. A. Carrillo, M. Fornasier, G. Toscani, and F. Vecil, Particle, kinetic,
hydrodynamic models of swarming, within the book “Mathematical modeling
of collective behavior in socio-economic and life-sciences”, Birkhauser (Eds.
Lorenzo Pareschi, Giovanni Naldi, and Giuseppe Toscani), 2010.
The genearal ODE Our goal is to use equations of the type
y ′ = f (t, y), t ≥ t0, y(t0) = y0, (1)
for modeling and then for simulation. (In the previous modeling, yi = (xi , vi ) and f (t, y)i = (vi ,
∑N j=1 H(xj − xi , vj − vi )).)
I f is a map of [t0,∞)× Rd to Rd and the initial condition y0 ∈ Rd is a given vector
I f is “nice”, obeying, in a given vector norm, the Lipschitz condition
f (t, x)− f (t, y) ≤ λx − y, ∀x , y ∈ Rd , t ≥ t0 (2)
Here λ > 0 is a real constant that is independent of the choice of x and y . In this case we say that f is a Lipschitz continuous function.
I Subject to (2), it is possible to prove that the ODE system (1) possesses a unique solution (see, for instance [Theorem 3.5, F13] pag. 52).
Just an idea of the proof of existence and uniqueness (Picard 1890, Lindelof 1894)
Actually (1) can be rewritten by integration
y(t) = y0 +
f (s, y(s))ds = g(y)(t). (3)
Hence, a solution y(t) is a fixed point trajectory of the equation y = g(y). How can one solve fixed point equations? Well, if g were a contraction, i.e., g is a Lipschitz continuous function with Lipschitz constant 0 < Λ < 1, then the iteration
yn+1 = g(yn), n ≥ 0 (4)
converges always to the unique fixed point!
Graphical interpretation and mathematical explanation
Indeed, assume that such fixed point y exists then
y−yn+1∗ = g(y)−g(yn)∗ ≤ Λy−yn∗ ≤ Λny−y0∗ → 0, n→∞,
because Λ < 1. The tricky part of the proof is to show that there exists a fixed point and that there exists always a norm · ∗ which makes g a contraction as soon as f is Lipschitz continuous.
Did you noticed that ... ... what we wrote in (4) is actually an ALGORITHM?!
OMG! Really, an ALGORITHM?!
... is it a bad thing?! Actually, no, that’s what you are here for! Or, perhaps yes ... Oh well, nevertheless, an ALGORITHM!
For the brave student: if you find out a way to discretize (4) and a way of
properly “scaling” the equation so that the iteration always converges on a
finite set of time point t0 < t1 < · < tn, then let me know! Actually this course
is (IMPLICITLY) all about this!
From Picard-Lindelof back to Euler: “greed is good!” Instead of solving globally the fixed point equation (3) by a multitude of iterations (4), we may consider the simpler idea of solving it locally, step by step, by iterating the approximation
y(t) = y0+
f (s, y(s))ds ≈ y(t0)+(t−t0)f (t0, y(t0)), for t ≈ t0.
(5) Given a sequence t0, t1 = t0 + h, t2 = t0 + 2h, ... , where h > 0 is a time step, we denote by yn a numerical estimate of the exact solution y(tn), n = 0, 1, . . . . Motivated by (5), we choose
y1 = y0 + hf (t0, y0).
If h is small, it should not be that wrong! But then, why not to continue, assuming that we did not that bad before, at t2, t3 and so on. In general, we obtain the recursive scheme
yn+1 = yn + hf (tn, yn), (6)
the celebrated Euler method.
Graphical interpretation Consider the Euler method applied to the logistic equation
y ′ = y(1− y), y(0) = 1
10 ,
with step h = 1:
It’s clear that at each step we produce an error, but our goal is not to avoid
any (numerical error)! (Eventually nobody is perfect!) Our final goal is to have
a practical method that approximates the analytic solution with increasing
accuracy (i.e., decreasing error) the more computational effort we do.
Yes, but what hell is this logistic equation? Is it just mathematical nonsense?!
The logistic equation is a model
OMG! Really, a MODEL?!
of population growth first published by Pierre Verhulst (1845, 1847). Its solution is the function
y(t) = 1
1 + e−t , t ∈ R.
Try it out and check that y ′(t) = y(t)(1− y(t)) (Exercise)!
Yes, but what hell is this logistic equation? Is it just mathematical nonsense?!
The logistic function finds applications in a range of fields, including artificial neural networks, biology, especially ecology, biomathematics, chemistry, demography, economics, geoscience, mathematical psychology, probability, sociology, political science, and statistics. In population dynamics one describes the growth of the population P(t) by
dP(t)
) .
The term rP(t) on the right-hand side tells that for r > 0 the larger is the population the stronger the growth will be (he, he, he) ... however the negative term − r
K P(t)2 instead indicates the drop of the population due to - interacting
- competition. This antagonistic effect is called the bottleneck, and is modeled by the value of the parameter K > 0. By setting y = P(t)
K one obtains
Try out Euler’s method on the logistic equation:
f = @(t,x) x.*(1-x); [t,yy]=ode45(f,[0:5],1/10); y(1)=1/10; h=1; for n=1:5, y(n+1)=y(n)+h*y(n)*(1-y(n)); end, plot([0:5],y,’r*-’,[0:5],yy,’b’) h=1/2; for n=1:10, y(n+1)=y(n)+h*y(n)*(1-y(n)), end, hold on, plot([0:0.5:5],y,’g-*’)
Convergence of a numerical method
Assume that h > 0 is variable and h→ 0. On each grid t0, t1 = t0 + h, t2 = t0 + 2h, ... we associate a different numerical sequence yn = yn,h, n = 0, 1, . . . , bt∗/hc (not necessarily produced by the Euler method!).
A method is said to be convergent if, for every ODE (1) with a Lipschitz function f and every t∗ > 0 it is true that
lim h→0
where bαc ∈ Z is the integer part of α ∈ R.
Convergence means that, for every Lipschitz function, the numerical solution tends to the true solution as the grid becomes increasingly fine.
Convergence of the Euler method
Theorem The Euler method (6) is convergent
Proof. (For this proof we assume that the Taylor expansion of f has uniformly bounded coefficients, i.e., f is analytic, implying that y is analytic as well.) Let us consider the error en,h = yn − y(tn). We shall prove limh→0 en,h = 0. Taylor expansion of y(t)
y(tn+1) = y(tn) + hy ′(tn) +O(h2) = y(tn) + hf (tn, y(tn)) +O(h2).
Subtracting this equation to (6), we obtain
en+1,h = en,h + h[f (tn, yn)− f (tn, y(tn))] +O(h2).
Triangle inequality and (2) imply
en+1,h ≤ en,h+ hf (tn, yn)− f (tn, y(tn))+ ch2
≤ (1 + hλ)en,h+ ch2.
en,h ≤ c
Convergence of the Euler method continues ...
We notice now that 1 + ξ ≤ eξ for all ξ > 0, hence (1 + hλ) ≤ ehλ and (1 + hλ)n ≤ ehnλ. But n = 0, 1, . . . , bt∗/hc and n ≤ t∗/h, implying
(1 + hλ)n ≤ et∗λ
lim h→0
en,h = 0.
The error bound in (7) tells us that actually Euler’s method converges with order q = 1 since it decays as O(hq). However,let us stress that the constant
[ c λ(et
∗λ − 1) ]
is by far over-pessimistic and should not be used for numerical puroposes (it’s just theoretical!).
Beyond logistic equation?
First oder ODEs
We shall consider first-order ODEs. Such equations contain only the first derivative y ′ and may contain y and any given functions of x . Hence we can write them as
F (x , y , y ′) = 0,
or often in the explicit form
y ′ = f (x , y),
as we already got used to read it. Example: x−3y ′ − 4y2 = 0 is implicit and y ′ = 4y2x3 is its explicit form.
Solution of a ODE
A solution y = y(x) of a ODE is a differentiable function defined on an real interval [a, b], with −∞ ≤ a < b ≤ +∞ which formally fulfills the equation
y ′(x) = f (x , y(x)),
at every x ∈ (a, b). Example: y(x) = c/x is a solution of the equation
xy ′ = −y .
Indeed, differentiate y(x) = c/x to get y ′(x) = −c/x2. Multiply the latter by x and obtain xy ′(x) = −c/x = −y(x)!
Solution by direct calculus
One trivial version of ODE is the one where there is no dependence on y on the right-hand side, i.e.,
y ′ = f (x , y) = f (x).
But then, by integration we get
y(x) =
∫ x
x0
y =
∫ f (ξ)dξ + c ,
is a family of possible solutions. Example: y ′(x) = cos(x) has solutions y(x) = sin(x) + c .
Family of solutions
has derivative y ′(x) = cecx = cy(x).
Hence the exponential function (8) is actually a solution of the equation
y ′ = cy ,
where the right-had side f (x , y) = cy is a linear function in y .
Some terminology
We see that each ODE in these examples has a solution that contains an arbitrary constant c. Such a solution containing an arbitrary constant c is called a general solution of the ODE.
Geometrically, the general solution of an ODE is a family of infinitely many solution curves, one for each value of the constant c . If we choose a specific c we obtain what is called a particular solution of the ODE. A particular solution does not contain any arbitrary constants.
Initial value problems
In most cases the unique solution of a given problem, hence a particular solution, is obtained from a general solution by an initial condition y(x0) = y0, with given values x0 and y0, that is used to determine a value of the arbitrary constant c . Example: Solve the initial value problem
y ′ = 3y , y(0) = 5.7.
y(x) = ce3x .
We need to detemine c . The we plug y(0) = 5.7 = ce30 = c. Hence, c = 5.7 and
y(x) = 5.7e3x .
Radioactivity. Exponential Decay Physical Information. Experiments show that at each instant a radioactive substance decomposes and is thus decaying in time proportional to the amount of substance present: if y(t) is the amount of radioactive substance at the time t, we have
y ′ = −ky ,
where the constant k is positive, so that, because of the minus, we do get decay. The value of k is known from experiments for various radioactive substances (e.g., k = 1.4× 10−11 sec−1, approximately, for radium 226
88 Ra).
Geometrical interpretation
The equation y ′ = f (x , y),
has a simple geometric interpretation. From calculus you know that the derivative y ′(x) of y(x) is the slope of y(x). Hence a solution curve that passes through a point (x0, y0) must have, at that point, the slope y ′(x0) equal to the value of f at that point; that is,
y ′(x0) = f (x0, y0).
Geometrical interpretation This gives a direction field (or slope field) into which you can then fit (approximate) solution curves. This may reveal typical properties of the whole family of solutions. The figure below shows a direction field for the ODE
y ′ = y + x .
Direction field of y ′ = y + x , with three approximate solution curves passing
through (0, 1), (0, 0), (0,−1), respectively
Separable ODEs. Modeling Many practically useful ODEs can be reduced to the form
g(y)y ′ = f (x) (9)
by purely algebraic manipulations. Then we can integrate on both sides with respect to x , obtaining∫
g(y)y ′dx =
∫ f (x)dx + c . (10)
On the left we can switch to y as the variable of integration. By calculus, y ′dx = dy , so that∫
g(y)dy =
∫ f (x)dx + c . (11)
If f and g are continuous functions, the integrals exist, and by evaluating them we obtain a general solution. This method of solving ODEs is called the method of separating variables, and (9) is called a separable equation.
Example 1
The ODE y ′ = 1 + y2 because it can be written
1
1 + y2 dy = dx ,
By integration we obtain arctan y = x + c or y = tan(x + c). It is very important to introduce the constant of integration immediately when the integration is performed! If we wrote arctan y = x , then y = tan x , and then introduced c , we would have obtained y = tan x + c , which is not a solution (when c 6= 0). Verify this.
Example 2
The ODE y ′ = (x + 1)e−xy2 is separable; we obtain y−2dy = (x + 1)e−xdx . By integration
−y−1 = −(x + 2)e−x + c, y(x) = 1
(x + 2)e−x − c .
Solve y ′ = −2xy , y(0) = 1.8.
Solution: by separation of variables
1
or y = ce−x
2 ,
where c = e c . This is the general solution. From the initial condition we have 1.8 = y(0) = c . Hence the IVP has solution y(x) = 1.8e−x
2 .
of a Chalcolithic (Copper Age) man from about XXX BC
In September 1991 the famous Iceman (Oetzi), a mummy from the Neolithic period of the Stone Age found in the ice of the Oetztal Alps (hence the name “Oetzi”) in Southern Tyrolia near the Austrian-Italian border (like me!), caused a scientific sensation. When did Oetzi approximately live and die if the ratio of carbon 14
6 C to carbon 12
6 C in this mummy is 52.5% of that of a living organism?
Physical facts
In the atmosphere and in living organisms, the ratio of radioactive carbon 14
6 C (made radioactive by cosmic rays) to ordinary carbon 12 6 C is constant. When an organism dies, its absorption of 14
6 C by breathing and eating terminates. Hence one can estimate the age of a fossil by comparing the radioactive carbon ratio in the fossil with that in the atmosphere. To do this, one needs to know the half-life of 14
6 C, which is 5715 years (CRC Handbook of Chemistry and Physics, 83rd ed., Boca Raton: CRC Press, 2002, page 1152, line 9).
Mathematical modeling Radioactive decay is governed by the ODE y ′ = ky . By separation and integration (where t is the time and y0 is the initial ratio of 14 6 C to 12
6 C)
y = kdt, ln(|y |) = kt + c , y = y0ekt , (y0 = ec).
Next we use the half-life H = 5715 to determine k. When t = H, half of the original substance is still present. Thus
y0ekH = 0.5y0, ekH = 0.5, k = ln 0.5
H = −0.693
5715 = −0.0001213.
Finally, we use the ratio 52.5% for determining the time t when Oetzi died (actually, was killed),
ekt = e−0.0001213t = 0.525, t = ln(0.525)
−0.0001213 = 5312.
Heating an office
Suppose that in winter the daytime temperature in a certain office building is maintained at 20C . The heating is shut off at 22. and turned on again at 6. On a certain day the temperature inside the building at 2 was found to be 18C . The outside temperature was 4C at 22 and had dropped to −6C by 6. What was the temperature inside the building when the heat was turned on at 6?
Heating an office
Physical information. Experiments show that the time rate of change of the temperature T of a body B (which conducts heat well, for example, as a copper ball does) is proportional to the difference between T and the temperature of the surrounding medium (Newton’s law of cooling).
Heating an office
dt = k(T − TA).
Unfortunately we do NOT know TA, external temperature, which is a function of time. Then we decide to approximate it to the mean TA ≈ 4−6
2 = −1. Hence
dT
T + 1 = kdt, ln |T + 1| = kt + C , T (t) = −1 + cekt .
We choose 22 as time t = 0. Then the given initial condition T (0) = 20. By substitution
20 = T (0) = −1 + cek0 = −1 + c c = 21.
Now we determine k. T (4) = 18 at 2 where t = 4 is 2 in the morning.
18 = T (4) = −1 + 21e4k , 19
21 = e4k , k =
Hence
T (t) = −1 + 21e−0.025t , T (8) = −1 + 21e−0.025×8 ≈ 16.3C .
Leaking tank
It concerns the outflow of water from a cylindrical tank with a hole at the bottom. You are asked to find the height of the water in the tank at any time if the tank has diameter 2 m, the hole has diameter 1 cm, and the initial height of the water when the hole is opened is 2.25 m. When will the tank be empty?
Leaking tank
Physical information. Under the influence of gravity the outflowing water has velocity
v(t) = 0.600 √
2gh(t) (Torricelli’s law),
where h(t) is the height of the water above the hole at time t, and g = 980cm/sec2 is the acceleration of gravity at the surface of the earth.
Leaking tank
To get an equation, we relate the decrease in water level h(t) to the outflow. The volume V of the outflow during a short time t is
V = Avt, A is the area of the hole
and it has to be equal to the change V ∗ of volume in the tank, given by
V ∗ = −Bh,
where B is the cross-sectional area of the tank and h is the decrease of the height h(t) of the water. Hence, by Torricelli’s law
−Bh = Avt, or h
t = −A
dh
Leaking tank
This is our model, a first-order ODE, which is actually separable. A/B is constant. Separation and integration gives
dh√ h
= −26.56 A
B t.
Dividing by 2 and squaring gives h(t) = (c − 13.28At/B)2. Inserting 13.28A/B = 0.000332 yields the general solution
h(t) = (c − 0.000332t)2.
The initial height h(0) = 225cm and c2 = 225 or c = 15, thus the particular solution is
h(t) = (15− 0.000332t)2.
Hence h(t) = 0 for t = 45181 sec or t ≈ 12.6 hours.
Extended method: reduction to separable form
Certain nonseparable ODEs can be made separable by transformations that introduce for y a new unknown function. We discuss this technique for a class of ODEs of practical importance, namely, for equations
y ′ = f (y
) ,
where f is a differentiable function. The form of the ODE suggests the introduction of a new variable function u = y/x . By product rule y ′ = u′x + u. Substitution into the equation leads to
u′x + u = f (u), or du
f (u)− u =
Example Solve
2xyy ′ = y 2 − x2.
Solution. To get the usual explicit form we divide by 2xy and obtain
y ′ = y 2 − x2
u′x + u = u
|x | + c.
1 + u2 = c/x or 1 + (y/x)2 = c/x .
Multiplying by x2 both sides yeilds
x2 + y 2 = cx , or (
x − c
Graphical interpretation
This general solution represents a family of circles passing through the origin with centers on the x-axis.
Second-Order Linear ODE
A second-order ODE is called linear if it can be written
y ′′ + p(x)y ′ + q(x)y = r(x),
and nonlinear if it cannot be written in this form. The distinctive feature of this equation is that it is linear in y and its derivatives, whereas the functions p, q, and r on the right may be any given functions of x . If the equation begins with, say, f (x)y ′′, then divide by f (x) to have the standard form with y ′′ as the first term.
(Non)homogenous equations
If r(x) ≡ 0 (that is, r(x) = 0 for all x considered; read “r(x) is identically zero”), then the equation reduces to
y ′′ + p(x)y ′ + q(x)y = 0
and is called homogeneous. If r(x) 6= 0, then the equation is called nonhomogeneous. An example of a nonhomogeneous linear ODE is
y ′′ + 25y = e−x cos x ,
and a homogeneous linear ODE is
xy ′′ + y ′ + xy = 0 ⇒ y ′′ + y ′/x + y = 0
Finally, an example of a nonlinear ODE is
y ′′y + y ′ 2
= 0.
The functions p and q are called the coefficients of the ODEs.
Solutions
Solutions are defined similarly as for first-order ODEs. A function y(x) is called a solution of a (linear or nonlinear) second-order ODE on some open interval I if y is defined and twice differentiable throughout that interval and is such that the ODE becomes an identity if we replace the unknown y, the derivative y ′, and the second derivative y ′′.
Homogeneous Linear ODEs: Superposition Principle Linear ODEs have a rich solution structure. For the homogeneous equation the backbone of this structure is the superposition principle or linearity principle, which says that we can obtain further solutions from given ones by adding them or by multiplying them with any constants. Example: The functions y = cos x and y = sin x are both solutions of the homogeneous linear ODE
y ′′ + y = 0
for all x. Verify this by differentiation and substitution: (cos x)′′ = − cos x and similarly (sin x)′′ = − sin x! However, due to the linearity of the equations any other function of the type
y(x) = c1 cos c + c2 sin x
is again a solution of the equation!!! Indeed
(c1 cos c+c2 sin x)′′ = c1(cos c)′′+c2(sin x)′′ = −(c1 cos c+c2 sin x).
Homogeneous Linear ODEs: Superposition Principle
In this example we have obtained from y1(= cos x) and y2(= sin x) a function of the form
y = c1y1 + c2y2
(c1, c2 arbitrary constants). This is called a linear combination of y1 and y2. In terms of this concept we can now formulate the result suggested by our example, often called the superposition principle or linearity principle.
Fundamental Theorem for the Homogeneous Linear ODE
Theorem For a homogeneous linear ODE, any linear combination of two solutions on an open interval I is again a solution on I . In particular, for such an equation, sums and constant multiples of solutions are again solutions.
Proof. Let y1 and y2 be solutions of
y ′′ + p(x)y ′ + q(x)y = 0
on I . Then by substituting y = c1y1 + c2y2 and its derivatives into the equation, and using the familiar rule (y = c1y1 + c2y2)′ = c1y ′1 + c2y ′2, etc., we get
y ′′ + p(x)y ′ + q(x)y
= c1y ′′1 + c2y ′′2 + p(x)(c1y ′1 + c2y ′2) + q(x)(c1y1 + c2y2)
= c1y ′′1 + p(x)c1y ′1 + q(x)c1y1 :=0
+ c2y ′′2 + p(x)c2y ′2 + q(x)c2y2 :=0
= 0.
Caution!
Don’t forget that this highly important theorem holds for homogeneous linear ODEs only but does not hold for nonhomogeneous linear or nonlinear ODEs, as the following example illustrates. Verify by substitution that the functions y = 1 + cos x and y = 1 + sinx are solutions of the nonhomogeneous linear ODE
y ′′ + y = 1,
Also nonlinearity breaks the superposition principle!
Verify by substitution that the functions y = x2 and y = 1 are solutions of the nonlinear ODE
y ′′y − xy ′ = 0,
Initial value problems
For a second-order homogeneous linear ODE, an initial value problem consists of the equation and two initial conditions
y(x0) = K0, y ′(x0) = K1.
These conditions prescribe given values of the solution and its first derivative (the slope of its curve) at the same given x0 in the open interval considered. The conditions are used to determine the two arbitrary constants c1 and c2 in a general solution
y = c1y1 + c2y2
of the ODE; here, y1 and y2 are suitable solutions of the ODE. This results in a unique solution, passing through the point (x0,K0) with K1 as the tangent direction (the slope) at that point. That solution is again called a particular solution of the ODE.
Examples
y ′′ + y = 0, y(0) = 3.0, y ′(0) = −0.5.
Solution. General solution. The functions cos x and sin x are solutions of the ODE and
y = c1 cos x + c2 sin x .
be a general solution. Particular solution. We need the derivative y ′ = −c1 sin x + c2 cos x . From this and the initial values we obtain, since cos 0 = 1 and sin 0 = 0,
y(0) = c1 = 3.0,
and y ′(0) = c2 = −0.5.
This gives as the solution of our initial value problem the particular solution
y = 3.0 cos x − 0.5 sin x .
Linear independence!
Our choice of y1 and y2 was “independent” enough to satisfy both initial conditions. Now let us take instead two proportional solutions y1 = cos x and y2 = k cos x , so that
y = c1 cos x + c2(k cos x) = C cos x
where C = c1 + c2k . We are no longer able to satisfy two initial conditions with only one arbitrary constant C . Consequently, in defining the concept of a general solution, we must exclude proportionality and we need linear independence of two solutions!
Linear space structure
y ′′ + p(x)y ′ + q(x)y = 0
on an open interval I is a solution y = c1y1 + c2y2 in which y1 and y2 are solutions of the equation on I that are not proportional, and c1 and c2 are arbitrary constants. These y1, y2 are called a basis (or a fundamental system) of solutions of the equation on I . A particular solution on I is obtained if we assign specific values to c1 and c2.
Linear space structure
Actually, we can reformulate our definition of a basis by using a concept of general importance. Namely, two functions y1 and y2 are called linearly independent on an interval I where they are defined if
k1y1(x) + k2y2(x) = 0
everywhere on I implies k1 = 0 and k2 = 0. And y1 and y2 are called linearly dependent on I if k1y1(x) + k2y2(x) = 0 also holds for some constants k1, k2 not both zero.
Definition (Basis reformulated)
A basis of solutions on an open interval I is a pair of linearly independent solutions on I .
Example
Verify by substitution that y1 = ex and y2 = e−x are solutions of the ODE y ′′ − y = 0. Then solve the initial value problem
y ′′ − y = 0, y(0) = 6, y ′(0) = −2.
Solution. As (e±x)′ = ±ex it is easily shown that (e±x)′′ − e±x = 0. They are
not proportional, ex/e−x = e2x 6= const. Hence ex , e−x form a basis for all x .
The rest is just as before by finding c1 and c2 of y = c1ex + c2e−x by the given
initial conditions. The final answer is y = 2ex + 4e−x . This is the particular
solution satisfying the two initial conditions.
Reduction of the order
It happens quite often that one solution can be found by inspection or in some other way. Then a second linearly independent solution can be obtained by solving a first-order ODE. This is called the method of reduction of order.
Example Find a basis of solutions of the ODE
(x2 − x)y ′′ − xy ′ + y = 0.
Solution. Inspection shows that y1 = x is a solution because y ′1 = 1 and y ′′1 = 0, so that the first term vanishes identically and the second and third terms cancel. The idea of the method is to substitute
y = uy1 = ux , y ′ = u′x + u, y ′′ = u′′x + 2u.
into the ODE. This gives
(x2 − x)(u′′x + 2u′)− x(u′x + u) + ux = 0.
ux and xu cancel and we are left with an ODE, which we divide by x , order, and simplify to obtain
(x2 − x)u′′ + (x − 2)u′ = 0.
This ODE is of first order in v = u′, namely, (x2 − x)v ′ + (x − 2)v = 0! Separation of variables and integration now gives
dv
x − 1 − 2
x )dx , ln |v | = ln |x − 1| − 2 ln |x | = ln
|x − 1| x2
Example continued ...
We need no constant of integration because we want to obtain a particular solution; similarly in the next integration. Taking exponents and integrating again, we obtain
v = x − 1
x ,
hence y2 = ux = x ln |x |+ 1. Since y1 = x and y2 = ux = x ln x + 1 are linearly
independent (their quotient is not constant), we have obtained a basis of
solutions, valid for all positive x .
The general method In this example we applied reduction of order to a homogeneous linear ODE
y ′′ + p(x)y ′ + q(x)y = 0.
We assume a solution y1 on an open interval I to be known and want to find a basis. For this we need a second linearly independent solution y2 on I . To get y2, we substitute
y = y2 = uy1, y ′ = u′y1 + u′y1, y ′′ = u′′y1 + 2u′y ′1 + uy ′′,
in the equation, obtaining
u′′y1 + u′(2y ′1 + py1) + u (y ′′1 + py ′1 + qy1) :=0
= 0.
v ′ + v 2y ′1 + py1
y1 = 0,
dv
∫ pdx or v =
vdx . As the quotient
y2/y1 = u = ∫
vdx cannot be constant because v > 0, y1 and y2 are a basis for
the space of solutions!
Homogeneous Linear ODEs with Constant Coefficients
We shall now consider second-order homogeneous linear ODEs whose coefficients a and b are constant,
y ′′ + ay ′ + by = 0.
These equations have important applications in mechanical and electrical vibrations. To solve it, we recall that the solution of the first-order linear ODE with a constant coefficient k
y ′ + ky = 0,
Homogeneous Linear ODEs with Constant Coefficients
We shall now consider second-order homogeneous linear ODEs whose coefficients a and b are constant,
y ′′ + ay ′ + by = 0.
These equations have important applications in mechanical and electrical vibrations.
To solve it, we recall that the solution of the first-order linear ODE with a constant coefficient k
y ′ + ky = 0,
Homogeneous Linear ODEs with Constant Coefficients
We shall now consider second-order homogeneous linear ODEs whose coefficients a and b are constant,
y ′′ + ay ′ + by = 0.
These equations have important applications in mechanical and electrical vibrations. To solve it, we recall that the solution of the first-order linear ODE with a constant coefficient k
y ′ + ky = 0,
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx ,
for which y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0. From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx , for which
y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0. From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx , for which
y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0. From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx , for which
y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0.
From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx , for which
y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0. From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Solution strategy
This gives us the idea to try with solutions of the type y(x) = eλx , for which
y ′(x) = λeλx , y ′′(x) = λ2eλx ,
hence (λ2 + aλ+ b)eλx = 0, ∀x
and λ is a solution of the characteristic equation λ2 + aλ+ b = 0. From algebra we know that the roots are
λ± = 1
2 (−a±
√ a2 − 4b),
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
I a2 − 4b > 0: two distict real roots;
I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root;
I a2 − 4b < 0: two conjugate complex roots; In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional.
In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x .
In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique.
So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0!
In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x).
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases We have three cases
I a2 − 4b > 0: two distict real roots; I a2 − 4b = 0: one double root; I a2 − 4b < 0: two conjugate complex roots;
In the first case, we have that
y(x) = c1y1(x) + c2y2(x),
is the general solution of the equation, since y1 and y2 are certainly not proportional. In the second case, λ = −a/2 and there is only one solution given y1(x) = e−a/2x . In order to obtain a second solution needed for a basis, we use the order reduction technique. So we consider y2 = uy1. Plugging this into the equation we obtain, as we already computed
u′′y1 + u′(2y ′1 + ay1) = 0.
Now notice that actually 2y ′1 + ay1 = 0! In fact y1(x) = e−a/2x , hence y ′1(x) = − a
2 y1(x). We are left with
u′′y1 = 0, or u′′ = 0, or u(x) = c1x + c2.
Hence, y2(x) = xy1 and a general solution of the equation is
y(x) = (c1 + xc2)e−a/2x .
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
Then the solutions
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent!
Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived?
From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
Cases continued ... In the third case the roots are complex
λ± = −a
2 ± iω,
y1 = e−a/2x cos(ωx), y2 = e−a/2x sin(ωx)
turn out to be linearly independent! Hence in this case the general solution is given by
y(x) = e−a/2x(c1 cos(ωx) + c2 sin(ωx)).
But how these solutions are derived? From Euler formula e iξ = (cos(ξ) + i sin(ξ)) we obtain
cos ξ = 1
1
2 +iω)x = e(− a
2 x)(cos(ωx) + i sin(ωx)),
2 x)(cos(ωx)− i sin(ωx)).
gives us y1, while substracting the
second from the first and multiplying by 1 2i
gives us y2.
y ′′ + 0.4y ′ + 9.04y = 0, y(0) = 0, y ′(0) = 3.
Solution. General solution. The characteristic equation is λ2 + 0.4λ+ 9.04 = 0. It has the roots −0.2± 3i . Hence ω = 3, and a general solution is
y(x) = e−0.2x(A cos 3x + B sin 3x).
Particular solution. The first initial condition gives y(0) = A = 0. The remaining expression is y = Be−0.2x sin 3x . We need the derivative (chain rule!)
y ′ = B(−0.2e−0.2x sin 3x + 3e−0.2x cos 3x).
From this and the second initial condition we obtain y ′(0) = 3B = 3. Hence B = 1. Our solution is
y = e−0.2x sin 3x .
Typical damped oscillation
The Figure shows y and the curves of e−0.2x and −e−0.2x
(dashed), between which the curve of y oscillates. Such “damped vibrations” (with x = t being time) have important mechanical and electrical applications.
Summary
Modeling Linear ODEs with constant coefficients have important applications in mechanics and in electrical circuits.
Now we model and solve a basic mechanical system consisting of a mass on an elastic spring (a so-called “mass-spring system”), which moves up and down.
Modeling Linear ODEs with constant coefficients have important applications in mechanics and in electrical circuits.
Now we model and solve a basic mechanical system consisting of a mass on an elastic spring (a so-called “mass-spring system”), which moves up and down.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression.
We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball. We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative. We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c). This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch. The minus sign indicates that F points upward, against the displacement.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression. We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball.
We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative. We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c). This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch. The minus sign indicates that F points upward, against the displacement.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression. We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball. We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative.
We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c). This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch. The minus sign indicates that F points upward, against the displacement.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression. We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball. We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative. We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c).
This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch. The minus sign indicates that F points upward, against the displacement.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression. We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball. We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative. We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c). This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch.
The minus sign indicates that F points upward, against the displacement.
Mass-spring systems
We take an ordinary coil spring that resists extension as well as compression. We suspend it vertically from a fixed support and attach a body at its lower end, for instance, an iron ball. We let y = 0 denote the position of the ball when the system is at rest (Fig. b). Furthermore, we choose the downward direction as positive, thus regarding downward forces as positive and upward forces as negative. We now let the ball move, as follows. We pull it down by an amount y > 0 (Fig. c). This causes a spring force
F = −ky Hooke’s law,
proportional to the stretch. The minus sign indicates that F points upward, against the displacement.
Motiong driven by the force
The motion of our massspring system is determined by Newtons second law
my ′′ = F or my ′′ + ky = 0.
This is a homogeneous linear ODE with constant coefficients, with general solution
y(t) = A cos(ω0t) + B sin(ω0t), ω0 =
√ k
m .
This motion is called a harmonic oscillation. Its frequency is f = ω0/(2π) Hertz (= cycles/sec). The frequency f is called the natural frequency of the system.
Motiong driven by the force
The motion of our massspring system is determined by Newtons second law
my ′′ = F or my ′′ + ky = 0.
This is a homogeneous linear ODE with constant coefficients, with general solution
y(t) = A cos(ω0t) + B sin(ω0t), ω0 =
√ k
m .
This motion is called a harmonic oscillation. Its frequency is f = ω0/(2π) Hertz (= cycles/sec). The frequency f is called the natural frequency of the system.
Motiong driven by the force
The motion of our massspring system is determined by Newtons second law
my ′′ = F or my ′′ + ky = 0.
This is a homogeneous linear ODE with constant coefficients, with general solution
y(t) = A cos(ω0t) + B sin(ω0t), ω0 =
√ k
m .
This motion is called a harmonic oscillation. Its frequency is f = ω0/(2π) Hertz (= cycles/sec). The frequency f is called the natural frequency of the system.
Solutions
Damping
To our model my ′′ = −ky we now add a damping force
F1 = −cy ′,
obtaining my ′′ = −ky − cy ′; thus the ODE of the damped mass-spring system is
my ′′ + cy ′ + ky = 0.
We assume this damping force to be proportional to the velocity y ′. This is generally a good approximation of friction effects for small velocities.
Damping
To our model my ′′ = −ky we now add a damping force
F1 = −cy ′,
my ′′ + cy ′ + ky = 0.
We assume this damping force to be proportional to the velocity y ′. This is generally a good approximation of friction effects for small velocities.
Damping
To our model my ′′ = −ky we now add a damping force
F1 = −cy ′,
obtaining my ′′ = −ky − cy ′; thus the ODE of the damped mass-spring system is
my ′′ + cy ′ + ky = 0.
We assume this damping force to be proportional to the velocity y ′. This is generally a good approximation of friction effects for small velocities.
Damping
To our model my ′′ = −ky we now add a damping force
F1 = −cy ′,
obtaining my ′′ = −ky − cy ′; thus the ODE of the damped mass-spring system is
my ′′ + cy ′ + ky = 0.
We assume this damping force to be proportional to the velocity y ′. This is generally a good approximation of friction effects for small velocities.
Solution
The ODE is homogeneous linear and has constant coefficients. Hence we can solve it by the methods we just saw.
The characteristic equation is
m λ = 0.
By the usual formula for the roots of a quadratic equation we obtain
λ± = −α± β := − c
Solution
The ODE is homogeneous linear and has constant coefficients. Hence we can solve it by the methods we just saw. The characteristic equation is
λ2 + c
m λ+
m λ = 0.
By the usual formula for the roots of a quadratic equation we obtain
λ± = −α± β := − c
Solution
The ODE is homogeneous linear and has constant coefficients. Hence we can solve it by the methods we just saw. The characteristic equation is
λ2 + c
m λ+
m λ = 0.
By the usual formula for the roots of a quadratic equation we obtain
λ± = −α± β := − c
Damping ...
It is now interesting that depending on the amount of damping present whether a lot of damping, a medium amount of damping or little damping three types of motions occur, respectively:
Overdamping If the damping constant c is so large that c2 > 4mk ,
then the corresponding general solution ofis
y(t) = c1e−(α−β)t + c2e−(α+β)t.
Both exponents are negative because β2 = α2 − k/m < α2 and α, β > 0.
Overdamping If the damping constant c is so large that c2 > 4mk , then the corresponding general solution ofis
y(t) = c1e−(α−β)t + c2e−(α+β)t.
Both exponents are negative because β2 = α2 − k/m < α2 and α, β > 0.
Overdamping If the damping constant c is so large that c2 > 4mk , then the corresponding general solution ofis
y(t) = c1e−(α−β)t + c2e−(α+β)t.
Both exponents are negative because β2 = α2 − k/m < α2 and α, β > 0.
Critical damping Critical damping is the border case between nonoscillatory motions (Case I) and oscillations (Case III).
It occurs if the characteristic equation has a double root, that is, if c2 = 4mk , so that β = 0. Then the corresponding general solution of is
y(t) = (c1 + c2t)e−αt .
Critical damping Critical damping is the border case between nonoscillatory motions (Case I) and oscillations (Case III). It occurs if the characteristic equation has a double root, that is, if c2 = 4mk , so that β = 0.
Then the corresponding general solution of is
y(t) = (c1 + c2t)e−αt .
Critical damping Critical damping is the border case between nonoscillatory motions (Case I) and oscillations (Case III). It occurs if the characteristic equation has a double root, that is, if c2 = 4mk , so that β = 0. Then the corresponding general solution of is
y(t) = (c1 + c2t)e−αt .
Underdumping Case III. Underdamping This is the most interesting case. It occurs if the damping constant c is so small c2 < 4mk .
Then β in is no longer real but pure imaginary, say,
β = iω.
y(t) = e−αt(Acosωt + Bsinωt) = Ce−αt cos(ωt − δ),
where C 2 = A2 + B2 and tan δ = B/A. This represents damped oscillations.
Underdumping Case III. Underdamping This is the most interesting case. It occurs if the damping constant c is so small c2 < 4mk . Then β in is no longer real but pure imaginary, say,
β = iω.
y(t) = e−αt(Acosωt + Bsinωt) = Ce−αt cos(ωt − δ),
where C 2 = A2 + B2 and tan δ = B/A. This represents damped oscillations.
Underdumping Case III. Underdamping This is the most interesting case. It occurs if the damping constant c is so small c2 < 4mk . Then β in is no longer real but pure imaginary, say,
β = iω.
y(t) = e−αt(Acosωt + Bsinωt) = Ce−αt cos(ωt − δ),
where C 2 = A2 + B2 and tan δ = B/A.
This represents damped oscillations.
Underdumping Case III. Underdamping This is the most interesting case. It occurs if the damping constant c is so small c2 < 4mk . Then β in is no longer real but pure imaginary, say,
β = iω.
y(t) = e−αt(Acosωt + Bsinωt) = Ce−αt cos(ωt − δ),
where C 2 = A2 + B2 and tan δ = B/A. This represents damped oscillations.
Main Talk