Lec #2 Notes - Electrical and Computer Engineering

Introduction to Audio and Music Engineering
Lecture 2
•  A few mathematical prerequisites
•  Limits and derivatives
•  Simple harmonic oscillators
•  Strings, Oscillations & Modes
1
Limits and Derivatives
f(x)
f(x0+∆x)
f(x0)
tangent
x0
x0+∆x
x
f(x0+∆x) - f(x0)
f(x0+∆x) - f(x0)
= Slope = x0+∆x – x0
∆x
Make ∆x à 0
lim∆ x →0
f (x 0 + ∆ x ) − f (x 0 )
∆x
d
≡
f (x )
dx
≡ f '(x 0 )
x0
3
f(x)
f(x0+∆x)
f(x0+∆x)
f(x0)
f’(x0)
tangent
x0+∆x
x0
x0+∆x
x
A few simple derivatives we will need …
d n
x = nx n −1
dx
d
Const = 0
dx
d
x =1
dx
Product rule:
d
sin(x ) = cos(x )
dx
d
cos(x ) = − sin(x )
dx
d x
e = ex
dx
d ⎡
f (x ) ⋅ g (x ) ⎤⎦ = f (x ) ⋅ g '(x ) + f '(x ) ⋅ g (x )
⎣
dx
d ⎡
x sin(x ) ⎤⎦ = x ⋅ cos(x ) + 1 ⋅ sin(x )
⎣
dx
Chain rule:
d
ax = a
dx
d ⎡
f (g (x )) ⎤⎦ = f '(g (x )) ⋅ g '(x )
⎣
dx
d ⎡
2 ⎤
2
sin(
x
)
=
cos(
x
) ⋅ 2x
⎣
⎦
dx
d ax
e = ae ax
dx
5
Question
What is the derivative w.r.t. x of: 2 x sin(2 x )
a)
b)
c)
d)
2 x cos(2 x )
2sin(2 x ) + 2 x cos(2 x )
2sin(2 x ) + 4 x cos(2 x )
2cos(2 x ) + 4 x sin(2 x )
6
What’s so special about e?
e = 2.71828 18284 59045 23536 02874 71352 66249 77572 47093 69995 … The only exponential function (ax) where the slope of
d x
x
e = e the function equals the value of the function at every
dx
point. Bacteria colony growth:
Let’s say that there is a colony of
bacteria growing in a petri dish and that the rate of increase of
the number of bacteria is 2 times the number already present.
How does the population grow over time? Let y(t) = number of bacteria at time t, and y(t=0) = N0 , (initial condition) d
y = 2⋅ y
dt
solution is …
and since y(t=0) = N0 à A = N0
y (t ) = N 0e
2t
# bacteria
then
y (t ) = Ae 2t
N0 0 time
7
sin(t)
Derivatives of sin, cos
d
sin(t ) = cos(t )
dt
cos(t)
d
cos(t ) = − sin(t )
dt
- sin(t)
(
)
(
)
d
− sin(t ) = − cos(t )
dt
- cos(t)
d
− cos(t ) = sin(t )
dt
F
A
m
k
x = 0 v = vmax
Simple Harmonic Oscillator
xmax
B
B
A
x(t) = xmaxsin(t)
C
E
t
x = xmax v = 0
-xmax
D
C
x = 0 v = - vmax
v(t) = vmaxcos(t)
vmax
A
D
B
x = -xmax v = 0
-vmax
E
x = 0 v = vmax D
E
t
C
9
Simple Harmonic Oscillator
m
k
x
d 2x
m 2 = −kx
dt
d 2x
k
=
−
x
2
m
dt
d
x = v , velocity
dt
d
v = a , acceleration
dt
Newton’s 2nd Law
F = ma
Hooke’s Law
d dx d 2x
≡
=a
2
dt dt
dt
F = -kx
k
let
ω 2 ≡
m
d 2x
2
, so
=
−
ω
x
2
dt
It works!
Can we find a function that satisfies this differential equation?
( )
x = x 0 sin ωt
( )
d
x = x 0ω cos ωt
dt
( )
so
x (t ) = x 0 sin ωt
( )
d2
2
x
=
−
x
ω
sin ωt
0
2
dt
where
ω ≡
k
m
10
Frequency and Period
m
k
( )
x (t ) = x 0 sin ωt
where
ω ≡
k
m
x
( )
Sine repeats every 2π sin ωt
t = T = Period
ωT = 2π
t
ωt = 2π
ωt = 0
2π
T =
ω
Period (seconds per cycle)
Frequency (cycles per second)
f =
Angular frequency
(radians per second)
1 ω
=
T 2π
Frequency
(cycles per second)
ω = 2π f
11
Question
What is approximate frequency (in Hertz) of a simple harmonic
oscillator of mass 1 kg with a spring constant of 9 Nts/m?
a)
b)
c)
d)
2 Hz
0.5 Hz
9 Hz
1/9 Hz
12
Other systems that display simple harmonic oscillation
Simple pendulum
l
g
ω≡
g
l
f ≡
1
2π
g
l
m
Helmholtz resonator
L
f =
S
surface
area
V
(volume)
Spring
S 2c 2
k =ρ
V
mass
m = ρSL
air density
c = sound velocity
1
2π
k
c S
=
m 2π VL
for …
c = 340 m/sec
S = π x 10-4 m2
V = 100 cc = 10-4 m3
L = 3 x 10-2 m
f = 500 Hz
13
Electrical Oscillator:
C
i
ω=
L
Capacitor
Inductor
“spring”
“mass”
1
f =
2π
1
LC
1
LC
Resonant
frequency
14