![Page 1: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/1.jpg)
1
Lecture 3
Mathematica for Differential
Equations
![Page 2: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/2.jpg)
2
Use Mathematica to find the
analytical solutions to first
order ordinary differential
equations
![Page 3: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/3.jpg)
Example of first order differential equation
commonly encountered in physics
● Do you recognize these equations?
𝑑𝑣𝑦
𝑑𝑡= −𝑔;
𝑑𝑦
𝑑𝑡= 𝑣𝑦
𝑚𝑑𝑣
𝑑𝑡= −𝑚𝑔 − η𝑣
𝑑𝑁
𝑑𝑥= −λ𝑁;
𝑑𝑁
𝑑𝑡= −
𝑁
τ
𝑚𝑑𝑣
𝑑𝑥= −𝑘𝑥
![Page 4: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/4.jpg)
Analytical solution of
● ZCA 101 mechanics, kinematic equation for
a free fall object
● What is the solution, i.e., vy=vy(t)?
𝑑𝑣𝑦
𝑑𝑡= −𝑔
𝑑𝑣𝑦
𝑑𝑡= −𝑔
⇒ න𝑑𝑣𝑦
𝑑𝑡𝑑𝑡 = −න𝑔𝑑𝑡
න𝑑𝑣𝑦 = 𝑣𝑦 = −න𝑔𝑑𝑡 = −𝑔𝑡 + 𝑐
⇒ 𝑣𝑦 = 𝑣𝑦 𝑡 = −𝑔𝑡 + 𝑐
𝑑𝑣𝑦𝑑𝑡
= −𝑔
![Page 5: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/5.jpg)
● To completely solve this first order
differential equation, i.e., to determine vy as
a function of t, and the arbitrary constant c, a
boundary value or initial value of vy at a
given time t is necessary. Usually (but not
necessarily) vy(0), i.e., the value of vy at t=0
has to be assumed.𝑑𝑣𝑦𝑑𝑡
= −𝑔
න
𝑣𝑦 0
𝑣𝑦 𝑡
𝑑𝑣 = −න
0
𝑡
𝑔 𝑑𝑡 = −𝑔𝑡
⇒ 𝑣𝑦 = 𝑣𝑦 𝑡 = −𝑔𝑡 + 𝑣𝑦 0
Analytical solution of𝑑𝑣𝑦𝑑𝑡
= −𝑔
![Page 6: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/6.jpg)
Analytical solution of
● Assume vy=vy(t) a known function of t.
● To completely solve the equation so that we can
know what is the function y(t), we need to know the
value of y(0).
𝑑𝑦
𝑑𝑡= 𝑣𝑦
න
𝑦 0
𝑦 𝑡
𝑑𝑦 = න
0
𝑡
𝑣𝑦 𝑑𝑡
⇒ 𝑦 𝑡 − 𝑦 0 = න
0
𝑡
𝑣𝑦 𝑑𝑡
![Page 7: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/7.jpg)
Analytical solution of
● In free fall without drag force, vy(t)=vy(0)-gt.
● The complete solution takes the form
𝑑𝑦
𝑑𝑡= 𝑣𝑦
𝑦 𝑡 − 𝑦 0 = න
0
𝑡
𝑣𝑦 𝑑𝑡 = න
0
𝑡
𝑣𝑦 0 − 𝑔𝑡 𝑑𝑡
𝑦 𝑡 = 𝑦 0 + 𝑣𝑦 0 𝑡 −1
2𝑔𝑡2
![Page 8: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/8.jpg)
Boundary condition● In general, to completely solve a first order
differential equation for a function with single
variable, a boundary condition value must be
provided.
● Generalising such argument, two boundary
condition values must be supplied in order to
completely solve a second order differential
equation.
● n boundary condition values must be supplied in
order to completely solve a n-th order differential
equation.
● Hence, supplying boundary condition values are
necessary when numerically solving a differential
equation.
![Page 9: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/9.jpg)
Analytical solution of a free fall object in a viscous medium
● Boundary condition: v=0 at t = 0.
𝑚𝑑𝑣
𝑑𝑡= −𝑚𝑔 − η𝑣
න
𝑣 0
𝑣 𝑡𝑑𝑣
𝑑𝑡𝑑𝑡 = න
𝑣 0
𝑣 𝑡
𝑑𝑣 = න
0
𝑡
−𝑔 −η
𝑚𝑣 𝑑𝑡
⇒ න
𝑣 0 =0
𝑣 𝑡𝑑𝑣
−𝑔 −η𝑚𝑣
= න
0
𝑡
𝑑𝑡
⇒ 𝑣 𝑡 = −𝑚𝑔
η1 − exp
−η𝑡
𝑚
![Page 10: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/10.jpg)
Number of beta particles penetrating a
medium (recall your first year lab
experiments)𝑑𝑁
𝑑𝑥= −λ𝑁
න
𝑁0
𝑁𝑑𝑁
𝑁= −න
0
𝑥
λ 𝑑𝑥
𝑁 𝑥 = 𝑁0exp −λ𝑥
![Page 11: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/11.jpg)
Number of radioactive particle
remained after time t (recall your first
year lab experiments. t: half-life)
𝑑𝑁
𝑑𝑡= −
𝑁
τ
𝑁0
𝑁 𝑑𝑁
𝑁= −
0
𝑡 1
τ𝑑𝑡
𝑁 𝑡 = 𝑁0exp −𝑡
τ
![Page 12: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/12.jpg)
Relation of speed vs. displacement in SHM
𝐸 = 𝐾 + 𝑃 =1
2𝑚𝑣2 +
1
2𝑘𝑥2
⇒𝑑𝐸
𝑑𝑥=
𝑑
𝑑𝑥
1
2𝑚𝑣2 +
1
2𝑘𝑥2 = 0
⇒ 𝑚𝑑𝑣
𝑑𝑥= −𝑘𝑥
𝑣 𝑥 = 𝑣0 +𝑘𝑥0
2
2𝑚−
𝑘
2𝑚𝑥2
bondary condition: 𝑣 = 𝑣0 𝑎𝑡 𝑥 = 𝑥0
The solution is
![Page 13: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/13.jpg)
DSolve[ ]
Now, we would learn how to solve these first
order differential equations
DSolve[ ] (symbolically)
![Page 14: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/14.jpg)
14
![Page 15: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/15.jpg)
![Page 16: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/16.jpg)
16
![Page 17: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/17.jpg)
17
![Page 18: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/18.jpg)
18
![Page 19: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/19.jpg)
19
![Page 20: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/20.jpg)
20
![Page 21: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/21.jpg)
21
![Page 22: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/22.jpg)
22
![Page 23: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/23.jpg)
Second order differential equations
![Page 24: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/24.jpg)
![Page 25: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/25.jpg)
![Page 26: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/26.jpg)
![Page 27: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/27.jpg)
![Page 28: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/28.jpg)
Typical second order, non-
homogeneous ordinary differential
equationsn(x)
![Page 29: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/29.jpg)
Typical second order, non-
homogeneous ordinary differential
equationsn(x)
![Page 30: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/30.jpg)
Guess:
After some algebra
![Page 31: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/31.jpg)
![Page 32: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/32.jpg)
Use 𝐃𝐬𝐨𝐥𝐯𝐞 to solve examples 4.1, 4.2, 4.6
and 4.8 discussed in previous slides.
Print out the analytical expression of the
general solutions.
For those examples without specified
boundary conditions, impose your own choice
of boundary conditions, and then plot the
solutions.
32
![Page 33: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/33.jpg)
SIMPLE HARMONIC PENDULUM AS A SPECIAL CASE OF SECOND ORDER DE
Equation of motion (EoM)
Force on the pendulum
The period of the SHO is given by
g
lT 2
for small oscillation,
𝐹𝜃 = 𝑚𝑎𝜃
−𝑚𝑔𝑠𝑖𝑛𝜃=𝑚𝑑𝑣𝜃
𝑑𝑡= 𝑚
𝑑
𝑑𝑡
𝑑𝑟
𝑑𝑡≈ 𝑚
𝑑2
𝑑𝑡2𝑙𝜃
𝑑2𝜃
𝑑𝑡2≈ −
𝑔𝜃
𝑙
r
l
n(x)
![Page 34: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/34.jpg)
𝑑2𝜃(𝑡)
𝑑𝑡2= −
𝑔𝜃
𝑙
𝑥 ≡ 𝑡𝑢 𝑥 ≡ 𝜃(t)
𝑎 ≡ 0
𝑏 ≡𝑔
𝑙𝑛(𝑥) ≡ 0
n(x)
SIMPLE HARMONIC PENDULUM AS A SPECIAL CASE OF SECOND ORDER DE
![Page 35: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/35.jpg)
SIMPLE HARMONIC PENDULUM AS A SPECIAL CASE OF SECOND ORDER DE (CONT.)
Analytical solution:
𝑑2𝜃(𝑡)
𝑑𝑡2= −
𝑔𝜃
𝑙
Ω = 𝑔/𝑙 natural frequency of the pendulum;
𝜃0 and 𝜙 are constant determined by boundary conditions
![Page 36: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/36.jpg)
Drag force on a moving object, fd = - kv
Simple Harmonic pendulum with drag force as a special case of second order DE
𝑚𝑑2𝑟
𝑑𝑡2≈ 𝑚
𝑑2
𝑑𝑡2𝑙𝜃 = 𝑚𝑙
𝑑2𝜃
𝑑𝑡2
𝐹𝜃 = 𝑚𝑑2𝑟
𝑑𝑡2⇒
𝑑2𝜃
𝑑𝑡2= −
𝑔
𝑙𝜃 −
𝑘
𝑚
𝑑𝜃
𝑑𝑡≡ −
𝑔
𝑙𝜃 − 𝑞
𝑑𝜃
𝑑𝑡; 𝑞 ≡
𝑘
𝑚
fd
l
rv
mg
For a pendulum, instantaneous velocity
v = wl = l (dq/dt)
Hence, fd = - kl (dq/dt).
Consider the net force on the forced pendulum along the tangential direction, in the q 0 limit:
𝐹𝜃 = −𝑚𝑔sin𝜃 − 𝑘𝑙𝑑𝜃
𝑑𝑡≈ −𝑚𝑔𝜃 − 𝑘𝑙
𝑑𝜃
𝑑𝑡
![Page 37: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/37.jpg)
2
2;
d g d kq q
l dt mdt
q qq
Simple Harmonic pendulum with drag force as a special case of second order DE (cont.)
𝑥 ≡ 𝑡𝑢 𝑥 ≡ 𝜃(t)
𝑎 ≡ 𝑞
𝑏 ≡𝑔
𝑙𝑛(𝑥) ≡ 0
l
r
n(x)
fd
l
rv
mg
![Page 38: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/38.jpg)
Analytical solutions
2
/2 20 sin
4
the natural frequency of the system
qt qt e t
g
l
q q
1. Underdamped regime (small damping). Still
oscillate, but amplitude decay slowly over many
period before dying totally.
![Page 39: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/39.jpg)
Analytical solutions
22
2 4
0
qt qt
t eq q
2. Overdamped regime (very large damping),
decay slowly over several period before dying
totally. q is dominated by exponential term.
![Page 40: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/40.jpg)
Analytical solutions
3. Critically damped regime, intermediate between
under- and overdamping case.
20
qt
t Ct eq q
![Page 41: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/41.jpg)
2 4 6 8 10
0.2
0.1
0.1
0.2
Underdamped
Critically dampedOverdamped
2
/2 20 sin
4
qt qt e tq q
20
qt
t Ct eq q
22
2 4
0
qt qt
t eq q
![Page 42: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/42.jpg)
Assignment
Reproduce the overdamped, underdamed
and critically damped oscillators. To thid
end, you need to impose your own choice
of boundary conditions.
2 4 6 8 10
0.2
0.1
0.1
0.2
![Page 43: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/43.jpg)
ADDING DRIVING FORCE TO THE DAMPED
OSCILLATOR: FORCED OSCILLATOR
- kl (dq/dt) + FD sin(Dt)D frequency of
the applied
force
2 2 2
2 2 2
2 2
2 2
2
2
sin sin sin ;
;
sin
sin;
D D D D
D D
D D
d dF mg kl F t mg kl F t
dt dt
d r d dF m m l ml
d t dt dt
d r d dF m ml mg kl F t
dtd t dt
F td g d kq q
l dt ml mdt
q
q
q
q qq q
q qq
q qq
𝑚𝑑2𝑟
𝑑𝑡2
≈𝑚𝑑2𝑟
𝑑𝑡2
![Page 44: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/44.jpg)
FORCED OSCILLATOR: AN EXAMPLE OF
NON HOMOGENEOUS 2ND ORDER DE
2
2
sinD DF td g dq
l dt mldt
q qq
𝑥 ≡ 𝑡𝑢 𝑥 ≡ 𝜃(t)
𝑎 ≡ 𝑞
𝑏 ≡𝑔
𝑙
𝑛 𝑥 ≡𝐹𝐷sin 𝛺𝐷𝑡
𝑚𝑙
n(x)
![Page 45: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/45.jpg)
2
2
sinD DF td g dq
l dt mldt
q qq
202
0 02
20 0
0
sin2 ;
, ,2
D
D
F td d
dt mdt
g q FF
l l
q qw q w
w w
𝜉 is known as the damping ratio
![Page 46: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/46.jpg)
SOLUTION TO FORCED OSCILLATOR
https://en.wikipedia.org/wiki/Harmonic_oscillator
𝜃 𝑡 =𝐹0
𝑚𝑍𝑚Ω𝐷sin(𝜔𝑡 + 𝜙) ,
𝑍𝑚 = 2𝜔0𝜉 2 +1
𝜔𝐷2 𝜔0
2 − Ω𝐷2 2,
𝜙 = tan−12Ω𝐷𝜔0𝜉
Ω𝐷2 −𝜔0
2 + 𝑛𝜋 .
202
0 02
sin2
DF td d
dt mdt
q qw q w
Resonance occurs at Ω𝐷 = 𝜔𝑟 = 𝜔0 1 − 2𝜉2
![Page 47: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/47.jpg)
Assignment
Assume the following conditions:
𝜃 𝑡 = 0 = 0,𝑑𝜃
𝑑𝑡𝑡 = 0 = 0, 𝐹0 = 𝑚 = 𝑙 = 1. 𝑔 = 9.81,
𝜉 = 0
(i) Plot the solutions 𝜃(𝑡) for a forced, damped oscillator
on the same graph for 𝑡 running from 0 to 10𝑇,
where 𝑇 = 2𝜋𝜔0, for ΩD = 0.01𝜔0, 0.5𝜔0, 0.99𝜔0,
1.5𝜔0, 4𝜔0.
(ii) Repeat (i) for 𝜉 = 1/ 2
![Page 48: Lecture 3 Mathematica for Differential Equationscomsics.usm.my/.../ZCE111/1617SEM2/notes/Lecture_3.pdf · Lecture 3 Mathematica for Differential Equations. 2 Use Mathematica to find](https://reader033.vdocuments.site/reader033/viewer/2022042506/5f58d396da1e64134f31343e/html5/thumbnails/48.jpg)
Assignment
For a freely falling object subjected to a frictional
coefficient 𝜂, the equation of motion is
𝑚𝑑2𝑦
𝑑𝑡2= −𝑚𝑔 − 𝜂
𝑑𝑦
𝑑𝑡.
Solve this second order DE using 𝐃𝐒𝐨𝐥𝐯𝐞 , assume
𝑦 𝑡 = 0 = 0, 𝑣𝑦 𝑡 = 0 = 0,𝑚 = 1, 𝑔 = 9.81.
Plot the solutions 𝑦 𝑡 for 𝜂 = 0.1, 0.2, 0.5 on the same
graph. Your plots should be adjusted such that terminal
velocities in the solutions can be clearly displayed.