0% found this document useful (0 votes)
15 views

01 Exercises Ordinary Differential Equations (ODEs)

The document outlines exercises related to Ordinary Differential Equations (ODEs) with a focus on incremental learning, analytical problem-solving, and the application of ODEs in various mathematical contexts. It includes specific problems, methods like Picard iteration and integrating factors, and emphasizes the importance of numerical approximation and software implementation. The exercises aim to deepen understanding of ODEs, their solutions, and their applications in fields such as fluid mechanics and computational finance.

Uploaded by

beflightbear
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

01 Exercises Ordinary Differential Equations (ODEs)

The document outlines exercises related to Ordinary Differential Equations (ODEs) with a focus on incremental learning, analytical problem-solving, and the application of ODEs in various mathematical contexts. It includes specific problems, methods like Picard iteration and integrating factors, and emphasizes the importance of numerical approximation and software implementation. The exercises aim to deepen understanding of ODEs, their solutions, and their applications in fields such as fluid mechanics and computational finance.

Uploaded by

beflightbear
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Exercises Ordinary Differential Equations (ODEs)

© Datasim Education BV

Abstract and Goals of Exercises


The exercises in the Datasim courses are based on the following underlying principles:
 Taking an incremental approach: begin with clearly-defined model problems and then move to
more advanced problems. Studying concrete examples in detail is the foundation for later work.
 We not only focus on the mechanics of solving problems (mathematical methods) but we also
develop skills to solve and understand problems from a more analytical perspective.
 Some of the exercises are concerned with investigating into how the current topic can be
extended and generalised to other areas of mathematics. Some notable use cases for ordinary
differential equations (ODEs) are:
 Generalising linear scalar ODEs to ODE nonlinear systems.
 Reducing other problems (for example partial differential equations (PDEs)) to ODEs.
 Using ODEs in combination with other mathematical methods.
 In order to consolidate the learning process it is always advisable to use software libraries and/or
write your own software to test the validity of your mathematical formulae.

Remarks and Tips

*1. Equation (1) is a simple example of a singular perturbation problem, characterized by a small
parameter of the highest (in this case, first order) derivative. There are many situations in fluid
mechanics and computational finance where such equations are used, in particular convection-
diffusion-reaction PDEs and their numerical solution:
a) FDM 2006, sections 11.2.2
b) C++ 2004, sections 11.6, 18.3
c) C++ 2018, sections 20.7.1, 20.7.2
e) Adjoint form: FDM 2006 section 1.5, C++ 2004 section 17.5, C++ 2018, section 20.3.2, 20.3.4

1(b) is a stiff problem because derivatives blow up at x = 0 for small values of \epsilon.
1(c) Find the functions b(x), c(x).
1(f) transforming to a finite interval has many advantages, see C++ 2018 section 20.3.4. An
interesting exercise is to apply Picard to the transformed ODE to show existence on 0 < y < 1.
1(g) Classical constant-mesh FD schemes behave badly for singular perturbation problems. In these
cases we use Duffy exponential fitting or adaptive scheme (e.g. Bulirsch-Stoer), for example.
Numerical approximation of ODEs; C++ 2018 chapter 24,25; C++ 2004 chapter 11..

The results for first-order ODEs are very useful and will be generalised to 2nd-order ODEs and
PDEs.
In many cases, you may be able to find an explicit (which is not the same as closed form)
representation for the solution.

*2. Just standard examples of using the integrating factor method. You can check your solution by
plugging it into the ODE. It tests your ability to solve a problem, step-by-step.

1
Some integrals have integrands that are difficult analytically. Just leave as is.

For the ODE dx=dt = x=t you can solve by 1) Picard, 2) integrating factor or 3) separation of
variables as in
dx=x = dt=t => logx = logt + C etc.

*3. Some problems (e.g. interest rate, backwards induction binomial methods) are written in this
way. However, in this course we always write ODEs and PDEs an initial value problems.

*4. Continuous and discrete Gronwall is fundamental when analysing existence and uniqueness of
solution of ODEs and PDEs as well as finite difference method.

*5. Picard iteration is discussed C++ 2018 section 24.5. It is used for ODEs to prove that they have a
unique solution in a given interval. Execution of the process results in a series solution whose
convergence (or lack of) can be proved using series tests (root, ratio tests). In general, numerical
approximation of ODEs based on the Picard iterates is probably not optimal.

*9. Activation functions are extremely important in Machine Learning (ML). Here we see that they
satisfy an ODE that has an analytical solution (we got lucky) and that be approximated by a range of
schemes in C++ and Python (see my code).

*10. The Cauchy-Euler ODE has the same form as the time-independent part of the Black-Scholes
PDE. For this reason alone it is worth investigating. A common theme is transforming the ODE in
some way:
a) Creating a constant-coefficient version
b) Mapping an ODE on a semi-infinite interval to the unit interval
c) Transforming the ODE to adjoint form
d) Converting a 2nd-order ODE to a system of 1st-order ODEs
e) Semi-discretisation of a PDE in space to produce a system of ODEs in time

Some of these topics could be useful building blocks in a project.

*11 Homogeneous ODEs are mentioned in C++2018 chapter 24.

1. (Simple ODE)
Consider the following scalar linear initial value problem (IVP):

8 du
< " dx + au = 0; a > 0 constant; 0<x<1
(1)
:
u(0) = A

where 0 < " << 1 (usually a small number).

Answer the following questions:


a) Prove that the problem (1) has a unique solution u" (x) for 0 < x < 1 and find that solution.
k
b) Compute the derivatives ddxuk" ; k = 1; 2; 3; : : : What happens when " ! 0 near 𝑥 = 0?
c) Prove that the solution of IVP (1) remains positive for any initial condition. Find an upper bound
for the solution for 0 < x < 1.

2
d) Use the Picard iteration method to find a series solution to (1) in the case A = 1. Does the
evolving series look familiar and does it converge?
e) We consider (1) in the case a = a(x) is a positive function. Convert (1) to adjoint form (find the
unknown functions and ). Use this formulation to find the solution of (1). The adjoint
form is defined as:

8 d
< b(x) dx (c(x)u) = 0; 0<x<1
(2)
:
u(0) = A:

This approach is a basic form of the integrating factor method.


f) We now transform IVP (1) to adjoint form by mapping to the unit interval using the
x
transformation y = 1+x . Can you find an explicit solution of the new IVP?
g) We consider the numerical approximation of IVPs (1) and (2) using the explicit Euler method (
h > 0 is the step length and A = t0 < t; < t2 < : : : h = tn ¡ tn¡1; n ¸ 1 are mesh
points):

un+1 ¡ un
" + aun = 0; n ¸ 0; u0 = A (3)
h
½ ¾
c(tn+1 )un+1 ¡ c(tn)un
b(tn) = 0; n ¸ 0; u0 = A: (4)
h

Implement these schemes in C++ or Python and investigate the stability and accuracy of
these schemes for various values of " and h .

2. (Integrating Factor)
Consider the ODE (where ). We use the integrating factor:

to solve it.

3
Use this method to find the solutions of the following ODEs and IVPs:

For the last ODE in this list, find the solution using Picard iteration.

3. (Terminal Value Problem)


Verify that the solution of the terminal value problem:

is given by:

(hint: use change of variables and use the integrating factor method).

4. (Grönwall’s Inequality)
Prove Grönwall’s Inequality:

If then .

Prove the integral form of the inequality: if

4
then

Prove the discrete form of this inequality: if then:

5. (Existence and Uniqueness of Solutions)


Consider the scalar autonomous IVP:

(5)

Answer the following questions:


a) Use Picard iteration to find a solution of (5) in a given interval. Find that interval.
b) What happens if you compute the solution outside of the interval?
c) Approximate (5) by a finite difference scheme.
d) Apply steps a) to c) in a neighbourhood of to the IVP:

(6)

6. (Jacobian Matrix)
Compute the Jacobian for the following autonomous systems:

7. (From Nonautonomuous to Autonomous ODEs)


From a mathematical and numerical point of view it is easier to analyse autonomous systems. To this
end, convert the ODE:

5
to autonomous form:

Find the form of the function g(t).

8. (Reduction to First-Order ODE)


Reduce the nth-order ODE:

to a first-order system of ODEs:

Make the system explicit by identifying the function . What are the initial conditions?

9. (Activation Function)
Consider the activation function:

Verify that this function satisfies the ODE:

Determine the values of for which this problem has a unique solution by constructing the Picard
iterates. Approximate the ODE by finite difference schemes.

10. (Cauchy-Euler Equation)


The technique that we discuss in this exercise is similar to that used for the Black Scholes PDE on the
positive axis to reduce it to a PDE with constant coefficients.

Consider the ODE:

where and are constants.

6
Define the variable substitution:

Prove that:

Solve this ODE using its characteristic polynomial in the case of distinct roots:

where and are roots of the characteristic polonomial and and are
constants.

11. (Homogeneous Equation)


Prove that the following ODEs are homogeneous and find the corresponding degrees:

Show that:

is not a homogeneous ODE.

You might also like