Recall that the total energy of a system is:
E
=
K
E
+
P
E
=
K
+
U
E
=
K
E
+
P
E
=
K
+
U
We
also know that the kinetic energy is

K
=
1
2
m
v
2
K
=
1
2
m
v
2
But
what is
U
U
?
For a conservative Force
(
∮
F
⃗
d
x
⃗
=
0
∮
F
⃗
d
x
⃗
=
0
)
- eg. gravity, electrical... (no friction) we know that the work done by an
external force is stored as
U
U
.
For the case of a mass on a spring, the external force is opposite the spring
Force (That is it has the opposite sign from the spring force).:
F
e
x
t
=
k
x
F
e
x
t
=
k
x
(i.e.
This is the force you use to pull the mass and stretch the spring before
letting go and making it oscillate.)

Thus
U
=
∫
0
x
k
x
ⅆ
x
=
1
2
k
x
2
U
=
∫
0
x
k
x
ⅆ
x
=
1
2
k
x
2
This
gives:
E
=
1
2
m
v
2
+
1
2
k
x
2
=
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
E
=
1
2
m
v
2
+
1
2
k
x
2
=
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
It is important to realize that any system that is represented by
either of these two equations below represents oscillating system
m
ⅆ
2
x
ⅆ
t
2
+
k
x
=
0
m
ⅆ
2
x
ⅆ
t
2
+
k
x
=
0
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
=
E
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
=
E

To calculate the energy in the system it is helpful to take advantage of the
fact that we can calculate the energy at any point in x. For example in the
case of the simple harmonic oscillator we have
that:
x
=
A
e
i
(
ω
t
+
α
)
x
=
A
e
i
(
ω
t
+
α
)
We
can choose
t
t
such
that
x
=
A
x
=
A
Now remember that when I write
x
=
A
e
i
(
ω
t
+
α
)
x
=
A
e
i
(
ω
t
+
α
)
I
"really" (pun intended) mean
x
=
R
e
[
A
e
i
(
ω
t
+
α
)
]
x
=
R
e
[
A
e
i
(
ω
t
+
α
)
]
Likewise
then
x
˙
=
R
e
[
i
ω
A
e
i
(
ω
t
+
α
)
]
x
˙
=
R
e
[
i
ω
A
e
i
(
ω
t
+
α
)
]

At the point in time where
x
=
A
x
=
A
this gives us
x
˙
=
R
e
[
i
ω
A
]
=
0
x
˙
=
R
e
[
i
ω
A
]
=
0
Thus
at that point in time we have
x
˙
=
0
x
˙
=
0
.
We can now substitute that and
x
=
A
x
=
A
into
E
=
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
E
=
1
2
m
(
ⅆ
x
ⅆ
t
)
2
+
1
2
k
x
2
we obtain
E
=
1
2
k
A
2
E
=
1
2
k
A
2
This is an important point. The energy in the
oscillator is proportional to the amplitude squared!

Comments:"This book covers second year Physics at Rice University."