The discrete cosine transform (DCT) does not use complex numbers or negative frequencies.
DCT was derived by
K. R. Rao,
former UTA professor.
To illustrate DCT, Cosine Transform of a continuous function, f(x), is explained below:
A function, f(x), is defined over [0, 2 π].
Extend f(x) to [−2π, 0] and define ~f(x) as
~
f
(x) ≡
⎧ ⎪ ⎨
⎪ ⎩
f(x)
0 < x < 2π
f(−x)
−2π < x < 0
(1)
The
Fourier series
for ~f(x) over [−2π, 2π] is expressed as
~
f
(x) =
∞ ∑ k=−∞
~
F
k
e[(ikx)/2].
(2)
The Fourier coefficient, ~Fk, is expressed as
~
F
k
=
1
4π
⌠ ⌡
2π
−2π
~
f
(x) e−[(ikx)/2]dx.
(3)
It is possible to rewrite ~Fk without complex functions as
~
F
k
=
1
4π
⌠ ⌡
0
−2π
~
f
(x) e−[(ikx)/2]dx +
1
4π
⌠ ⌡
2π
0
~
f
(x) e−[(ikx)/2]dx
=
1
4π
⌠ ⌡
2π
0
~
f
(−x) e[(ikx)/2]dx +
1
4π
⌠ ⌡
2π
0
~
f
(x) e−[(ikx)/2]dx
=
1
4π
⌠ ⌡
2π
0
~
f
(x) (e[(ikx)/2]+e[(−ikx)/2]) dx
=
1
2π
⌠ ⌡
2π
0
~
f
(x) cos
kx
2
dx.
(4)
Note that
~
F
−k
=
~
F
k
.
(5)
Therefore, ~f(x) can be also rewritten without complex functions as
~
f
(x)
=
−1 ∑ k=−∞
~
F
k
e[(ikx)/2] +
~
F
0
+
∞ ∑ k=1
~
F
k
e[(ikx)/2]
=
∞ ∑ k=1
~
F
−k
e−[(ikx)/2] +
~
F
0
+
∞ ∑ k=1
~
F
k
e[(ikx)/2]
=
~
F
0
+
∞ ∑ k=1
~
F
k
(e−[(ikx)/2]+e[(ikx)/2])
=
~
F
0
+ 2
∞ ∑ k=1
~
F
k
cos
kx
2
.
(6)
Continuous Fourier Cosine Transform for f(x) over [0, 2π]
Dirac delta functions and Heaviside step functions
Definition of Dirac delta function
The definition of the Dirac delta function is
⌠ ⌡
∞
−∞
δ(x) f(x) dx = f(0),
(11)
i.e. δ(x) is defined by its action as an operator and is
therefore
different from ordinary functions. The Dirac delta function is
one of generalized functions (distributions, hyperfunctions)
that are used in physics extensively.
The Dirac delta function can be realized by the limit of
a sequence of functions defined as
wk(x) =
⎧ ⎪ ⎨
⎪ ⎩
k
2
|x| <
1
k
0
otherwise
(12)
⌠ ⌡
∞
−∞
wk(x) f(x) dx
=
⌠ ⌡
1/k
−1/k
k
2
f(x) dx
=
k
2
⌠ ⌡
1/k
−1/k
f(x) dx
=
k
2
⌠ ⌡
1/k
−1/k
⎛ ⎝
f(0)+ f′(0) x +
f"(0)
2!
x2 +
f"′(0)
3!
x3 +
f""(0)
4!
x4 + …
⎞ ⎠
dx
=
f(0) +
f"(0)
6
1
k2
+
f""(0)
120
1
k4
+ …
∼
f(0) ask → ∞.
(13)
By comparing Eq. (11) with Eq. (13), one can obtain
δ(x) =
lim k→ ∞
wk(x).
(14)
In physics, a point force at x=a with a magnitude of F can be expressed as
w = F δ(x−a).
(15)
Derivatives of delta functions
It is also possible to define derivatives of delta functions as distributions.
By using integrations by parts, one can start with
⌠ ⌡
∞
−∞
δ′(x) f(x) dx
=
[δ(x) f(x)]−∞∞−
⌠ ⌡
∞
−∞
δ(x) f′(x) dx
=
−f′(0).
(16)
So the action of δ′(x) is to (1) differentiate f(x), (2) evaluate f′(x) at x=0 and
(3) multiply by (−1).
To understand the physical meaning of δ′(x), consider a sequence of functions, mk(x),
defined as
If we replace the distributed load by the equivalent point force, the figure
of mk(x) can be seen as a moment (couple) as
It is thus seen that a point moment located at x=a with a magnitude of M1 can be
expressed by δ′(x) as
M = M1 δ′(x−a).
(20)
Higher order derivatives of δ(x) can be evaluated in a similar manner.
For instance, the second order derivative of δ(x), δ"(x), is
⌠ ⌡
∞
−∞
δ"(x) g(x) dx
=
⎡ ⎣
δ′(x) g(x) − δ(x) g′(x)
⎤ ⎦
∞ −∞
+
⌠ ⌡
∞
−∞
δ(x) g"(x) dx
=
g"(0),
(21)
in general
⌠ ⌡
∞
−∞
δ(n)(x) g(x) dx = (−1)ng(n)(0).
(22)
Heaviside step function
The Heaviside step function, H(x), is defined as
H(x) =
⎧ ⎪ ⎨
⎪ ⎩
0
x < 0
1
x > 0.
(23)
Obviously, H(x) is discontinuous at x=0 and in traditional calculus, the derivative
of H(x) at x = 0 does not exist. However, consider
⌠ ⌡
∞
−∞
H ′(x) g(x)dx
=
⎡ ⎣
H(x) g(x)
⎤ ⎦
∞ −∞
−
⌠ ⌡
∞
−∞
H(x) g′(x) dx
=
g(∞)−0 −
⌠ ⌡
∞
0
g′(x) dx
=
g(∞) −
⎡ ⎣
g(x)
⎤ ⎦
∞ 0
=
g(0).
(24)
where an integration by parts was used.
By comparing Eq. (24) with Eq. (11), one can find
H ′(x) = δ(x).
(25)
which implies that if one includes δ(x) in a group of functions, it is
possible to differentiate discontinuous functions as many times as needed.
Examples
(1)
g(x) δ(x) = g(0) δ(x).
(Proof)
⌠ ⌡
∞
−∞
⎛ ⎝
g(x) δ(x)
⎞ ⎠
f(x) dx
=
⌠ ⌡
∞
−∞
δ(x)
⎛ ⎝
g(x) f(x)
⎞ ⎠
dx
=
g(0) f(0).
(26)
On the other hand,
⌠ ⌡
∞
−∞
⎛ ⎝
g(0) δ(x)
⎞ ⎠
f(x) dx
=
⌠ ⌡
∞
−∞
δ(x)
⎛ ⎝
g(0) f(x)
⎞ ⎠
dx
=
g(0) f(0).
(27)
(2)
x δ′(x) = − δ(x).
(Proof)
⌠ ⌡
∞
−∞
⎛ ⎝
x δ′(x)
⎞ ⎠
f(x) dx
=
⌠ ⌡
∞
−∞
δ′(x)
⎛ ⎝
xf(x)
⎞ ⎠
dx
=
−
d
dx
(xf(x)) |x=0
=
− ( f(x)+ xf′(x))|x=0
=
− f(0).
(28)
On the other hand,
⌠ ⌡
∞
−∞
⎛ ⎝
−δ(x)
⎞ ⎠
f(x) dx = − f(0).
(29)
(3)
x2 δ"(x) = 2 δ(x).
(Proof) (skipped)
(4)
d4
dx4
|x|3 = 12 δ(x).
(Proof) Shown in class.
(5)
d
dx
|x| = 2 H(x)−1.
(Proof)
Noting that
|x| = xH(x) − xH(−x).
(30)
(Explanation) If x > 0, H(−x)=0 and H(x)=1 so xH(x)=x.
If x < 0, H(x)=0 and H(−x)=1 so −xH(−x)=−x.
d
dx
|x|
=
H(x) + xδ(x) − H(−x) −(−1) x δ(−x)
=
2H(x)−1 + 2x δ(x),
(31)
where
H(−x) = 1− H(x),
(32)
and the fact that δ(x)=δ(−x)
was used.
It should be noted that
x δ(x) = 0,
(33)
as
⌠ ⌡
∞
−∞
⎛ ⎝
x δ(x)
⎞ ⎠
g(x) dx
=
⌠ ⌡
∞
−∞
δ(x)
⎛ ⎝
xg(x)
⎞ ⎠
dx
=
xg(x)|x=0
=
0,
(34)
so
d
dx
|x| = 2H(x)−1.
(35)
This conclusion can be also obtained geometrically (try!).
Integration of singularity functions
⌠ ⌡
x
−∞
δ(x−a) dx
=
H(x−a)
(36)
⌠ ⌡
x
−∞
H(x−a) dx
=
(x − a) H(x−a)
(37)
⌠ ⌡
x
−∞
(x−a) H(x−a) dx
=
(x−a)2
2
H(x−a)
(38)
⌠ ⌡
x
−∞
(x−a)2H(x−a) dx
=
(x−a)3
3
H(x−a)
(39)
…
(40)
In general,
(x−a)nH(x−a) =
⎧ ⎪ ⎨
⎪ ⎩
0
x < a
(x−a)n
x > a
(41)
i.e. the function, (x−a)nH(x−a), is identically 0 when
the argument, x−a, is negative.
Beam loading
Example
A cantilevered beam is subject to a partially distributed load starting at x=a. The problem is
to find the reaction force and the point moment at x=0.
First we can assume that all the unknown quantities, i.e. R1 and M1, are
positive, i.e. the directions shown in the figure.
Once we can express q(x) using the singularity functions, V(x) and M(x) can be
automatically expressed by integrating each singular function as
q(x)
=
M1 δ′(x) + R1 δ(x) − wH(x−a),
(42)
V(x)
=
M1 δ(x) + R1H(x) − w (x−a) H(x),
(43)
M(x)
=
M1H(x) + R1xH(x) − w
(x−a)2
2
H(x−a).
(44)
Substitute x=l+ϵ where ϵ is a small number, i.e.
we are looking at a point a little bit right to the end of the beam.
Since there is no beam material at x=l+ϵ, both M(x) and
V(x) should be zero. So Eqs. (43, 44) become
0
=
M1 ×0 + R1 ×1 − w (l−a)
(45)
0
=
M1 ×1 + R1 ×l− w
(l−a)2
2
(46)
Note that δ(x)|x→ l = 0 and
H(x)|x→ l = 1 etc.... Eqs. (45,
46) can be solved to yield
R1
=
w (l−a)
(47)
M1
=
−
w
2
(l+a)(l−a)
(48)
The result of Eq. (48) implies that the correct sign of
M1 is ccw.
It is noted that Eq. (45) is the balance-of-force equation while
Eq. (46) is the balance-of-moment equation
Footnotes:
1Ahmed, N., Natarajan, T. and Rao, K. R. "Discrete Cosine Transform," IEEE Transactions on Computers,
C-23 (1): 90-93, doi:10.1109/T-C.1974.
File translated from
TEX
by
TTH,
version 4.03. On 13 Nov 2024, 14:09.