2017年2月23日 星期四

[基礎數學] 有限項次的雙重加總 (Finite Double Sums)

給定一組有限項次之數列 $\{a_k\}_{k=1}^n$ 可以表示為 $$\{a_k\}_{k=1}^n =  (a_1,a_2,...,a_n)$$我們知道  此數列之 加總總和 可以用級數 $\sum$ 符號簡潔的將其表示,比如說
\[
\sum_{k=1}^n a_k
\]但若我們考慮的數列為類似於 矩陣的陣列 (rectangular array),比如說
\[\begin{array}{*{20}{c}}
  {{a_{11}}}&{{a_{12}}}&{...}&{{a_{1n}}} \\
  {{a_{21}}}&{{a_{22}}}&{...}&{{a_{2n}}} \\
   \vdots &{}&{}&{} \\
  {{a_{m1}}}&{{a_{m2}}}&{...}&{{a_{mn}}}
\end{array}\]其中元素一般以 $a_{ij}$ 表示,$1 \leq i \leq m$ 且 $1 \leq j \leq n$。此時我們如何用級數表示此陣列之和?

基本想法:
首先我們可以先將 每一個橫列 之和計算出來:
\[\left( {\sum\limits_{j = 1}^n {{a_{1j}}} ,\sum\limits_{j = 1}^n {{a_{2j}}} ,...,\sum\limits_{j = 1}^n {{a_{mj}}} } \right)\]其中第 $1$個橫列之和為 ${\sum\limits_{k = 1}^n {{a_{1k}}} }$ 接著我們把前述這些橫列之和加總
\[\sum\limits_{j = 1}^n {{a_{1j}}}  + \sum\limits_{j = 1}^n {{a_{2j}}}  + ... + \sum\limits_{j = 1}^n {{a_{mj}}}  = \sum\limits_{i = 1}^m \left( {\sum\limits_{j = 1}^n {{a_{ij}}} } \right) \]當然如果我們把順序調換,先算直行之和在進行加總答案不變 (why?),故我們有
\[\sum\limits_{i = 1}^m {\sum\limits_{j = 1}^n {{a_{ij}}} }  = \sum\limits_{j = 1}^n {\sum\limits_{i = 1}^m {{a_{ij}}} } \]

現在我們來看一個簡單的例子:
============
Example 1:
(a) 試計算 $\sum_{i=1}^3 \sum_{j=1}^4 (i + a j)$ 其中 $a \in \mathbb{R}$。
(b) 試驗證 $ \sum\limits_{j = 1}^4 {\sum\limits_{i = 1}^3 {(i + aj)} }  = \sum\limits_{i = 1}^3 {\sum\limits_{j = 1}^4 {(i + aj)} } $
============

Proof (a):
\begin{align*}
  \sum\limits_{i = 1}^3 {\sum\limits_{j = 1}^4 {(i + aj)} } & = \sum\limits_{i = 1}^3 {\left( {(i + a1) + (i + a2) + (i + a3) + (i + a4)} \right)}  \hfill \\
   &= \sum\limits_{i = 1}^3 {\left( {4i + 10a} \right)}  \hfill \\
   &= \left( {\left( {4 + 10a} \right) + \left( {4\left( 2 \right) + 10a} \right) + \left( {4\left( 3 \right) + 10a} \right)} \right) \hfill \\
   &= 24 + 30a \;\;\;\; \square
\end{align*}

Proof:(b)
觀察
\begin{align*}
  \sum\limits_{j = 1}^4 {\sum\limits_{i = 1}^3 {(i + aj)} }  &= \sum\limits_{j = 1}^4 {\left( {(1 + aj) + (2 + aj) + (3 + aj)} \right)}  \hfill \\
   &= \sum\limits_{j = 1}^4 {\left( {6 + 3aj} \right)}  \hfill \\
   &= \left( {\left( {6 + 3a1} \right) + \left( {6 + 3a\left( 2 \right)} \right) + \left( {6 + 3a\left( 3 \right)} \right) + \left( {6 + 3a\left( 4 \right)} \right)} \right) \hfill \\
   &= 24 + 30a = \sum\limits_{i = 1}^3 {\sum\limits_{j = 1}^4 {(i + aj)} }  \;\;\;\; \square
\end{align*}


下面我們在看個稍微一點點變化的情況,假設今天我們的陣列為所謂三角陣列(triangular array) 如下
\[\begin{array}{*{20}{c}}
  {{a_{11}}}&{}&{}&{}&{} \\
  {{a_{21}}}&{{a_{22}}}&{}&{}&{} \\
  {{a_{31}}}&{{a_{32}}}&{{a_{33}}}&{}&{} \\
   \vdots &{}&{}& \ddots &{} \\
  {{a_{m1}}}&{{a_{m2}}}& \cdots & \cdots &{{a_{mm}}}
\end{array}\] 試證明 triangular table 之和可表為
\[
\sum_{i=1}^m \left ( \sum_{j=1}^i a_{ij} \right) \;\;\; (*)
\]或者
\[
\sum_{j=1}^m \left ( \sum_{i = j}^m a_{ij} \right)\;\;\;\; (\star)
\]Proof:
要證明 $(*)$,我們首先將 triangular array 每個橫列之和求出如下
\[\left( {{a_{11}},{a_{21}} + {a_{22}},...,{a_{m1}} + {a_{m2}}... + {a_{mm}}} \right) = \left( {\sum\limits_{j = 1}^1 {{a_{1j}}} ,\sum\limits_{j = 1}^2 {{a_{2j}}} ,...,\sum\limits_{j = 1}^m {{a_{mj}}} } \right)\]現在令
\[
b_i := \sum_{j=1}^i a_{ij}
\]則所有橫列之和等價為
\[\left( {\sum\limits_{j = 1}^1 {{a_{1j}}} ,\sum\limits_{j = 1}^2 {{a_{2j}}} ,...,\sum\limits_{j = 1}^m {{a_{mj}}} } \right) = \left( {{b_1}\;,{b_2},...,{b_m}} \right)\]則我們可知 $\sum\limits_{i = 1}^m {{b_i}} $即為 triangular array 之和,故現在觀察
\[\sum\limits_{i = 1}^m {{b_i}}  = \sum\limits_{i = 1}^m {\left( {\sum\limits_{j = 1}^i {{a_{ij}}} } \right)} \]此即 $(*)$。

接著我們證明 $(**)$,同前述證明,首先將 triangular array 每個直行之和求出如下
\[\left( {\sum\limits_{i = 1}^m {{a_{i1}}} ,\sum\limits_{i = 2}^m {{a_{i2}}} ,...,\sum\limits_{i = m}^m {{a_{im}}} } \right)\]現在令
\[{c_j}: = \sum\limits_{i = j}^m {{a_{ij}}} \]則所有直行之和等價為
\[\sum\limits_{j = 1}^m {{c_j}} : = \sum\limits_{j = 1}^m {\left( {\sum\limits_{i = j}^m {{a_{ij}}} } \right)} \]此即 $(**)$。 $\square$



FACT:
令 $a_{ij}$ 為 rectangular array
\[\begin{array}{*{20}{c}}
  {{a_{11}}}&{{a_{12}}}&{...}&{{a_{1n}}} \\
  {{a_{21}}}&{{a_{22}}}&{...}&{{a_{2n}}} \\
   \vdots &{}&{}&{} \\
  {{a_{m1}}}&{{a_{m2}}}&{...}&{{a_{mn}}}
\end{array}\]第 $i$ row, 第 $j$ column之元素。現在定義
\[
\bar{a} := \frac{1}{mn} \sum_{r=1}^m \sum_{s=1} a_{rs}, \;\;\; \bar{a}_j := \frac{1}{m} \sum_{r=1}^m a_{rj}
\]試證
\[
\sum_{r = 1}^m \sum_{s=1}^m (a_{rj} - \bar{a})(a_{sj} - \bar{a}) = m^2 (\bar{a}_j - \bar{a})^2
\]
Proof: omitted (easy to check)


2017年2月22日 星期三

[系統理論] 關於 Fourier Series 係數 之積分範圍的討論

首先回憶給定平滑有界之 週期訊號 $x(t)$ 且假設此訊號具有基本頻率 $f_0$ (亦即此訊號具有基本週期 $T_0 :=1/f_0$ ),那麼在 Fourier analysis 中我們說此訊號可以表示為
\[
x(t) = \sum_{k = -\infty}^\infty a_k e^{j 2 \pi f_0 k t }
\]且其對應的 Fourier Series 可由下列積分求得
\[
a_k := \frac{1}{T_0} \int_0^{T_0} x(t) e^{-j 2 \pi f_0 k t} dt \;\;\;\;\; (*)
\]

但事實上由於 $x(t)$ 為週期訊號,上述積分範圍可以為 任意單位週期長度 而不需拘泥於 $[0,T_0]$,一般而言,最常見到的另一種 Fourier Series coefficient 形式為 : \[{a_k} = \frac{1}{{{T_0}}}\int_{ - {T_0}/2}^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} \]事實上此式子與 $(*)$ 等價。 我們將此寫作以下 FACT:

===================
FACT:
給定平滑有界 週期訊號 $x(t)$ 表示為
\[
x(t) = \sum_{k = -\infty}^\infty a_k e^{j 2 \pi f_0 k t }
\]則其 Fourier Series 係數亦可表為
\[{a_k} = \frac{1}{{{T_0}}}\int_{ - {T_0}/2}^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} \]===================

Proof:
我們僅需證明
\[ \frac{1}{{{T_0}}}\int_{ - {T_0}/2}^{{T_0}/2} {x\left( t \right){e^{ - j2\pi {f_0}kt}}dt}  = \frac{1}{{{T_0}}}\int_0^{{T_0}} {x\left( t \right){e^{ - j2\pi {f_0}kt}}dt} \]故現在觀察左式,利用積分的線性性質:
\begin{align*}
  {a_k} &:= \frac{1}{{{T_0}}}\int_{ - {T_0}/2}^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt}\\
&  = \frac{1}{{{T_0}}}\left( {\int_{ - {T_0}/2}^0 {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \;\;\;\; (\star)
\end{align*}現在對第一項積分做變數變換,令 $u : = t + {T_0}$ 其中 $T_0:=1/f_0$ 則前述 $(\star)$ 中的第一項積分可改寫為
\begin{align*}
  {a_k} &= \frac{1}{{{T_0}}}\left( {\int_{ - {T_0}/2}^0 {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \hfill \\
   &= \frac{1}{{{T_0}}}\left( {\int_{{T_0}/2}^{{T_0}} {x\left( {u - {T_0}} \right){e^{ - j{2 \pi  f_0}k\left( {u - {T_0}} \right)}}du}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \hfill \\
   &= \frac{1}{{{T_0}}}\left( {\int_{{T_0}/2}^{{T_0}} {x\left( u \right){e^{ - j{2 \pi  f_0}k\left( u \right)}}\underbrace {{e^{j{2 \pi  f_0}k\left( {{T_0}} \right)}}}_{ = 1}du}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \hfill \\
   &= \frac{1}{{{T_0}}}\left( {\int_{{T_0}/2}^{{T_0}} {x\left( u \right){e^{ - j{2 \pi  f_0}k\left( u \right)}}du}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \hfill \\
   &= \frac{1}{{{T_0}}}\left( {\int_{{T_0}/2}^{{T_0}} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt}  + \int_0^{{T_0}/2} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} } \right) \hfill \\
   &= \frac{1}{{{T_0}}}\int_0^{{T_0}} {x\left( t \right){e^{ - j{2 \pi  f_0}kt}}dt} .
\end{align*}
讀者可注意到上述第三條等式成立之原因為 $x(t)$ 為週期訊號故 $x(t -T_0) = x(t)$$\square$