You are on page 1of 5

MSC 602: Advanced Applied Mathematics

Lab. Assignment 2 (A2)


Fall 2021
Analytical solution to the boundary value problems
for ordinary differential equations

Submission deadline: Tuesday, 28 September, 2021 at 23:55 pm

Note:
• Each student has to implement all exercises specified in the manual.
• Derive the solutions of ODEs and prepare a handwritten or typed report*. Use python for
the tasks stated in the manual.
• Combine the report and ready to run Python program in the form of IPython (Jupyter)
notebook or Python program as one zip file, name it as A2_Surname_First Name_your
ID.zip and submit it before the deadline as indicated in the instruction.
• Any queries regarding the lab should be discussed only with the Instructor/T.A.s.
• Each implementation should be done individually. Sharing your code or report (in entirety
or partially) will be considered as plagiarism.
* References on using equation editor in MS Word:
https://uwaterloo.ca/information-systems-technology/services/scientific-computing-
software-support/supported-software-scientific-computing/creating-numbering-and-cross-
referencing-equations-microsoft
https://www.officetooltips.com/word_2016/tips/how_to_create_captions_for_equations.ht
ml

Exercise 1: Solve the second-order ODE using the method of variation of


parameters

Tasks:
1. Derive the general solution by hand.
2. Derive the particular solution by hand.
3. Write a python program to solve the differential equation using
dsolve function.
4. Verify the particular solution.
5. Plot the solution in python.

1
Grading:

Task Points

1 Derive the general solution by hand. 20

2 Derive the particular solution by hand. 20

3 Write a python program to solve the differential equation using 20


dsolve function.

4 Verify the particular solution. 20

5 Plot the solution in python. 15

Report quality 5

Exercise 2: A damped harmonic oscillator is described by the following ODE

,
where is the mass, is the damping constant and is the spring constant.

Textbook, p. 64

Assume and .
Tasks:
1. Select the value of the damping constant c that results in overdamping motion.
Derive the particular solution by hand.
Verify the solution.
Write a python program to find the general and particular solutions to the
original differential equation using dsolve function.
Plot the results:
(a) Plot on the same graph the results for positive initial displacement and
positive, zero and negative initial velocities;

2
(b) Plot on the same graph the results for negative initial displacement and
positive, zero and negative initial velocities;
2. Select the value of the damping constant c that results in critical damping
motion.
Derive the particular solution by hand.
Verify the solution.
Write a python program to find the general and particular solutions to the
original differential equation using dsolve function.
Plot the results:
(c) Plot on the same graph the results for positive initial displacement and
positive, zero and negative initial velocities;
(d) Plot on the same graph the results for negative initial displacement and
positive, zero and negative initial velocities;
3. Select the value of the damping constant c that results in underdamping
motion.
Derive the particular solution by hand.
Verify the solution.
Write a python program to find the general and particular solutions to the
original differential equation using dsolve function.
Plot the results :
(e) Plot on the same graph the results for positive initial displacement and
positive, zero and negative initial velocities;
(f) Plot on the same graph the results for negative initial displacement and
positive, zero and negative initial velocities.

Hint:

Grading:

Task Points

1 Overdamping system. 30

2 Critical damping system. 30

3 Underdamping system. 30

Report quality 10

3
Exercise 3: Solve the second-order ODE

Tasks:
1. Derive the general and particular solutions by hand.
2. Write a python program to find the general and particular solutions to the
original differential equation using dsolve function.
3. Verify the particular solution.
4. Plot the solution for small t, , and large t, .
5. Show graphically which part of the general solution describes the behavior of
the motion for large t.
Plot the steady state part of the solution together with the general solution of
the homogeneous ODE for .

Grading:

Task Points

1 Find the general and particular solutions by hand. 30

2 Write a python program to find the general and particular solutions 30


to the original differential equation utilizing dsolve function.

3 Verify the particular solution. 10

4 Plot the solution for small t, , and large t, . 10

5 Show graphically which part of the general solution describes the 15


behavior of the motion for large t.
Plot the steady state part of the solution together with the general
solution of the homogeneous ODE for .

Report quality 5

4
Exercise 4: Solve the Bessel ODE

Tasks:
1. Transform the original ODE into Bessel equation.
2. Derive the general solution by hand.
3. Derive the particular solution by hand.
4. Write a python program to find the general solution of the Bessel equation
using dsolve function.
5. Verify the particular solution.
6. Plot the solution.

Hint.
The ODE

can be transformed into the Bessel equation by making the substitution

Grading:

Task Points
1 Transform the original ODE into Bessel equation. 10
2 Derive the general solution by hand. 20
3 Derive the particular solution by hand. 30
4 Write a python program to find the general solution of the Bessel 10
equation using dsolve function.

5 Verify the particular solution. 15


6 Plot the solution. 10
Report quality 5

You might also like