Modeling and Simulation with ODE for MSE

Zentrum Mathematik
Technische Universität München
Prof. Dr. Massimo Fornasier
Dr. Markus Hansen
WS 2016/17
Sheet 3
Modeling and Simulation with ODE for MSE
The exercises can be handed in until Wed, 16.11.2016, 12.00 in the post box located in the MI
basement!
Exercise 1 (Ricatti Differential Equation)
Find all solutions of the so called Ricatti differential equation:
x2 y 0 (x) = x2 y 2 (x) + xy(x) + 1.
Hint: A particular solution is of the type yp (x) = xa .
Solution:
(a) Plugging the solution of the type yp (x) =
−a
x2 2
x
into the ODE gives
2
a
+ x + 1 for all x 6= 0,
x
which results in the algebraic equation
=x
2a
a
x
x2
0 = a2 + 2a + 1 = (a + 1)2
with solution a = −1 .
(b) We try y(x) = yp (x) + u(x) = − x1 + u(x) and plug this expression into the ODE:
1
1
1
1
2
0
2
2
x
+ u (x) = x
− 2 u(x) + u (x) + x − + u(x) + 1 for all x 6= 0.
x2
x2
x
x
From this we obtain an ODE of Bernoulli type
1
u0 (x) = − u(x) + u2 (x) for all x 6= 0
x
(c) The transformation u(x) =
−
1
z(x)
(1)
in (1) gives
z 0 (x)
1
1
=−
+ 2
for all x 6= 0
2
z (x)
xz(x) z (x)
or
1
z(x) − 1 for all x 6= 0.
x
which is an inhomogeneous linear ODE of first order, that remains to solve.
z 0 (x) =
• The homogenous ODE
zh0 (x) =
1
zh (x), for all x 6= 0
x
is a separable ODE. For zh (x) 6= 0 follows
Z zh (x)
Z x
dν
dξ
=
⇒ zh (x) = cx with constant c ∈ R.
ν
ξ
(2)
• A particular solutions of (2) can be obtained with variation of parameters. We
plug the ansatz zp (x) = ĉ(x)x into the ODE and find
ĉ0 (x)x + ĉ(x) =
1
1
ĉ(x)x − 1 =⇒ ĉ0 (x) = − =⇒ ĉ(x) = − ln |x|,
x
x
so that we obtain the solution zp (x) = −x ln |x|.
• The general solution of (2) hence is
z(x) = cx − x ln |x| for all x 6= 0.
(d) We do the back transformation
1
1
, for all x 6= 0 with constant c ∈ R.
y(x) = − +
x cx − x ln |x|
Hence all solutions of the Ricatti-ODE are given by
1
1
1
y(x) = − +
, x 6= 0 with constant c ∈ R and y(x) = − , x 6= 0.
x cx − x ln |x|
x
Remark: A Ricatti differential equation is an ODE of first order, which contains a quadratic nonlinearity, i.e. it generally is of the form
y 0 (x) = q0 (x) + q1 (x)y(x) + q2 (x)y 2 (x)
with q0 (x) 6≡ 0. In case q0 (x) ≡ 0, such an ODE is called a Bernoulli ODE. These equations
are of interest, since another method of solving them consists in transforming them to a
related linear ODE of second order, for which many analytical and numerical methods
work better than for nonlinear equations.
Exercise 2 (Euler Differential Equation)
Solve the initial value problem
4x2 y 00 − 3y = 0,
y(1) = −3,
y 0 (1) = 0.
Construct first a fundamental system using the ansatz y(x) = xm .
Solution:
Since x2 has a root in x = 0 we may expect problems with the solution being undefined.
Due to the initial condition being imposed in x = 1 we may concentrate (if necessary) on
x > 0.
Plugging the suggested ansatz into the ODE, we find
0 = 4x2 m(m − 1)xm−2 − 3xm =⇒ xm 4m(m − 1) − 3 = 0.
Thus once more we can reduce the ODE to an algebraic equation,
4m(m − 1) − 3
with solutions m1 = −1/2 and m2 = 3/2. Thus we have found solutions
y1 (x) = x−1/2
and
y2 (x) = x3/2 .
Moreover, y2 obviously is no (constant) multiple of y1 , hence they are linearly independent,
and {y1 , y2 } turns out to be the desired fundamental system.
As usual, the solution of the initial value problem now reduces to a linear system of
equations
−3 = y(1) = c1 y1 (1)+c2 y2 (1) = c1 +c2
and 0 = y 0 (1) = c1 y10 (1)+c2 y20 (1) = −
c1 3c2
+
.
2
2
Its solution is given by c1 = − 49 and c2 = − 34 , and hence we arrive at
9
3
−3(3 + x2 )
p
y(x) = − y1 (x) − y2 (x) =
4
4
4 (x)
as the solution of the initial value problem.
Remark: Any linear ODE (of arbitrary order) is called Euler differential equation (or
of Euler-type) if it only involves terms of the form xm y (m) , i.e. y, xy 0 , x2 y 00 , x3 y 000 etc.
The main feature of this type of ODE is that the ansatz y(x) = xr always leads to an
algebraic equation, i.e. a polynomial equation of order m, whose (real and/or complex)
solutions determine solutions of the Euler ODE. In case of multiple roots, the remaining
solutions can be found by order reduction methods. Alternatively, the substitution x = et
transforms the Euler ODE into a linear ODE with constant coefficients.
Equations of this type often occur in special situations for partial differential equations, usually after involving certain symmetry conditions (e.g. for Poisson’s equation or
Schrödinger’s equation after involving radial symmetry, for instance when considering the
Hydrogen atom).
Exercise 3 (Reduction of Order)
Solve the initial value problem
x3 y 00 − xy 0 + y = 0, y(1) = 0,
y 0 (1) = 1.
Guess a possibly simple solution y1 6= 0 and then deduce a second solution.
Solution:
Inspection gives that y1 (x) = x is a solution of the ODE. In this respect, one should usually
try simple elementary functions first, i.e. exponentials ecx , trigonometric functions sin(ax),
cos(ax), and monomials xm . The most simple functions there being those for which one
or more terms vanish (in our example, the second derivative and thus the first term of
the ODE vanish).
For the missing solution y2 according to the order reduction method discussed in the
lecture, we try y2 (x) = u(x)x. Then y 0 (x) = u + xu0 and y 00 (x) = 2u0 + xu00 , and plugging
this into the ODE we get
0 = x3 (2u0 + xu00 ) − x(u + xu0 ) + xu = x4 u00 + 2(x3 − x2 )u0
as an ODE for u. Taking v(x) = u0 (x) we can reduce the order
0 = x4 v 0 + x2 (2x − 1)v.
A solution of the homogeneous linear ODE of first order is (choosing c=1)
Z
1 − 2x exp(−1/x)
dx =
.
v(x) = exp
x2
x2
Integrating gives u(x) = exp(−1/x) and thus finally y2 (x) = x exp(−1/x). Since this is
not a multiple of y1 , it is a possible second element for the solution basis.
The constants c1 and c2 for the solution y = c1 y1 + c2 y2 of the initial value problem now
can be obtained by solving the system
0 = y(1) = c1 y1 (1) + c2 y2 (1) = c1 +
c2
,
e
1 = y 0 (1) = c1 y10 (1) + c2 y20 (1) = c1 +
2c2
,
e
a simple linear system of (algebraic) equations; note y20 (x) = exp(−1/x) + x1 exp(−1/x),
so y20 (1) = 2e . The solution of this system is given by c2 = e and c1 = −1, and hence the
final solution of the initial value problem is
y(x) = ex exp(−1/x) − x.
Information and material related to the lecture can be found at the lecture webpage
http://www-m15.ma.tum.de/Allgemeines/ModelingSimulation