Lab2 V01 20092021 2
Lab2 V01 20092021 2
Lab2 V01 20092021 2
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
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
Report quality 5
,
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
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
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
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.