\chapter{Elements of Probability}
\label{Appendix_A}
\section{Basic Definitions}
	\begin{definition}
		A probability measure $\mathbb{P}$ on a measurable space $(\Omega, \mathcal{F})$ is a function from $\mathcal{F}$ to $[0, 1]$ such that
			\begin{itemize}
				\item
				$\mathbb{P} (\emptyset) = 0$, and $\mathbb{P} (\Omega) = 1$.
				\item
				If $\{ A_n \}_{n \geq 1} \in \mathcal{F}$ and $A_i \cap A_j \neq \emptyset$ if $i \neq j$, then $\mathbb{P} (\cup^{\infty}_{n=1} A_n) = \sum^{\infty}_{n = 1} \mathbb{P} (A_n)$.
			\end{itemize}
	\end{definition}

	\noindent A $\sigma$-algebra on a set $X$ is a collection of subsets of $X$ that includes the empty subset and is closed under complement and under countable unions. Denote $\sigma (D) = \cap \{ H : H \text{ is a } \sigma \text{-algebra of } \Omega, D \subseteq H \}$. We call $\sigma (D)$ a $\sigma$-algebra generated by $D$.

	\begin{definition}
		A triple  $(\Omega, \mathcal{F}, \mathbb{P})$ is called a probability space if
		\begin{itemize}
			\item
			$\Omega$ is a sample space which is a collection of all samples.
			\item
			$\mathcal{F}$ is a $\sigma$-algebra on $\Omega$.
			\item
			$\mathbb{P}$ is a probability measure on $(\Omega, \mathcal{F})$.
		\end{itemize}
	\end{definition}

	\noindent On a given probability space $(\Omega, \mathcal{F}, \mathbb{P}) (\Omega = \mathbb{R})$, if a cumulative distribution function of a random variable $X$ is normal, i.e.,
	\begin{align}
		\mathbb{P} (X < x) = \displaystyle \int_{-\infty}^{x} \frac{1}{ \sigma \sqrt{2 \pi} } e^{-\frac{(y - \mu)^2}{2 \sigma^2}} dy, \hspace{2mm} \sigma > 0,
	\end{align}
	then the random variable $X$ is called a Gaussian (normal) random variable on the probability space $(\Omega, \mathcal{F}, \mathbb{P})$. Here $X$ is completely characterized by its mean $\mu$ and its standard deviation $\sigma$. We denote $X \sim \mathcal{N} (\mu, \sigma^2)$. The probability density function of $X$ is
	\begin{align*}
		p(x) = \frac{1}{\sigma \sqrt{2 \pi}} e^{-\frac{(x - \mu)^2}{2 \sigma^2}}.
	\end{align*}

	\noindent When $\mu = 0$ and $\sigma = 1$, we call $X$ a standard Gaussian (normal) random variable.

	\begin{definition}
		A probability space $(\Omega, \mathcal{F}, \mathbb{P})$ is said to be a complete probability space if for all $B ∈\in \mathcal{F}$ with $\mathbb{P} (B) = 0$ and all $A \subseteq B$ one has $A \in \mathcal{F}$.
	\end{definition}

	\begin{definition}
		If $(\Omega, \mathcal{F}, \mathbb{P})$ is a given probability space then a function $Y : \Omega \rightarrow \mathbb{R}^n$ is called $\mathcal{F}$-measurable if $Y^{-1} (U) = \{ w \in \Omega : Y(w) \in U \} \in \mathcal{F}$ holds for all open sets $U \in \mathbb{R}^n$. If $X : \Omega \rightarrow \mathbb{R}^n$ is a function, then $\sigma (X)$ is the smallest $\sigma$-algebra on $\Omega$ containing all the sets $X^{-1} (U)$ for all open sets $U$ in $\mathbb{R}^n$.
	\end{definition}

	\begin{definition}
		Suppose that $(\Omega, \mathcal{F}, \mathbb{P})$ is a given complete probability space. A random variable $X$ is an $\mathcal{F}$-measurable function $X : \Omega \rightarrow \mathbb{R}^n$.
	\end{definition}

	\noindent Its well known that every random variable induces a probability measure $\mu_X$ (distribution of $X$) on $\mathbb{R}_n$ given by
	\begin{align*}
		\mu_X (B) = \mathbb{P} (X^{-1} (B)).
	\end{align*}
	If $ \int_{\Omega} | X(w) | d \mathbb{P} (w) < \infty$, the expectation of $X$ w.r.t. $\mathbb{P}$ is defined by
	\begin{align*}
		\mathbb{E} [X] = \int_{\Omega} X(w) d \mathbb{P} (w) = \int_{\mathbb{R}^n} x d \mu_X (x).
	\end{align*}
	Also the $p$-th moment of $X$ is defined as (if the integrals are well defined)
	\begin{align*}
		\mathbb{E} [X^p] = \int_{\Omega} X^p d \mathbb{P} (w) = \int_{\mathbb{R}^n} x^p d \mu_X (x).
	\end{align*}
	The centered moments are defined by $\mathbb{E} \left[ |X - \mathbb{E}[X]| \right]$, $p = 1, 2, \dots, $. When
	$p = 2$, the centered moment is also called the variance. \\

	\begin{definition}
		Let $(\Omega, \mathcal{F}, \mathbb{P})$ be a probability space and let $T \subseteq \mathbb{R}$ be
		time. A collection of random variables $X_t$ , $t \in T$ with values in $\mathbb{R}$ is called a
		stochastic process. If time is an interval, $\mathbb{R}^+$ or $\mathbb{R}$, it is called a stochastic process with continuous time. For any fixed $w \in \Omega$, one can regard $X_t (w)$ as a function of
		$t$ (called a sample function of the stochastic process).
	\end{definition}

	\noindent On a probability space $(\Omega, \mathcal{F}, \mathbb{P})$, a filtration refers to an increasing sequence of $\sigma$-algebras:
	\begin{align*}
		\mathcal{F}_0 \subseteq \mathcal{F}_1 \subseteq \mathcal{F}_2 \subseteq \cdots \subseteq \mathcal{F}_n \subseteq \cdots .
	\end{align*}

	\noindent A natural filtration (w.r.t. $X$) is the smallest $\sigma$-algebra that contains
	information of $X$. It is generated by $X$ and $\mathcal{F}^X_n = \sigma(X_1, \dots, X_n)$ with $\mathcal{F}^X_0 = \{\emptyset, \Omega \}$. If $\lim_{n \rightarrow \infty} \mathcal{F}_n \subseteq \mathcal{F}$, then we call $(\Omega, \mathcal{F}, \{ \mathcal{F}_n \}_{n \geq 1}, \mathbb{P})$ a filtered probability space. A stochastic process $\{X_n \}$ on a filtered probability space is an adapted process if $X_n$ is $\mathcal{F}_n$-measurable for each $n$.

	\begin{definition}
		A family of sub-$\sigma$-algebras $\mathcal{F}_t \subseteq \mathcal{F}$ indexed by $t \in [0, \infty)$ is called a filtration if it is increasing $\mathcal{F}_s \subseteq \mathcal{F}_t$ when $0 \leq s \leq t < \infty$.
	\end{definition}

	\begin{definition}
		A collection of random variables is called a Gaussian process, if the joint distribution of any finite number of its members is Gaussian. In other words, a Gaussian process is a $\mathbb{R}^d$-valued stochastic process with continuous time (or with index) $t$ such that $\left(X(t_0), X(t_1), \dots, X(t_n) \right)^T$ is a $(n+1)$-dimensional Gaussian random vector
		for any $0 \leq t_0 < t_1 < \cdots < t_n$. The Gaussian process is denoted as $X = \{X(t)\}_{t \in I}$ where $I$ is a set of indexes.
	\end{definition}

	\begin{definition}
		\label{brownian_motion}
		 A continuous time stochastic process $W(t)$ is called a standard Brownian motion if
		\begin{itemize}
			\item
			$W(t)$ is almost surely continuous in $t$, and $W(0) = 0$.
			\item
			$W(t)$ has independent increments $W(t_{i+1}) - W(t_i)$ for all $t_n \geq 0$, $i = 0, 1, \dots, n$.
			\item
			$W(t) - W(s) \sim \mathcal{N} (0, t-s)$, i.e., obeys the normal distribution with mean zero and variance $t - s$.
		\end{itemize}
	\end{definition}

	\noindent Set $x \in D \subset \mathbb{R}^d$, we define infinite dimensional Gaussian processes as follows
	\begin{align*}
		W^Q (x, t) = \displaystyle \sum^{\infty}_{j = 1} \sqrt{q_j} e_j (x) W_j (t),
	\end{align*}
	where $W_j (t)$ are mutually independent Brownian motions. Here $q_j \geq 0$, $j \in \mathbb{N}^d$ and $\{ e_j (x) \}$ is an orthonormal basis in $L^2 (D)$.  The following expansion is usually considered in literature:
	\begin{align*}
		\dot{W}^Q (x, t) = \displaystyle \sum^{\infty}_{j = 1} \sqrt{q_j} e_j (x) \dot{W}_j (t).
	\end{align*}
	where $\dot{W}_j (t) =\frac{d}{dt} W$, is formally the first-order derivative of $W_j (t)$ in time. When $q_j = 1$ for all $j$, we have a space-time white noise, and if $\sum^{\infty}_{j = 1} \sqrt{q_j}$ is called a $Q$-Wiener process. \\

	\noindent The Brownian motion and white noise can also be defined in terms of orthogonal expansions. Suppose that $\{e_j (t)\}_{j \geq 1}$ is a complete orthonormal system in $L^2 ([0, T ])$, then the Brownian motion $W(t)$ can be defined by
	\begin{align}
	    W(t) = \displaystyle \sum_{j=1}^{\infty} \beta_j \int_{0}^{t} e_j (s) ds, \hspace{2mm} t \in [0, T],
	\end{align}
	where $\beta_j$ are mutually independent standard Gaussian random variables for each $j$, and it can be also checked that is indeed a standard Brownian motion. Correspondingly, the white noise is defined by
	\begin{align}
	    \dot{W}(t) = \displaystyle \sum_{j=1}^{\infty} \beta_j e_j (t), \hspace{2mm} t \in [0, T].
    \end{align}

	\begin{definition}
		\label{cylindrical}
		Let $\{e_j\}_{j \geq 1}$ be a complete orthonormal  system of a separable Hilbert space $\mathcal{H}$, and $T \in \mathbb{R}^+$, and $\{\beta_j (t)\}_{j \geq 1}$ be an independent and identically distributed sequence of Brownian Motions. Then a cylindrical Wiener process $W$ in $\mathcal{H}$ is given by
		\begin{align*}
			W(t) = \displaystyle \sum_{j=1}^{\infty} \beta_j e_j (t)
		\end{align*}
	\end{definition}

	\section{Some Important Results in Probability Spaces}

	It is well known that the Hermite Polynomials $\{P_k (\dot) \}_{k \in \mathbb{N}}$ with $P_0 = 1$ is a complete orthonormal system for $L_2 (\mathbb{R}, \mu_1 (dx))$ with $\mu_1 (dx) = \frac{1}{\sqrt{2 \ pi}} e^{- \frac{x^2}{2}} dx$, which are defined by
	\begin{align}
		\label{hermite_polynomials}
		P_k(x) = \frac{(-1)^k}{(k!)^{1/2}} e^{\frac{x^2}{2}} \frac{d^k}{dx^k} e^{-\frac{x^2}{2}}, \hspace{3mm} x \in \mathbb{R}
	\end{align}

	A functional $\Phi: \mathcal{H} \longrightarrow  \mathbb{R}$, is said to be a smooth simple functional (or a cylinder functional) if there exists a $C^{\infty} $-function $\varphi$ on $\mathbb{R}^n$ and $n$-continuous linear functional $l_1 ,\cdots ,l_n$ on $\mathcal{H}$ such that for $h \in \mathcal{H}$
	\begin{align*}
		\Phi(h) = \phi(h_1, \cdots, h_n) \hspace{2mm} \text{where} \hspace{2mm} h_i = l_i (h), \hspace{2mm} i = 1, \cdots, n.
	\end{align*}

	Let $\mathbb{H} = L_2 (\mathcal{H}, \mu)$ denote the Hilbert space of Borel measurable functionals on the probability space with inner product
	\begin{align}
		\label{Inner_Functionals}
		\langle \Phi, \Psi \rangle_{\mathbb{H}} = \displaystyle \int_{\mathcal{H}} \Phi (v) \Psi (v) \mu (dx), \hspace{2mm} \Phi, \Psi \in \mathbb{H},
	\end{align}
	and the norm $\| \Phi \|_{\mathbb{H}} = \langle \Phi, \Phi\rangle_{\mathbb{H}}^{1/2}$. In $\mathcal{H}$ we choose a basis system $\{\varphi_k \}$ such that $\varphi_k \in \mathcal{H}$.\\

	Let $\Lambda$ an operator such that $Tr < +\infty$. We will denote as $\mathcal{H}_0$ the Hilbert subspace of $\mathcal{H}$ with inner product $\langle g, h \rangle_0 = \langle \Lambda^{1/2} g, \Lambda^{1/2} h \rangle_{\mathcal{H}}$ for $g, h \in \Lambda^{1/2} \mathcal{H}$, which is the completion of $\Lambda^{1/2} \mathcal{H}$ with respect to the norm $\| g \|_0 = \langle g, g \rangle^{1/2}$, and also is dense in $\mathcal{H}$. Then, by using the above can be defined The Hermite functional as follows
	\begin{align}
	\label{hermite_funcionals}
		H_n(h) = \prod_{i=1}^{\infty} P_{n_i} (l_i (h)), h \in \mathcal{H}_0 , n \in J
	\end{align}
	with
	\begin{equation*}
		l_i (h) = \left\langle h, \Lambda^{-1/2} \varphi_i \right\rangle_{\mathcal{H}}, \hspace{3mm} i = 1,2 \cdots
	\end{equation*}
	and the set $\mathcal{J}$ is given by
	\begin{align}
	\label{Conjunto_J}
		\mathcal{J} = \{\alpha = (\alpha_i,i \geq 1) | \alpha_i \in \mathbb{N}\cup {0}, |\alpha|:= \displaystyle \sum _{i = 0}^{\infty}\alpha_i < \infty\}
	\end{align}

	\begin{lemma}
	\label{dense}
		For $h \in \mathcal{H}$ let $l_i (h) = (h, \Lambda^{-1/2} \varphi_i )_{\mathcal{H}}$, $i=1, 2, \cdots$. Then the set $\{H_n \}$ of all Hermite polynomials on $\mathcal{H}$ forms a complete orthonormal system for $\mathbb{H}$. Hence the set of all functionals are dense in $\mathbb{H}$. Moreover, we have the direct sum decomposition:
		\begin{align*}
		\mathbb{H} = \displaystyle \bigoplus^{\infty}_{j=0} K_j,
		\end{align*}
		where $K_j$ is the subspace of $\mathbb{H}$ spanned by $\{H_n : |n| = j \}$. This result can be found in \cite{DAPRATO1994}.
	\end{lemma}

	\begin{lemma}
		\label{eigen}
		Let $H_n (h)$ be a Hermite polynomial functional given by (\ref{hermite_funcionals}), and suppose that the operator $-A$ have eigenfunctions $e_k$ with eigenvalues $\lambda_k$. Then the operator given in (\ref{operator_L}) satisfies the following
		\begin{align}
			\label{eigen_lambda_kolmo}
			\mathcal{L} H_n (h) = - \lambda_n H_n (h)
		\end{align}
		for any $n \in \mathcal{J}$ and $H_n \in \mathcal{H}$, where
		\begin{align*}
			\lambda_n = \displaystyle \sum_{k=1}^{\infty} n_k \lambda_k
		\end{align*}
	\end{lemma}


\subsection{Surface area}
Let $S$ be a surface parameterized by $x$ and $y$.
That is, let $S=(x,y,z)$ where $z=f(x,y)$.
The tangent lines at a point on $S$ form a tiny parallelogram.
The area $a$ of the parallelogram is given by the magnitude of the cross product.
$$a=\left|{\partial S\over\partial x}\times{\partial S\over\partial y}\right|$$
By summing over all the parallelograms we obtain the total surface area $A$.
Hence
$$A=\int\!\!\!\int dA=\int\!\!\!\int a\,dx\,dy$$
The following example computes the surface area of a unit disk
parallel to the $xy$ plane.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
z = 2
S = (x,y,z)
a = abs(cross(d(S,x),d(S,y)))
defint(a,y,-sqrt(1-x^2),sqrt(1-x^2),x,-1,1)
\end{Verbatim}

$\displaystyle \pi$

The result is $\pi$, the area of a unit circle, which is what we expect.
The following example computes the surface area of $z=x^2+2y$ over
a unit square.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
z = x^2+2y
S = (x,y,z)
a = abs(cross(d(S,x),d(S,y)))
defint(a,x,0,1,y,0,1)
\end{Verbatim}

$\displaystyle \frac{3}{2}+\frac{5}{8}\log(5)$

The following exercise is from
{\it Multivariable Mathematics} by Williamson and Trotter, p. 598.
Find the area of the spiral ramp defined by
$$S=\begin{bmatrix}u\cos v\\\ u\sin v\\ v\end{bmatrix},\qquad 0\le u\le1,\qquad 0\le v\le3\pi$$
%The coordinates $x$, $y$ and $z$ are
%functions of the parameter space $(u,v)$.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
x = u*cos(v)
y = u*sin(v)
z = v
S = (x,y,z)
a = abs(cross(d(S,u),d(S,v)))
defint(a,u,0,1,v,0,3pi)
\end{Verbatim}

$\displaystyle \frac{3}{2}\pi\log(1+2^{1/2})+\frac{3\pi}{2^{1/2}}$

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
float
\end{Verbatim}

$\displaystyle 10.8177$


\subsection{Matrix additon and multiplication}

\subsubsection{Matrix multiplication}

\(A=A^{mn}\)

\(B=B^{no}\)

\(C=C^{mo}=A.B\)

\(c_{ij}=\sum_{r=1}^na_{ir}b_{rj}\)

Matrix multiplication depends on the order. Unlike for real numbers,

\(AB\ne BA\)

Matrix multiplication is not defined unless the condition above on dimensions is met.

A matrix multiplied by the identity matrix returns the original matrix.

For matrix \(M=M^{mn}\)

\(M=MI^m=I^nM\)

\subsubsection{Matrix addition}

\(2\) matricies of the same size, that is with idental dimensions, can be added together.

If we have \(2\) matrices \(A^{mn}\) and \(B^{mn}\)

\(C=A+B\)

\(c_{ij}=a_{ij}+b_{ij}\)

An empty matrix with \(0\)s of the same size as the other matrix is the identity matrix for addition.

\subsubsection{Scalar multiplication}

A matrix can be multiplied by a scalar. Every element in the matrix is multiplied by this.

\(B=cA\)

\(b_{ij}=ca_{ij}\)

The scalar \(1\) is the identity scalar.


\subsection{Sampling from multi-variate normal distributions with arbitrary correlations}

The multi-variate distribution is given by:

\begin{equation}
p(\bar{x}) = {1\over{(2\pi)^{k/2}{|\tilde{C}|}^{1/2}}}\,{\exp{-{1\over{2}}{(\bar{x} - \bar{\mu})^T\tilde{C}^{-1}{(\bar{x} - \bar{\mu})}}}}
\end{equation}

If we write out the terms of the exponent $M \equiv (\bar{x} - \bar{\mu})^T\tilde{C}^{-1}(\bar{x} - \bar{\mu})$
we have:

\begin{equation}
M = {x_k}^2 C_{kk} - 2x_k\mu_kC_{kk} + 2\sum_{i \neq k}{x_k(x_i - \mu_i)C_{ki}} + C_{kk}B_k
\end{equation}

where $B_k/C_{kk}$ represents all terms that don't depend on $x_k$. If we rewrite this as:

\begin{eqnarray}
M &=& C_{kk}{x_k}^2 + C_{kk}x_k\left(2\sum_{i \neq k}{(x_i - \mu_i)C_{ki}/C_{kk} - 2\mu_k}\right) + C_{kk}B_k\\
  &=& C_{kk}{x_k}^2 + C_{kk}x_kA_k + C_{kk}B_k\\
  &=& C_{kk}\left({x_k}^2 + x_kA_k + A_k^2/4\right) + C_{kk}\left(B_k - A_k^2/4\right) \\
  &=& C_{kk}\left(x_k + A_k/2\right)^2 + C_{kk}\left(B_k - A_k^2/4\right)
\end{eqnarray}

we see that if $\mu_k^\prime \equiv -A_k/2$, the exponent can be written, up to a constant factor, as:

\begin{equation}
M_k = C_{kk}\left(x_k - \mu_k^\prime\right)^2.
\end{equation}

We see then that up to a normalization, the conditional distribution for
$x_k$, $p(x_k|\{x_{i\neq k}\})$ is simply given by a univariate gaussian
with:

\begin{eqnarray}
\mu_k^\prime &=& -A_k/2 \\
\sigma_k   &=& 1/\sqrt{C_{kk}}
\end{eqnarray}

Our prescription for generating samples from the joint distribution is
then to Gibbs sample from the univariate conditional distributions,
starting from a random point, and iterating each time from the
previous point.  The result is itself a Markov chain which
collectively represents an unbiased sample from the joint
distribution.


\subsection{Sets}
\begin{definition}
	A set $A$ is a collection of distinct elements. Those elements can be anything, like numbers, functions, and even other sets.
\end{definition}
We can define a set by giving its elements, like $A = \{-2, 5, 3\}$ or by describing its properties, like $A = \{x \mid x > 0\}$ where the vertical bar means ``such that''.
If an object $x$ is a member of the set $A$, we write $x\in A$.\bigskip

\noindent
A set $A$ is called a subset of a set $B$ if every element of $A$ is also an element of $B$.
We can write this as $A \subseteq B$.
For example, $\{7, 10, 16\} \subseteq \{5, 6, 7, 9, 10, 11, 16\}$.
Note that this relation can be strict if there exists at least one element in $B$ that is not also an element of $A$.
Some common sets and their informal definitions are given below:

\begin{table}[H]
	\centering
	\begin{tabular}{c|c|c}
		Set Name & Symbol & Informal Definition                                                                                \\ \hline
		Natural numbers & $\mathbb{N}$ & $\{1, 2, 3, \dots\}$           						                                                               \\
		Integers & $\mathbb{Z}$ & $\{\dots, -3, -2, -1, 0, 1, 2, 3, \dots\}$                                                                                \\
		Rational numbers & $\mathbb{Q}$ & $\{\frac{m}{n} \mid m,n \in\mathbb{Z}$ and $n \neq 0\}$                                                                       \\
		Real numbers & $\mathbb{R}$ & Any number on the number line\footnote{Sadly, there is no way to give a stronger formal definition without higher mathematics.}   \\
	\end{tabular}
\end{table}

This means that $\mathbb{N} \subset \mathbb{Z} \subset \mathbb{Q} \subset \mathbb{R}$.\bigskip

\noindent
There are several common operations that can be performed on sets.
The union $A \cup B$ of two sets $A$ and $B$ is the set of all elements that are elements of $A$ or of $B$.
Similarly, the intersection $A \cap B$ of two sets $A$ and $B$ is the set of all elements that are also elements of both $A$ and $B$.
\begin{example}
	If $A = \{\sqrt{2}, 2, 5, 8\}$ and $B = \{-9, 8, 2.3\}$, what are $A \cup B$ and $A \cap B$?
\end{example}
\begin{answer}
	To find the union, we combine the sets, making sure to include any repeated element only once:
	\begin{equation*}
		A \cup B = \{-9, \sqrt{2}, 2, 2.3, 5, 8\}.
	\end{equation*}
	Then, since the only element both sets share is 8, we also have
	\begin{equation*}
		A \cap B = \{8\}.
	\end{equation*}
\end{answer}

\subsection{Intervals}
\begin{definition}
	We call a subset $I$ of $\mathbb{R}$ an interval if, for any $a, b \in I$ and $x \in \mathbb{R}$ such that $a \leq x \leq b$, then $x \in I$.
\end{definition}
We can write an interval more simply using the notation $[a, b]$, which is equivalent to $\{x \in \mathbb{R} \mid a \leq x \leq b\}$.
This is called a closed interval, and to make the inequalities strict, we can also define an open interval by using parantheses instead of square brackets.\bigskip

In addition, we can mix the two to create half-open intervals, where one inequality is strict and the other isn't.
For instance, $(2, 5]$ refers to the set $\{x \in \mathbb{R} \mid x < 2 \leq 5\}$
Finally, if the interval is unbounded in either direction, we use the notations $-\infty$ and $\infty$ to indicate that there is no minimum or maximum, respectively.

\begin{example}
	Is $8 \in (-\infty, 4) \cup [8, 100)$?
\end{example}
\begin{answer}
	Since $8 \leq 8 < 100$ is a true statement, $8 \in [8, 100)$.
	Since we are taking the union with another set, all of the members of the right interval will also be members of the union of intervals.
	Therefore, the statement is true.
\end{answer}


\subsection{Einstein summation convention}

A vector can be written as a sum of its components.

\(v=\sum_i e_i v^i\)

The Einstein summation convention is to remove the \(\sum_i \) symbols where they are implicit.

For example we would instead write the vector as:

\(v=e_iv^i\)

\subsubsection{Adding vectors}

\(v+w=(\sum_i e_i v^i)+(\sum_i f_iw^i)\)

\(v+w=\sum_i (e_iv^i+f_iw^i)\)

\(v+w=e_iv^i+f_iw^i\)

If the bases are the same then:

\(v+w=e_i (v^i+w^i)\)

\subsubsection{Scalar multiplication}

\(cv=c\sum_ie_iv^i\)

\(cv=\sum_i ce_iv^i\)

\(cv=ce_iv^i\)

\subsubsection{Matrix multiplication}

\(AB_{ik}=\sum_jA_{ij}B_{jk}\)

\(AB_{ik}=A_{ij}B_{jk}\)

\subsubsection{Inner products}

\(\langle v, w\rangle =\langle \sum_i e_iv^i, \sum_j f_jw^j\rangle \)

\(\langle v, w\rangle =\sum_iv^i\langle  e_i, \sum_j f_iw^j\rangle \)

\(\langle v, w\rangle =\sum_i \sum_jv^i\overline {w^j}\langle e_i, f_j\rangle\)

If the two bases are the same then:

\(\langle v, w\rangle =\sum_i \sum_jv^i\overline {w^j}\langle e_i, e_j\rangle\)

We can define the metric as:

\(g_{ij}:=\langle e_i,e_j\rangle \)

\(\langle v, w\rangle =v^i\overline {w^j}g_{ij}\)


\subsection{Gamma function}

The gamma function expands the factorial function to the real (and complex) numbers

We want:

\(f(1)=1\)

\(f(x+1)=xf(x)\)

There are an infinite number of functions which fit this. The function could fluctuate between the natural numbers.

The function we use is:

\(\Gamma (z)=\int_0^\infty x^{z-1}e^{-x}dx\)


\chapter{Matrices}
\section{Vector space}
A vector space is a collection of objects called vectors, which may be added together and multiplied (``scaled'') by numbers, called scalars.\par
Let $F$ be the field\footnote{a field is a set on which addition, subtraction, multiplication, and division are defined, and behave as when they are applied to rational and real numbers.} and $X$ be abelian group\footnote{an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written.}. The pair $\left(X,\odot \right)$ is a vector space if $\odot \, : F \times X \rightarrow X$ satisfies $\forall s,t \in F$ and $\forall u,v \in X$:
\begin{equation*}
\begin{cases}
	s \odot \left( t \odot u \right) &= \left(s \cdot t \right) \odot u \\
	s \odot \left( u+v \right) &= \left(s \odot u \right) + \left(s \odot v \right) \odot u \\
	\left( s+t \right) \odot u &= \left(s + u \right) \odot \left(s + v \right) \\
	1 \odot u &= u
\end{cases}
\end{equation*}
The elements of $F$ (meaning $s,t$) are called ``scalars''. The elements of $X$ (meaning $u,v$) are called ``vectors''. The habit to denote vectors in this notebook, say $u \in X$, by $\vect{u}$.\par
In this notebook, $F=\mathbb{R}$, thus we only discuss vector spaces. Additionally, we omit the symbol $\odot$, thus $s \odot \vect{u}$ is writing $s\vect{u}$.
\begin{example}
$\mathbb{R}$ is a vector space.
\end{example}

\begin{example}
$\mathbb{R}^2$ is also a vector space, where for $\vect{u}=\left(u_1,u_2\right)$ and $\vect{v}=\left(v_1,v_2\right)$ and $s \in \mathbb{R}$:
	\begin{equation*}
	\begin{cases}
		s\vect{u} &= \left(su_1,su_2\right) \\
		\vect{u}+\vect{v} &= \left(u_1 + u_2 , u_2 + v_2 \right) \\
		\vect{0} &= (0,0)
	\end{cases}
	\end{equation*}
\end{example}

\begin{example}
Any $\mathbb{R}^n$ is a vector space, where for $\vect{u}=\left(u_1,u_2,\ldots ,u_n\right)$ and $\vect{v}=\left(v_1,v_2,\ldots ,v_n\right)$ and $s \in \mathbb{R}$ satisfies:
    \begin{equation*}
    	\begin{cases}
		s\vect{u} &= \left(su_1,su_2,\ldots ,su_n\right) \\
		\vect{u}+\vect{v} &= \left(u_1 + u_2 , u_2 + v_2 ,\ldots ,u_n + v_n \right) \\
		\vect{0} &= (\underbrace{0,0,\ldots ,0}_\text{n times})
	\end{cases}
    \end{equation*}
\end{example}

\note If $\vect{u} \in \mathbb{R}^2$ and $\vect{v} \in \mathbb{R}^3$ then $\vect{u} + \vect{v}$ is not defined because $\vect{u}$ and $\vect{v}$ do not belong to the same vector space.

\section{Definition}
Let $\mathbb{R}^{m \times n}$ be the set of all tables with $m$ rows and $n$ columns such that they consist of real numbers. For example, $\begin{mtrx} 2 & 3 & -1 \\ 2 & 1 & 4 \end{mtrx}$ is a table of $2 \times 3$
Let define a table $\vect{A}$ such that:
\begin{equation*}
    \vect{A}=
    \begin{mtrx}
		a_{11} & a_{12} & \ldots & a_{1n} \\
		a_{21} & a_{22} & \ldots & a_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		a_{m1} & a_{m2} & \ldots & a_{mn}
    \end{mtrx}
\end{equation*}
Note that the element $a_{ij}$, called the ij-entry, appears in the \emph{i}th row and the \emph{j}th column. We simply denote $\vect{A}=\left[a_{ij}\right]$, where $i \in {1,2,\ldots ,m}$ and $j \in {1,2,\ldots ,n}$.\par
Now, $\mathbb{R}^{m \times n}$ is a vector space if $\vect{A}=\left[a_{ij}\right]$ and $\vect{B}=\left[b_{ij}\right]$ and $s \in \mathbb{R}$ satisfies:
\begin{equation*}
\begin{cases}
\vect{A} + \vect{B} &= \left[ a_{ij} + a_{ij} \right] \\
s\vect{A} &= \left[sa_{ij}\right] \\
\left[0\right] & \text{is the zero-element}
\end{cases}
\end{equation*}
In this case, $\left[0\right]$ is an $m\times n$ table whose entries are all zero. $\vect{A},\vect{B},\left[0\right]$ are now called matrices. Notice that a vector can be regarded as a special type of matrix. A row vector is a $1\times n$ matrix, and a column vector is a $m\times 1$ matrix.
\begin{example}
Vector $\vect{s}=(1,2)$ can be written as a matrix $\rvect{1,2}$ (row vector) or $\cvect{1,2}$ (column vector).
\end{example}
\section{Basic operations}
\subsection{Matrix addition}
Let $\vect{A}$ and $\vect{B}$ are two matrices of the same vector space. The sum of $\vect{A}$ and $\vect{B}$, written $\vect{A}+\vect{B}$, is the matrix obtained by adding corresponding elements from $\vect{A}$ and $\vect{B}$:
\begin{equation*}
    \begin{mtrx}
		a_{11} & a_{12} & \ldots & a_{1n} \\
		a_{21} & a_{22} & \ldots & a_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		a_{m1} & a_{m2} & \ldots & a_{mn}
    \end{mtrx}
    +
    \begin{mtrx}
		b_{11} & b_{12} & \ldots & b_{1n} \\
		b_{21} & b_{22} & \ldots & b_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		b_{m1} & b_{m2} & \ldots & b_{mn}
    \end{mtrx}
    =
    \begin{mtrx}
		a_{11}+b_{11} & a_{12}+b_{12} & \ldots & a_{1n}+b_{1n} \\
		a_{21}+b_{21} & a_{22}+b_{22} & \ldots & a_{2n}+b_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		a_{m1}+b_{m1} & a_{m2}+b_{m2} & \ldots & a_{mn}+b_{mn}
    \end{mtrx}
\end{equation*}
\subsection{Scalar multiplication}
The product of a scalar $k$ and a matrix $\vect{A}$, written $k\vect{A}$ or $\vect{A} k$, is the matrix obtained by muliplying each element of $\vect{A}$ by $k$:
\begin{equation*}
    k
    \begin{mtrx}
		a_{11} & a_{12} & \ldots & a_{1n} \\
		a_{21} & a_{22} & \ldots & a_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		a_{m1} & a_{m2} & \ldots & a_{mn}
    \end{mtrx}
    =
    \begin{mtrx}
		ka_{11} & ka_{12} & \ldots & ka_{1n} \\
		ka_{21} & ka_{22} & \ldots & ka_{2n} \\
		\vdots & \vdots & \ddots & \vdots \\
		ka_{m1} & ka_{m2} & \ldots & ka_{mn}
    \end{mtrx}
\end{equation*}
We also define $-\vect{A}=(-1)\vect{A}$ and $\vect{A}-\vect{B}=\vect{A}+(-\vect{B})$. The matrix $-\vect{A}$ is called the \emph{negative} of the matrix $\vect{A}$.
\subsection{Matrix multiplication}
Now suppose $\vect{A}$ and $\vect{B}$ are two matrices such that the number of columns of $\vect{A}$ is equal to the number of rows of $\vect{B}$, say $\vect{A}$ is an $m\times p$ matrix and $\vect{B}$ is an $p\times n$. Then the product of $\vect{A}$ and $\vect{B}$, written $\vect{A}\vect{B}$, is the $m\times n$ matrix whose ij-entry is obtained by muliplying the elements of \emph{i}th row of $\vect{A}$ by the corresponding elements of the \emph{j}th column of $\vect{B}$ and then adding:
\begin{equation*}
    \begin{mtrx}
		a_{11} & a_{12} & \ldots & a_{1p} \\
		  .    &   .    & \ldots &   .    \\
		a_{i1} & a_{i2} & \ldots & a_{ip} \\
		  .    &   .    & \ldots &   .    \\
		a_{m1} & a_{m2} & \ldots & a_{mp}
    \end{mtrx}
    \quad
    \begin{mtrx}
		b_{11} & \ldots & b_{1j} & b_{1n} \\
		\vdots & \vdots & \vdots & \vdots \\
		b_{m1} & b_{m2} & \ldots & b_{mn}
    \end{mtrx}
    =
    \begin{mtrx}
		c_{11} & \ldots & c_{1n} \\
		\vdots & \vdots & \vdots \\
		\vdots & c_{ij} & \vdots \\
		\vdots & \vdots & \vdots \\
		c_{m1} & \ldots & c_{mn}
    \end{mtrx}
\end{equation*}
where \[ c_{ij} = a_{i1}b_{1j} + a_{i1}b_{1j} + \ldots + a_{ip}b_{pj} = \sum_{k=1}^p a_{ik}b_{kj} \]
If the number of columns of $\vect{A}$ is not equal to the number of rows of $\vect{B}$, then the product $\vect{A}\vect{B}$ is not defined.

\begin{example}
    Find $\vect{A}\vect{B}$, where
    \begin{equation*}
        A=
        \begin{mtrx}
            1&3\\
            2& -1
        \end{mtrx}
        \qquad
        B=
        \begin{mtrx}
            2&0& -4 \\
            3& -2 &6
        \end{mtrx}
    \end{equation*}
    Since $\vect{A}$ is a $2\times 2$ matrix, $\vect{B}$ is a $2\times 3$, the product matrix $\vect{A}\vect{B}$ is defined and is a $2\times 3$ matrix. To obtain the elements in the first row of the product matrix $\vect{A}\vect{B}$, multiply the first row $\rvect{1,3}$ of $\vect{A}$ by the columns:
    \[ \cvect{2,3} \qquad \cvect{0,-2} \qquad \text{and} \cvect{-4,6} \]
    of $\vect{B}$ respectively:
    \begin{meq*}
        \smtrx{1,3\\2,-1} \smtrx{2,0,-4\\3,-2,6} & = &
	        \smtrx{
	            1 \cdot 2 + 3 \cdot 3 ,
	            1 \cdot 0 + 3(-2) ,
	            1(-4) + 3 \cdot 6\\
	             ,,
            }\\
        & = & \smtrx{11,-6,14\\,,}
    \end{meq*}
    To obtain the elements in the second row of the product matrix   $\vect{A}\vect{B}$, multiply the second row $\rvect{2,-1}$ of $\vect{A}$ by the columns of $\vect{B}$ respectively:
    \begin{meq*}
        \smtrx{1,3\\2,-1} \smtrx{2,0,-4\\3,-2,6} & = &
	        \smtrx{
                11,-6,14 \\
                2 \cdot 2 + (-1) \cdot 3 ,
                2 \cdot 0 + (-1) \cdot (-2),
                2 \cdot (-4) + (-1) \cdot 6
            }\\
        & = & \smtrx{11,-6,14\\1,2,-14}
    \end{meq*}
\end{example}

\subsection{Transpose}
The transpose of a matrix is an operator which flips a matrix over its diagonal, that is, it switches the row and column indices of the matrix by producing another matrix.\par
Let $\vect{A}\in \mathbb{R}^{m\times n}$. The transpose of $\vect{A}$, denote $\trans{A}$, is a matrix $\trans{A}\in \mathbb{R}^{n\times m}$ such that for $\vect{A}=\smtrx{a_{ij}}$, we have $\trans{A}=\smtrx{a_{ji}}$.\par
\begin{example}
    The transpose of $\vect{A}=\smtrx{2,3,1\\ 0,7,8}$ is $\trans{A}=\smtrx{2,0\\ 3,7\\ 1,8}$.
\end{example}
For matrices $\vect{A}\vect{B}$ and scalar $k$, we have the following properties of transpose:
\begin{itemize}
\item The operation of taking the transpose is an involution (self-inverse), meaning that $\trans{\left( \trans{A} \right)}=\vect{A}$.
\item The transpose respects addition, $\trans{\left( \vect{A}+\vect{B} \right)}=\trans{A}+\trans{B}$.
\item The order of the factors reverses when taking tranpose of a product matrix, $\trans{ \left(\vect{A}\vect{B}\right) }=\trans{B}\trans{A}$. From this, one can deduce that a square matrix $\vect{A}$ is invertible if and only if its transpose $\trans{A}$ is invertible, and in this case, we have $\trans{\left( \inverse{A} \right)}=\inverse{\left( \trans{A} \right)}$.
\item $\trans{\left( c\vect{A} \right)}=c\trans{A}$.
\end{itemize}

\section{Square matrices}
\subsection{Definition}
A matrix with the same number of rows as columns is called a \emph{square matrix}. A square matrix with \emph{n} rows and \emph{n} columns is said to be of \emph{order n}, and is called \emph{n-square matrix}. The diagonal of an n-square matrix $\vect{A}=\smtrx{a_{ij}}$ consists of elements $a_{11},a_{22},\ldots , a_{mn}$.
\begin{example}
The matrix \[ \smtrx{1,-2,0 \\ 0,-4,-1 \\ 5,3,2} \] is a square matrix of order 3. The numbers along the diagonal are 1, -4, and 2.
\end{example}
\subsection{Unit matrix}
The n-square matrix with 1s along the diagonal and 0s elsewhere, e.g., \[ \smtrx{1,0,0\\ 0,1,0\\ 0,0,1} \] is called \emph{unit matrix} and will be denoted by $\vect{I}$. The unit matrix $\vect{I}$ plays the same role in matrix multplication as the number 1 does in the usual multiplication of number. Specifically, \[ \vect{A}\vect{I}=\vect{I}\vect{A}=\vect{A} \] for any square matrix $\vect{A}$.\par
We can form powers of a square matrix $\vect{X}$ by defining:\[ \vect{X}^2=\vect{X}\vect{X}, \quad \vect{X}^3=\vect{X}^2 \vect{X} \quad \ldots \vect{X}^0=\vect{I} \]
\subsection{Invertible matrix}
An n-square matrix $\vect{A}$ is said to be invertible if there exists an n-square matrix $\vect{B}$ with the property \[ \vect{A}\vect{B}=\vect{B}\vect{A}=\vect{I}_n \] Such a matrix $\vect{B}$ is unique, and is called the \emph{inverse} of $\vect{A}$, and is denoted by $\inverse{A}$. Observe that $\vect{B}$ is the inverse of $\vect{A}$ if and only if $\vect{A}$ is the inverse of $\vect{B}$.
\begin{example}
Suppose \[ \vect{A}=\smtrx{2,5\\ 1,3} \quad \text{and} \quad \vect{B}=\smtrx{3,-5\\ -1,2} \] Then \[ \vect{A}\vect{B}=\smtrx{6-5,-10+10\\ 3-3,-5+6}=\smtrx{1,0\\ 0,1}=\vect{I}_2 \]
\[ \vect{B}\vect{A}=\smtrx{6-5,15-15\\ -2+2,-5+6}=\smtrx{1,0\\ 0,1}=\vect{I}_2 \] Thus $\vect{A}$ and $\vect{B}$ are inverses.
\end{example}
\subsection{Determinants}
    \label{sec:Determinants}
To each n-square matrix $\vect{A}=\smtrx{a_{ij}}$ we assign a specific number called the \emph{determinant} of $\vect{A}$, denoted $\dt{A}$ or
\begin{equation*}
\dmtrx{
    a_{11},a_{12},\ldots ,a_{1n}\\
    a_{21},a_{22},\ldots ,a_{2n}\\
    \vdots,\vdots,\ddots,\vdots \\
    a_{n1},a_{n2},\ldots ,a_{nn}\\
}
\end{equation*}
The determinants of matrices of order one, two, three are defined as follows:
\begin{meq*}
\dmtrx{a_{11}} &=& a_{11} \\
\dmtrx{a_{11},a_{12}\\a_{21},a_{22}} &=& a_{11}a_{22}-a_{12}a_{21}\\
\dmtrx{a_{11},a_{12},a_{13}\\a_{21},a_{22},a_{23}\\a_{31},a_{32},a_{33}} &=& a_{11}a_{22}a_{33}+a_{21}a_{23}a_{31}+a_{13}a_{21}a_{32}-a_{13}a_{22}a_{31}-a_{12}a_{21}a_{33}-a_{11}a_{23}a_{32}
\end{meq*}
Below is another way to calculate determinant of a $3\times 3$ matrix:
\begin{equation}\label{det-3matrix}
\dmtrx{
    a_{11},a_{12},a_{13}\\
    a_{21},a_{22},a_{23}\\
    a_{31},a_{32},a_{33}
}
= \dmtrx{a_{22},a_{23}\\a_{32},a_{33}} a_{11} - \dmtrx{a_{21},a_{23}\\a_{31},a_{33}} a_{12} + \dmtrx{a_{21},a_{22}\\a_{31},a_{32}} a_{13}
\end{equation}
In general, one can calculate determinant of an n-square matrix $\vect{A}$ using the following formula: \[ \dt{A}=\sum^n_{j=1} (-1)^{i+j}a_{ij} \dt{A_{ij}} \]
Using determinant, we can calculate the inverse of an invertible matrix. For example, the inverse of a $2\times 2$ matrix with nonzero determinant can be calculated as follow: \[ \inverse{A}=\smtrx{a,b\\c,d}^{-1}=\frac{1}{\dt{A}} \smtrx{d,-b\\-c,a} \]
For n-square matrix $\vect{A}=\smtrx{a_{ij}}$ with nonzero determinant, the inverse would be:
\[ \inverse{A}= \frac{1}{\dt{A}}
\dmtrx{
    c_{11},c_{12},\ldots ,c_{1n}\\
    c_{21},c_{22},\ldots ,c_{2n}\\
    \vdots,\vdots,\ddots,\vdots \\
    c_{n1},c_{n2},\ldots ,c_{nn}\\
}
\]
where $c_{ij}=(-1)^{i+j} \dt{A_{ij}}$.\par
For matrices $\vect{A},\vect{B}$ and scalar $k \neq 0$, we have the following properties of determinants:
\begin{itemize}
\item $\det (\vect{A}\vect{B})=\dt{A} \cdot \dt{B}$
\item A \emph{square} matrix is invertible if and only if it has a nonzero determinant.
\item Swapping two rows of a matrix produces the negative matrix. If $\vect{B}$ is a matrix $\vect{A}$ with any two rows interchanged, then $\dt{B}=-\dt{A}$.
\item If $\vect{B}$ is a matrix $\vect{A}$ but one row multiplied by $k$ then $\dt{B}=k\dt{A}$.
\item If $\vect{B}$ is a matrix $\vect{A}$ but row \emph{i}th, say $R_i$, is replaced by $R_i + kR_t, \forall t \neq i$, then $\dt{B}=\dt{A}$.
\end{itemize}
\begin{example}
Given matrix $\vect{A}$:
\[ \vect{A}=\smtrx{-2,-1,4\\ 6,-3,-2\\ 4,1,2} \quad \dt{A}=100 \]
Interchange any two rows of $\vect{A}$, we have matrix $\vect{B}$:
\[ \vect{B}=\smtrx{6,-3,-2\\ -2,-1,4\\ 4,1,2} \quad \dt{B}=-\dt{A}=-100 \]
Multiply first row of $\vect{A}$ with 4 , we have matrix $\vect{B}$:
\[ \vect{B}=\smtrx{-8,-4,16\\ 6,-3,-2\\ 4,1,2} \quad \dt{B}=4\dt{A}=400 \]
Replace the first row $R_1$ by $R_1+\dfrac{1}{2}R_3$
\[ \vect{B}=\smtrx{1,-5/2,3\\ 6,-3,-2\\ 4,1,2} \quad \dt{B}=\dt{A}=100 \]
\end{example}
\subsection{Eigenvectors and eigenvalues}
Let $\vect{A}$ be an n-square matrix. The eigenvector of $\vect{A}$ is a column vector $\vect{x}$ that satisfies:
\begin{equation*}
\vect{A}\vect{x}=\lambda\vect{x}
\end{equation*}
Let us start to find $\vect{x}$ such that
\begin{meq*}
\vect{A}\vect{x} &=& \lambda\vect{x} \\
\Leftrightarrow \vect{A}\vect{x}-\lambda\vect{x} &=& \vect{0} \\
\Leftrightarrow \left( \vect{A}-\lambda\vect{I} \right)\vect{x} &=& \vect{0} \\
\end{meq*}
where $\vect{I}$ is the identity matrix living in the same vector space with $\vect{A}$. There are infinite number of solutions for $\vect{x}$ if there exists $\lambda$ that makes $\det \left( \vect{A}-\lambda\vect{I} \right) =\vect{0}$. In that case, $\lambda$ is called eigenvalue associated with the eigenvector $\vect{x}$.\par
\note There are no more than $n$ distinct eigenvalues for an n-square matrix.
\begin{example}
To calculate the eigenvalues and eigenvectors of $\vect{A}=\smtrx{2,1\\1,4}$, we need to solve the following equation:
\begin{meq*}
\det \left( \vect{A}- \lambda\vect{I} \right) =0 &\Leftrightarrow & \dmtrx{2-\lambda,1\\1,4-\lambda}=0 \\
\Leftrightarrow (2-\lambda)(4-\lambda)=0 &\Leftrightarrow & {\lambda}^2-6\lambda +7=0 \\
\Leftrightarrow {\lambda}_1=3+\sqrt{2} &\quad\text{and}\quad & {\lambda}_2=3-\sqrt{2}
\end{meq*}
If the eigenvalue is ${\lambda}_1=3+\sqrt{2}$, then
\begin{IEEEeqnarray*}{l}
\left( \vect{A} - \left(3+\sqrt{2}\right) \vect{I} \right)\vect{x} = \vect{0} \\
\smtrx{-1-\sqrt{2},1\\1,1-\sqrt{2}}\cvect{x_1,x_2}=\vect{0}\\
\Leftrightarrow
	\begin{cases}
	    \left( -1-\sqrt{2} \right)x_1+x_2 &=0\\
	    x_1+\left( 1-\sqrt{2} \right)x_2 &=0
	\end{cases}\\
\Leftrightarrow x_1 = \left( 1+\sqrt{2} \right)x_2
\end{IEEEeqnarray*}
Eigenvectors corresponding to ${\lambda}_1=3+\sqrt{2}$ are
\[ \vect{x}=\cvect{1,1+\sqrt{2}}k, \quad k\in\mathbb{R}\backslash\lbrace 0 \rbrace \]
Likewise, If the eigenvalue is ${\lambda}_1=3-\sqrt{2}$, then the corresponding eigenvectors are
\[ \vect{x}=\cvect{1,1-\sqrt{2}}k, \quad k\in\mathbb{R}\backslash\lbrace 0 \rbrace \]
\end{example}
\note The sum of diagonal members of the matrix equals to the sum of eigenvalues.
\section{Vector operations}
\subsection{Inner product}
Let $X$ be a vector space. If one can define a binary operation $\cdot \, : X \times X \rightarrow \mathbb{R}$ (take 2 vectors and produce a scalar) such that $\forall \vect{w},\vect{u},\vect{v}\in X$ and $\forall s\in \mathbb{R}$, we have:
\begin{equation*}
\begin{cases}
    \vect{u} \cdot \vect{v} &= \vect{v} \cdot \vect{u} \\
    \vect{u} \cdot \left( \vect{v}+\vect{w} \right) &= \vect{u} \cdot \vect{v} + \vect{u} \cdot \vect{w} \\
    s\left( \vect{u} \cdot \vect{v} \right) &= \left( s\vect{u} \right)\cdot \vect{v}=\vect{u} \cdot \left( s\vect{v} \right) \\
    \vect{u} \cdot \vect{u} & \geqslant 0 \\
    \vect{u} \cdot \vect{u} = 0 \Leftrightarrow \vect{u}=0
\end{cases}
\end{equation*}
then $X$ is called inner product space. The binary operation $\cdot$ is called inner product.\par
Inner product is used to calculate norm of vectors. For any vector $\vect{u}\in X$, one can define norm $\norm{u}$ by \[ \norm{u}=\sqrt{\vect{u} \cdot \vect{u}} \]
For any two vectors $\vect{u},\vect{v}\in X$, we have \[ \vect{u} \cdot \vect{v} = \norm{u}\norm{v}\cos \alpha \]
A vector whose norm is 1, is called a unit vector. One can define a unit vector $\uvect{x}$ by the following formula: \[ \uvect{x}=\frac{1}{\norm{x}}\vect{x} \]
\begin{example}
Vector $\vect{x}=(-2,5,3,6)$ has inner product norm of $\norm{x}=\sqrt{(-2)^2+5^2+3^2+6^2}=\sqrt{74}$. Thus, \[ \uvect{x}=\frac{1}{\norm{x}}\vect{x}=\frac{1}{\sqrt{74}} (-2,5,3,6) \]
\end{example}
\subsection{Cross product}
Let $\mathbb{R}^3$ be a vector space. If one can define a binary operation $\times \, : X \times X \rightarrow X$ (take 2 vectors and produce a vector) such that $\forall \vect{a},\vect{b},\vect{c}\in \mathbb{R}^3$, we have:
\begin{equation}\label{cross-product}
\vect{c}=\vect{a}\times\vect{b}=\dmtrx{\vect{i},\vect{j},\vect{k}\\a_1,a_2,a_3\\b_1,b_2,b_3}
\end{equation}
where $\vect{i},\vect{j},\vect{k}$ are the base vectors, and $\vect{a}=(a_1,a_2,a_3), \quad \vect{b}=(b_1,b_2,b_3)$. Note that the determinant in \eqref{cross-product} produces a vector instead of a scalar. It is also called \emph{symbolic determinant}.
\begin{example}
Let $\vect{a}=(1,0,5),\quad\vect{b}=(-1,2,1)$. Applying the formula \eqref{det-3matrix}, the cross product $\vect{a}\times\vect{b}$ is
\begin{meq*}
\vect{c}=\dmtrx{\vect{i},\vect{j},\vect{k}\\1,0,5\\-1,2,1} &=& \dmtrx{0,5\\2,1}\vect{i}-\dmtrx{1,5\\-1,1}\vect{j}+\dmtrx{1,0\\-1,2}\vect{k} \\
&=& (-10)\vect{i}-6\vect{j}+2\vect{k}
\end{meq*}
which means that $\vect{c}=(-10,-6,2)$
\end{example}
If we draw $\vect{a},\vect{b}$ and $\vect{c}=\vect{a}\times\vect{b}$ in a right-handed three-dimensional coordinate system, then $\vect{c}$ is perpendicular to both $\vect{a}$ and $\vect{b}$. Moreover, if vectors $\vect{a}$ and $\vect{b}$ are considered as edges of a parallelogram then $A=\Vert\vect{a}\times\vect{b}\Vert$ is the area of that parallelogram.\par
For vectors $\vect{a},\vect{b},\vect{c}$ and scalar $k \neq 0$, we have the following properties of cros products:
\begin{itemize}
\item $\Vert\vect{a}\times\vect{b}\Vert = \norm{a}\norm{b}\sin\alpha$, where $\alpha=\angle (\vect{a},\vect{b})$.
\item $\vect{a}\times\vect{b}=-\left( \vect{b}\times\vect{a} \right)$
\item $\vect{a}\times\vect{a}=\vect{0}$, where $\vect{0}$ is zero-vector (not a scalar).
\item $\left( k\vect{a} \right)\times\vect{b}=\vect{a}\times\left( k\vect{b} \right)=k\left( \vect{a}\times\vect{b} \right)$
\item $\vect{c}\times\left( \vect{a}+\vect{b} \right)=\vect{c}\times\vect{a}+\vect{c}\times\vect{b}$
\item Cross product is not associative, $\vect{c}\times\left( \vect{a}\times\vect{b} \right)$ may not equal to $\left( \vect{c}\times\vect{a} \right)\times\vect{b}$.
\item Given three vectors $\vect{a}=(a_1,a_2,a_3),\vect{b}=(b_1,b_2,b_3)$ and $\vect{c}=(c_1,c_2,c_3)$. The combination of cross product and inner product as follow produces a scalar:
	\begin{equation}
	\left( \vect{a}\times\vect{b} \right)\cdot\vect{c}=\dmtrx{c_1,c_2,c_3\\a_1,a_2,a_3\\b_1,b_2,b_3}
	\end{equation}
\end{itemize}

\section{Matrix applications}
\subsection{Orthogonal projection}
The orthogonal projection of $\vect{v}$ onto the line spanned by a nonzero $\vect{s}$ (see figure \ref{Linalg_projection}) is:
\[ \vect{v}_{\vect{s}}=\frac{\vect{v}\cdot\vect{s}}{\norm{s}^2} \, \vect{s} \]

\begin{figure}[hbtp]
\caption{Orthogonal projection}
\label{Linalg_projection}
\centering
    \begin{tikzpicture}
	\tkzInit[xmin=-1,xmax=6,ymin=-1,ymax=6]
	\tkzDrawX[noticks] \tkzDrawY[noticks]
	\tkzDefPoint(0,0){O} \tkzDefPoint(3,4){A} \tkzDefPoint(2,0.5){B}
	\tkzDefPoint(-0.5,-0.125){C} \tkzDefPoint(4,1){D}
	\tkzDefPointBy[projection=onto O--C](A) \tkzGetPoint{P}
	\tkzDrawVectors(O,A O,B O,P)
	\tkzDrawLine(C,D)
	\tkzDrawSegment(A,P)
	\tkzLabelSegment[above=3pt](O,A){$\vect{u}$}
	\tkzLabelSegment[below=1pt](O,B){$\vect{v}$}
	\tkzLabelSegment[above=1pt](O,P){$\vect{v}_{\vect{s}}$}
	\tkzLabelAngle[pos = 0.5](B,O,A){$\alpha$}
	\tkzMarkAngle[fill= yellow,size=0.75cm,opacity=.3](B,O,A)
	\tkzMarkRightAngle(C,P,A)
	\end{tikzpicture}
\end{figure}

\subsection{Rotation}
In linear algebra, a rotation matrix is a matrix that is used to perform a rotation in Euclidean space.
\subsubsection{In two dimensions}
In two dimensions, every rotation matrix has the following form,
\[ \vect{R}=\smtrx{\cos\alpha,-\sin\alpha\\ \sin\alpha,\cos\alpha} \]
rotates points in the xy-plane counterclockwise through an angle $\alpha$ about the origin of the Cartesian coordinate system. The column vectors are calculated by means of the following matrix multiplication,
\begin{equation*}
\cvect{x',y'}=\smtrx{\cos\alpha,-\sin\alpha\\ \sin\alpha,\cos\alpha}\cvect{x,y}
\end{equation*}
So the new coordinates $\left( x',y' \right)$ of the point $\left( x,y \right)$ after rotation are
\[
 x'=x\cos \alpha -y\sin \alpha \, \quad
 y'=x\sin \alpha +y\cos \alpha \,.
\]
\subsubsection{In three dimensions}
A basic rotation (also called elemental rotation) is a rotation about one of the axes of a Coordinate system. The following three basic rotation matrices rotate vectors by an angle $\theta$ about the x-, y-, or z-axis, in three dimensions, using the right-hand rule:
\[ {\begin{alignedat}{1}R_{x}(\theta )&={\begin{bmatrix}1&0&0\\0&\cos \theta &-\sin \theta \\[3pt]0&\sin \theta &\cos \theta \\[3pt]\end{bmatrix}}\\[6pt]R_{y}(\theta )&={\begin{bmatrix}\cos \theta &0&\sin \theta \\[3pt]0&1&0\\[3pt]-\sin \theta &0&\cos \theta \\\end{bmatrix}}\\[6pt]R_{z}(\theta )&={\begin{bmatrix}\cos \theta &-\sin \theta &0\\[3pt]\sin \theta &\cos \theta &0\\[3pt]0&0&1\\\end{bmatrix}}\end{alignedat}}\]

\section{Exercises}
\begin{exercise}
Consider an object living in 3D real place. Its current position is $P(2,5,3)$. The object is heading towards the point $Q(4,10,5)$, and moves to that direction exactly 3 length units. Calculate the position of this object after movement.
\end{exercise}

\begin{solution}
Let $\vect{y}$ be the vector of the movement and $\vect{x}$ be the distance between P and Q. We have:
\begin{meq*}
\vect{x} &=& \vect{Q}-\vect{P}=(4,10,5)-(2,5,3)=(2,5,2) \\
\norm{x} &=& \sqrt{2^2+5^2+2^2}=\sqrt{33},\quad \uvect{x}=\frac{1}{\sqrt{33}}(2,5,2) \\
\vect{y} &=& \vect{P}+3\uvect{x}=(2,5,3)+\frac{3}{\sqrt{33}}(2,5,2) \qedhere
\end{meq*}
\end{solution}

\begin{exercise}
Let $\vect{a}=(2,4)$ and $\vect{b}=(1,-3)$ be vectors in $\mathbb{R}^2$. If these vectors are considered as edges of a parallelogram then calculate its area A.
\end{exercise}

\begin{solution}
Let $\vect{A}$ be the matrix formed by $\vect{a}$ and $\vect{b}$
\[ \vect{A}=\smtrx{2,1\\4,-3} \]
The area of the parallelogram is the absolute value of the determinant of $\vect{A}$
\[ S=\vert \dt{A}\vert = \vert 2(-3)-4\cdot 1 \vert =10 \qedhere \]
\end{solution}

\begin{exercise}\label{change-origin}
Let $\vect{p}_0 \in \mathbb{R}^2$ be such that $\vect{p}_0 =(5,3)$ and the corresponding point in $\mathbb{R}^2$ is $P(5,3)$. We define the function $f:\mathbb{R}^2\rightarrow\mathbb{R}^2$ such that $f(\vect{x})=\vect{x}-\vect{p}_0$. Calculate $f((0,0)),f((-5,9)),f((\vect{p}_0))$. Define the meaning of this function.
\end{exercise}

\begin{solution}
This function moves the origin of the coordinate system from $O(0,0)$ to $P(5,3)$, and then calculates the new coordinate of vector $\vect{x}$. For example, the coordinate of $O(0,0)$ in the new coordinate system is $f((0,0))=(-5,3)$. Point $(-5,9)$ now becomes $f((-5,9))=(-10,6)$. And, of course, because $P(5,3)$ becomes the origin of the coordinate system, its coordinate is $(0,0)$.
\end{solution}

\begin{exercise}
Suppose we have a cube in $\mathbb{R}^3$ such that the vertices are at the point (0,0,0), (0,0,1), (1,0,0), (1,0,1), (1,1,0) and (1,1,1). Determine a function $f:\mathbb{R}^{3\times8}\rightarrow\mathbb{R}^{3\times8}$ such that cube is centered at the origin of the coordinate system O(0,0,0), thus the center of the cube is mapped to 0.
\end{exercise}

\begin{solution}
We write each point of the cube as a column in a single matrix $\vect{C}$:
\[ \vect{C}=\smtrx{0,0,0,0,1,1,1,1\\0,0,1,1,0,0,1,1\\0,1,0,1,0,1,0,1} \]
The center of the cube is $C_0=(1/2,1/2,1/2)$. The function $f$ moves the origin of the coordinate from point O(0,0,0) to $C_0$. According to exercise \ref{change-origin}, that function is
\[ f(\vect{C})=\vect{C} - \cvect{1/2,1/2,1/2}\rvect{1,1,1,1,1,1,1,1}\qedhere \]
\end{solution}


\section{Geometrical Probability}
\subsection{Buffon's Needle}
Suppose we have parallel horizontal lines, each with distance $L$ apart from each other and we have a needle with length $\ell\le L$.
Throw the needle at random, then we want to know the probbaility that it intersects at least one line.
Suppose we have dropped the needle, then let $\Theta$ be its horizontal inclination and $X$ the distance between the distance between the left end to the line above.
So we take $X\sim\operatorname{Unif}[0,L]$ and $\Theta\sim\operatorname{Unif}[0,\pi]$ and they are independent.
Hence
$$p=\mathbb P(\text{The needle intersects the lines})=\mathbb P(X\le\ell\sin\Theta)$$
So we can now calculate this by
\begin{align*}
    p&=\mathbb P(\text{The needle intersects the lines})\\
    &=\mathbb P(X\le\ell\sin\Theta)\\
    &=\int_0^L\int_0^\pi 1_{x\le l\sin\theta}f_{X,\Theta}(x,\theta)\,\mathrm d\theta\,\mathrm dx\\
    &=\int_0^L\int_0^\pi  1_{x\le l\sin\theta}\frac{1}{\pi L}\,\mathrm d\theta\,\mathrm dx\\
    &=\frac{1}{\pi L}\int_0^\pi\ell\sin\theta\,\mathrm d\theta\\
    &=\frac{2\ell}{\pi L}
\end{align*}
Hence $\pi=2\ell/(pL)$.
Now we want to approximate $\pi$ by this experiment.
Throw $n$ needles independently and let $\hat{p}_n$ be the proportion of needles intersecting a line.
We want to approximate $p$ by $\hat{p}_n$ thus approximate $\pi$ by $\hat\pi_n=2\ell/(\hat{p}_nL)$.
Suppose we want $\mathbb P(|\hat\pi_n-\pi|\le 0.001)\ge 0.99$, we want to know how large $n$ has to be.\\
Define $f(x)=2\ell/(xL)$, then $f(p)=\pi$ and $f^\prime(p)=-\pi/p$.
Also $f(\hat{p}_n)=\hat\pi_n$.
Let $S_n$ be the number of needles intersecting a line, then $S_n\sim\operatorname{Bin}(n,p)$, so $S_n\approx np+\sqrt{np(1-p)}Z$ where $Z\sim\mathcal N(0,1)$.
So $\hat{p}_n\approx p+\sqrt{p(1-p)/n}Z$.
By Taylor's Theorem,
$$\hat\pi_n=f(\hat{p}_n)\approx f(p)+(\hat{p}_n-p)f^\prime(p)=\pi-(\hat{p}_n-p)\pi/p$$
So when we substitute back, we obtain
$$\hat\pi_n-\pi\approx-\pi\sqrt{\frac{1-p}{pn}}Z$$
So
$$\mathbb P(|\hat\pi_n-\pi|\le 0.001)=\mathbb P\left( \pi\sqrt{\frac{1-p}{pn}}|Z|<0.001 \right)$$
Now $\mathbb P(|z|\ge 2.58)<0.01$.
Also the variance of $\pi\sqrt{(1-p)/(pn)}Z$ is $\pi^2(1-p)/(pn)$ which is decreasing in $p$.
We can minimize the variance by taking $\ell=L$, so $p=2/\pi$ and the variance is $\pi^2(\pi/2-1)/n$, so in this case we need
$$\sqrt{\frac{\pi^2}{n}(\frac{\pi}{2}-1)}2.58=0.001\implies n=3.75\times 10^7$$
which is quite large.
\subsection{Bertrand's Paradox}
We have a circle of radius $r$ and draw a chord at random.
We want to know the probability that it has length at most $r$.
There are two ways to do this.
The first approach is let $X\sim\operatorname{Unif}(0,r)$ to be the perpendicular distance between the chord and the center of the circle.
Let $C$ be the length, then $C\le r\iff 4X^2\ge 3r^2$, so the probability is $1-\sqrt{3}/2\approx 0.134$.\\
There is a second approach.
Fix one point of the chord and choose $\Theta\sim\operatorname{Unif}(0,2\pi)$ to be the angle between this point and the other point of the chord.
So $C\le r\iff \Theta\le\pi/3\lor\Theta\ge 2\pi-\pi/3$, hence the probability is $1/3$ which is far enough from $0.134$.\\
But this is not a paradox since we are using essentially different sample spaces.


\section*{Exercise 26.1-4}
\subsubsection*{Prove that the flows in a network form a convex set.}
Let $f_1,f_2,\alpha$ be as given in the exercise description.

We want to prove that $f_{\alpha}\equiv\alpha f_1 + (1- \alpha)f_2$ $\forall \alpha \in (0,1)$ is a flow.

We start by showing the capacity constraint i.e.
\begin{align}
\forall u,v \in V \text{ it holds that } 0\leq f_{\alpha}(u,v)\leq c(u,v)\label{Ex.26.1.4:ScalarCapacityConstraint}.
\end{align}

Since $f_1$ and $f_2$ are flows, the capacity constraint holds for both of them. Since the capacity function $c$ is a property of the network, and not the individual flows, the capacity constraint for $f_1$ and $f_2$ are identical to \eqref{Ex.26.1.4:ScalarCapacityConstraint} i.e they are bounded by the same upper and lower bounds.

Hence $\forall \alpha \in (0,1)$ and $\forall u,v \in V$ the following equations hold
\begin{align*}
f_{\alpha}(u,v) &= \alpha f_1(u,v) + (1- \alpha)f_2(u,v)\\
                &\geq \alpha 0 + (1- \alpha)0 \\
								&\geq 0
\end{align*}
and
\begin{align*}
f_{\alpha}(u,v) &= \alpha f_1(u,v) + (1- \alpha)f_2(u,v)\\
                &\leq \alpha c(u,v) + (1- \alpha)c(u,v) \\
								&= c(u,v)
\end{align*}
Combining the two inequalities above yields that \eqref{Ex.26.1.4:ScalarCapacityConstraint} holds.

We then want to show that the flow conservation property holds. i.e
\begin{align}
\forall u \in V\setminus\{s,t\} \text{ it holds that } \sum_{v\in V}f_{\alpha}(v,u) = \sum_{v\in V}f_{\alpha}(u,v)\label{Ex.26.1.4:FlowConservationConstraint}.
\end{align}
First note that since $f_1$ and $f_2$ are flows, the flow conservation property holds for both of them individually.

Pick a vertex $u$ such that $u\in V\setminus\{s,t\}$ then
\begin{align*}
  \sum_{v\in V}f_{\alpha}(v,u) &= \sum_{v\in V} \left(\alpha f_1(v,u) + (1- \alpha)f_2(v,u) \right)\\
    &= \alpha \sum_{v\in V} f_1(v,u) + (1- \alpha) \sum_{v\in V} f_2(v,u)\\
    &= \alpha \sum_{v\in V} f_1(u,v) + (1- \alpha) \sum_{v\in V} f_2(u,v)\\
    &= \sum_{v\in V} \left(\alpha f_1(u,v) + (1- \alpha)f_2(u,v) \right)\\
    &= \sum_{v\in V}f_{\alpha}(u,v)
\end{align*}
Since this holds for all $u\in V\setminus\{s,t\}$, we have now shown \eqref{Ex.26.1.4:FlowConservationConstraint}.

We have now shown the capacity constraint and the flow conservation property for $f_{\alpha}$, hence $f_{\alpha}$ is a flow. So the flows in a network form a convex set.


\section{Weierstrass Theorem}
To approximate any continuous function, a very simple idea is to approximate the function in a polynomial space.
An important property of this space is that polynomials can approximate any reasonable function!
\begin{itemize}
\item $P_n(\mathbb{R}^d)$ is dense in $C(\Omega)$ [Weierstrass theorem]
\item $P_n(\mathbb{R}^d)$ is dense in all Sobolev spaces: $L^2(\Omega), W^{m,p}(\Omega), \ldots$
\end{itemize}

\input{6DL/WTheoremProof}

\subsection{Curse of dimensionality}
Number of coefficients for polynomial space $P_n(\mathbb{R}^d)$  is
$$
	N = \binom{d+n}{n} = \frac{(n+d)!}{d!n!}.
$$
For example $n = 100$:
		\begin{table}
			\centering
			\begin{tabular}{|c|c|c|c|}
				\hline
				$d = $&  $2$ &  $4$ & $8$\\
				\hline
				$N=$  & $5\times10^3$ & $4.6\times10^6$  & $3.5\times10^{11}$ 	\\
				\hline
			\end{tabular}
		\end{table}
As the this table shows, the dimension of the polynomial space $P_n(\mathbb{R}^d)$   increases rapidly as the degree $n$ increases. This leads to an extremely large space therefore very expensive to approximate functions in polynomial spaces in high dimensions.
\input{6DL/Runge}
\input{6DL/Fourier}
\input{6DL/DNN_Qualitative}

497-6DL/5 Polynomials and Weierstrass theorem/5.1-PolyWeierstrass.tex


\subsection{Green's theorem}
Green's theorem tells us that
$$\oint P\,dx+Q\,dy=\int\!\!\!\int
\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)
dx\,dy$$

\noindent
In other words, a line integral and a surface integral can yield
the same result.

\bigskip
\noindent
Example 1.
The following exercise is from {\it Advanced Calculus}
by Wilfred Kaplan, p.~287.
Evaluate $\oint (2x^3-y^3)\,dx+(x^3+y^3)\,dy$ around the circle
$x^2+y^2=1$ using Green's theorem.

\bigskip
\noindent
It turns out that Eigenmath cannot solve the double integral over
$x$ and $y$ directly.
Polar coordinates are used instead.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
P = 2x^3 - y^3
Q = x^3 + y^3
f = d(Q,x) - d(P,y)
x = r cos(theta)
y = r sin(theta)
defint(f r,r,0,1,theta,0,2pi)
\end{Verbatim}

\noindent
$\displaystyle \tfrac{3}{2}\pi$

\bigskip
\noindent
The $defint$ integrand is $f\,r$ because $r\,dr\,d\theta=dx\,dy$.

\bigskip
\noindent
Now let us try computing the line integral side of Green's theorem
and see if we get the same result.
We need to use the trick of converting sine and cosine to exponentials
so that Eigenmath can find a solution.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
x = cos(t)
y = sin(t)
P = 2x^3 - y^3
Q = x^3 + y^3
f = P d(x,t) + Q d(y,t)
f = circexp(f)
defint(f,t,0,2pi)
\end{Verbatim}

\noindent
$\displaystyle \tfrac{3}{2}\pi$

\bigskip
\noindent
Example 2.
Compute both sides of Green's theorem for
$F=(1-y,x)$ over the disk $x^2+y^2\le4$.

\bigskip
\noindent
First compute the line integral along the boundary of the disk.
Note that the radius of the disk is 2.

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
-- Line integral
P = 1 - y
Q = x
x = 2 cos(t)
y = 2 sin(t)
defint(P d(x,t) + Q d(y,t),t,0,2pi)
\end{Verbatim}

\noindent
$\displaystyle 8\pi$

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
-- Surface integral
x = quote(x) --clear x
y = quote(y) --clear y
h = sqrt(4-x^2)
defint(d(Q,x)-d(P,y),y,-h,h,x,-2,2)
\end{Verbatim}

\noindent
$\displaystyle 8\pi$

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
-- Try computing the surface integral using polar coordinates.
f = d(Q,x) - d(P,y) --do before change of coordinates
x = r cos(theta)
y = r sin(theta)
defint(f r,r,0,2,theta,0,2pi)
\end{Verbatim}

\noindent
$\displaystyle 8\pi$

\begin{Verbatim}[formatcom=\color{blue},samepage=true]
defint(f r,theta,0,2pi,r,0,2) --try integrating over theta first
\end{Verbatim}

\noindent
$\displaystyle 8\pi$

\bigskip
\noindent
In this case, Eigenmath solved both forms of the polar integral.
However, in cases where Eigenmath fails to solve a double integral, try
changing the order of integration.


\chapter{Integral Transforms }
\section{Integral Transforms}
Frequently in mathematical physics we encounter pairs of functions related by an expression of the form
\begin{equation}
g(x)=\int_{a}^{b} f(t) K(x, t) d t\label{FT-01}
\end{equation}
where it is understood that $a, b$, and $K(x, t)$ (called the kernel) will be the same for all function pairs $f$ and $g$. We can write the relationship expressed in Eq. (\ref{FT-01}) in the more symbolic form
\begin{equation}
g(x)=\mathcal{L}{ f(t)}
\end{equation}
thereby emphasizing the fact that Eq. $(\ref{FT-01})$ can be interpreted as an operator equation. The function $g(x)$ is called the integral transform of $f(t)$ by the operator $\mathcal{L}$, with the specific transform determined by the choice of $a, b$, and $K(x, t)$. The operator defined by Eq. (\ref{FT-01}) will be linear:
\begin{align}
\int_{a}^{b}\left[f_{1}(t)+f_{2}(t)\right] K(x, t) d t&=\int_{a}^{b} f_{1}(t) K(x, t) d t+\int_{a}^{b} f_{2}(t) K(t) d t \\
\int_{a}^{b} c f(t) K(\alpha, t) d t&=c \int_{a}^{b} f(t) K(\alpha, t) d t
\end{align}
In order for transforms to be useful, we will shortly see that we need to be able to "undo" their effect. From a practical viewpoint, this means that not only must there exist an operator $\mathcal{L}^{-1}$, but also that we have a reasonably convenient and powerful method of evaluating
\begin{equation}
\mathcal{L}^{-1} g(x)=f(t)
\end{equation}
for an acceptably broad range of $g(x)$. The procedure for inverting a transform takes a wide variety of forms that depend on the specific properties of $K(x, t)$, so we cannot write a formula that is as general as that for $\mathcal{L}$ in Eq. (\ref{FT-01}).\\
Not all superficially reasonable choices for the kernel $K(x, t)$ will lead to operators $\mathcal{L}$ that have inverses, and even for strategically chosen kernels it may be the case that $\mathcal{L}$ and $\mathcal{L}^{-1}$ will only exist for substantially restricted classes of functions. Thus, the entire development of the present chapter is restricted (for any given integral transform) to functions for which the indicated operations can be carried out.\\
One of the frequent uses of integral transforms is to use one, together with its inverse, to form an \textbf{integral representation} of a function that we originally had in an explicit form. This move (which appears to be in the direction of generating greater complexity) has value that arises from the relatively simple behavior of the transforms of differentiation and integration operators. Procedures involving integral representations are also presented in later sections of this chapter.
\begin{figure}[H]
	\centering
	\includegraphics[height=5cm,width=9cm]{FT-01}
\end{figure}
\newpage
\begin{abox}
	Fourier Transform
	\end{abox}

The integral transform that has seen the widest use is the Fourier transform, defined as
\begin{equation}
g(\omega)=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(t) e^{i \omega t} d t
\end{equation}
The notation for this transform is not entirely universal; some writers omit the prefactor $1 / \sqrt{2 \pi}$; we keep it because it causes the transform and its inverse to have formulas that are more symmetrical. In applications involving periodic systems, one occasionally encounters a definition with kernel $\exp \left(2 \pi i \omega t / a_{0}\right)$, where $a_{0}$ is a lattice constant. These differences in notation do not change the mathematics, but cause formulas to differ by powers of $2 \pi$ or $a_{0}$. Caution is therefore advised when combining material from different sources.\\
\section{Infinite Fourier Transform}
\begin{align*}
\text{The fourier transform of }f(x)[-\infty<x<\infty] &:\\
f(s)=F\{f(x)\}&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(x) e^{i s x} d x\\
\text{Inverse fourier transform of }f(s)[-\infty<x<\infty] &:\\
f(x)=F^{-1}\{f(s)\}&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(s) e^{-i s x} d s .
\end{align*}
\section{Fourier Sine Transform}
\begin{align*}
f_{s}(\mathrm{~s})&=F_{s}\{f(x)\}=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f(x) \sin s x d x \\
f(x)&=F_{s}^{-1}\left\{f_{s}(s)\right\}=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f_{s}(s) \sin s x d s
\end{align*}
\section{Fourier Cosine Transform}
\begin{align*}
f_{c}(s)&=F_{c}\{f(x)\}=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f(x) \cos s x d x \\
f(x)&=F_{c}^{-1}\left\{f_{c}(s)\right\}=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f_{c}(s) \cos s x d s
\end{align*}
\subsubsection{Important Formulas:}
\begin{enumerate}
	\item $\int_{0}^{\infty} \frac{\sin a x}{x} d x=\frac{\pi}{2}$
	\item $\int_{0}^{\infty} e^{-x^{2}} d x=\sqrt{\frac{\pi}{2}}$
	\item $\int_{0}^{\infty} e^{-a x} \sin b x d x=\frac{b}{a^{2}+b^{2}}$
	\item $\int_{0}^{\infty} e^{-a x} \cos b x d x=\frac{a}{a^{2}+b^{2}}$
	\item $\int_{0}^{\infty} e^{-a x^{2}} d x=\frac{1}{2} \sqrt{\frac{\pi}{a}}$
	\item $\int_{0}^{\infty} e^{-a x^{2}} \cos b x d x=\frac{1}{2} \sqrt{\frac{\pi}{a}} e^{-b^{2} / 4 a}$
	\item $\int_{-\infty}^{\infty} e^{-a x^{2}+b x} d x=\sqrt{\frac{\pi}{a}} e^{b^{2} / 4 a}$
\end{enumerate}

\begin{exercise}
	Find the fourier transform of Gaussian distribution function $f(x)=N e^{-a x^{2}}$ where $N$ and 'a' are constant.
\end{exercise}
\begin{answer}
	\begin{align*}
	F\{f(x)\}=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(x) e^{i k x} d x=\frac{1}{\sqrt{2 \pi}} \int_{-\infty} N e^{-a x^{2}} e^{i k x} d x=\frac{N}{\sqrt{2 \pi}} e^{-k^{2} / 4 a}
	\end{align*}
\end{answer}
\begin{exercise}
	Find $F\{\delta(x)\}$
\end{exercise}
\begin{answer}
	\begin{align*}
	F\{f(x)\}=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(x) e^{i k x} d x=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} \delta(x) e^{i k x} d x=\frac{1}{\sqrt{2 \pi}}\left[\mathrm{e}^{i k x}\right]_{x=0}=\frac{1}{\sqrt{2 \pi}}
	\end{align*}
\end{answer}
\begin{exercise}
	Find the fourier transform of $f(x)=e^{-a|x|} \quad(-\infty<x<\infty) \quad(a>0)$
\end{exercise}
\begin{answer}
	\begin{align*}
	\begin{aligned}
	F\left[e^{-a|x|}\right] &=\frac{1}{\sqrt{2 \pi}}\left[\int_{-\infty}^{0} e^{a x} e^{i s x} d x+\int_{0}^{\infty} e^{-a x} e^{i s x} d x\right]=\frac{1}{\sqrt{2 \pi}}\left[\left(\frac{e^{(a+i s) x}}{(a+i s)}\right)_{-\infty}^{0}+\left(\frac{e^{-(a-i s) x}}{(i s-a)}\right)_{0}^{\infty}\right] \\
	&=\frac{1}{\sqrt{2 \pi}}\left[\frac{1}{a+i s}+\frac{1}{a-i s}\right]=\frac{2 a}{\sqrt{2 \pi}\left(s^{2}+a^{2}\right)} \because
	\end{aligned}
	\end{align*}
\end{answer}

\section{Properties of Fourier Transform}
(i) \textbf{Linearity theorem:}
\begin{align*}
\text{If }F(x)&=a_{1} f_{1}(x)+a_{2} f_{2}(x)+\ldots\text{ then, }\\f(s)&=F[f(x)]=a_{1} f_{1}(s)+a_{2} f_{2}(s)+\ldots
\end{align*}
(ii) \textbf{Change of scale property: }
\begin{align*}
\text{If }F[f(x)]&=f(s),\text{ then }F\{f(a x)\}\\&=\frac{1}{a} f(\mathrm{~s} / a)
\end{align*}
(iii) $\text{If }F\{f(x)\}=f(s),\text{ then }F\left\{f^{*}(x)\right\}=f^{*}(-s)$\\\\
(iv) \textbf{Shifting property:}
 \begin{align*}
\text{ If $f(s)$ is the Fourier transform of }\mathrm{f}(\mathrm{x}), \text{ then }F\{f(x \pm a)\}=e^{\mp i s a} f(s)
 \end{align*}
(v) \textbf{Modulation theorem:} \\\\
If $F\{f(x)\}=f(s)$, then $F\{f(x) \cos a x\}=\frac{1}{2} f(s-a)+\frac{1}{2} f(s+a)$
\section{Parseval Identity for Fourier Transform}
If the Fourier transform of $f(x)$ and $g(x)$ be $f(s) \& g(s)$ respectively, then\\\\
(i) $\int_{-\infty}^{\infty} f(s) g^{*}(s) d s=\int_{-\infty}^{\infty} f(x) g^{*}(x) d x$\\\\
where $g^{*}(s)$ is complex conjugate of $g(s)$ and $g^{*}(x)$ is the complex conjugate of $g(x)$.\\\\
(ii) $\left.\int_{-\infty}^{\infty}|f(s)|\right.^{2} d s=\int_{-\infty}^{\infty}|f(x)|^{2} d x$
\begin{exercise}Using parseval's identity show that $\int_{b}^{\infty}\left(\frac{\sin x}{x}\right)^{2} d x=\pi / 2$
\end{exercise}
\begin{answer}
	\begin{align*}
	F\{f(x)\}&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(x) e^{i x x} d x=\sqrt{\frac{2}{\pi}} \frac{\sin a s}{s}\\
	\text{Using parseval identity, }\int_{-\infty}^{\infty}|f(x)|^{2} d x&=\int_{-\infty}^{\infty}|f(s)|^{2} d s\\
	\int_{-a}^{\infty} l^{2} d x&=\int_{-\infty}^{\infty} \frac{2}{\pi} \frac{\sin ^{2} a s}{s^{2}} d s \\ 2 a&=\frac{2}{\pi} \int_{-\infty}^{\infty}\left(\frac{\sin a s}{s}\right)^{2} d s\\
	\text{Putting }a s&=x \Rightarrow a d s=d x\\
	\Rightarrow \pi&=\int_{-\infty}^{\infty}\left(\frac{\sin x}{x}\right)^{2} d x \\ \int_{0}^{\infty}\left(\frac{\sin x}{x}\right)^{2} d x&=\frac{\pi}{2}
	\end{align*}
\end{answer}
\begin{exercise}
	If the fourier transform of $f(x)$ is $f(s)$, then find the fourier transform of $\frac{d f}{d x}$
\end{exercise}
\begin{answer}
	\begin{align*}
	F\left[\frac{d f}{d x}\right]&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} \frac{d f}{d x} e^{i s x} d x\\&=\frac{1}{\sqrt{2 \pi}}\left[e^{i s x} f(x)\right]_{-\infty}^{\infty}-\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} i s e^{i s x} f(x) d x\\
	\intertext{Since $f(x)$ should be a well behave function for the fourier tranform to exist, therefore, the first term of the above equation should be equal to zero.}
	\text{Then }F\left[\frac{d f}{d x}\right]&=-i s \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} e^{i s x} f(x) d x=-is f( {s})
	\end{align*}
\end{answer}
\begin{exercise}
	Find Fourier transform of $f(x)= \begin{cases}x^{2}, & |x|<a \\ 0, & |x|>a\end{cases}$
\end{exercise}
\begin{answer}
	\begin{align*}
	F\{f(x)\} &=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} e^{i s x} f(x) d x=\frac{1}{\sqrt{2 \pi}} \int_{-a}^{a} e^{i s x} x^{2} d x \\
	&=\frac{1}{\sqrt{2 \pi}}\left[\left(\frac{e^{i s x}}{i s} \cdot x^{2}\right)_{x=-a}^{a}-\frac{2}{i s} \int_{-a}^{a} x e^{i s x} d x\right] \\
	&=\frac{1}{\sqrt{2 \pi}}\left[\frac{a^{2}}{i s}\left(e^{i s a}-e^{-i s a}\right)-\frac{2}{i s}\left[\left(\frac{x e^{i s x}}{i s}\right)_{x=-a}^{a}-\frac{1}{i s} \int_{-a}^{a} e^{i s x} d x\right]\right]\\
	&=\frac{1}{\sqrt{2 \pi}}\left[\frac{2 a^{2}}{s} \sin (s a)+\frac{2 a}{s^{2}} \cos (s a)-\frac{4}{s^{3}} \sin (s a)\right]
	\end{align*}
\end{answer}
\begin{exercise}
	Find the complex fourier transform $e^{-|x|}$
\end{exercise}
\begin{answer}
	\begin{align*}
	F\left\{e^{-|x|}\right\}&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} e^{-|x|} e^{i s x} d x\\&=\frac{1}{\sqrt{2 \pi}}\left[\int_{-\infty}^{0} e^{-|x|} e^{i s x} d x+\int_{0}^{\infty} e^{-|x|} \cdot e^{i s x} d x\right]\\
	&=\frac{1}{\sqrt{2 \pi}}\left[\int_{-\infty}^{0} e^{x} \cdot e^{i s x} d x+\int_{0}^{\infty} e^{-x(1-i s)} d x\right]\\&=\frac{1}{\sqrt{2 \pi}}\left[\left[\frac{e^{x(1+i s)}}{1+i s}\right]_{x=-\infty}^{0}+\left[\frac{e^{-x(1-i s)}}{-(1-i s)}\right]_{x=0}^{\infty}\right] \\
	&=\frac{1}{\sqrt{2 \pi}}\left[\frac{1}{1-i s}+\frac{1}{1+i s}\right]\\&=\frac{1}{\sqrt{2 \pi}}\left(\frac{2}{1+s^{2}}\right)
	\end{align*}
\end{answer}

\begin{exercise}
	The graph of a real periodic function $f(x)$ for the range $[-\infty, \infty]$ is shown below
	\begin{figure}[H]
		\centering
		\includegraphics[height=3cm,width=5cm]{FT01}
	\end{figure}
	Which of the following graphs represents the real part of its Fourier transform?
	 \begin{tasks}(2)
		\task[\textbf{a.}]
		\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-06}
		\end{figure}
		\task[\textbf{b.}]	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-05}
		\end{figure}
		\task[\textbf{c.}]	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-03}
		\end{figure}
		\task[\textbf{d.}] 	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT02}
		\end{figure}
	\end{tasks}
\end{exercise}
\begin{answer}
	\begin{align*}
	\text { The given graph in the question is of } f(x)&=\cos \omega x\\
	F(\cos \omega x)=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{+\infty} \cos \omega x e^{i k x} d x&=\frac{1}{\sqrt{2 \pi}}\left(\int_{-\infty}^{+\infty} \frac{e^{i(k+\omega) x}}{2} d x+\int_{-\infty}^{+\infty} \frac{e^{i(k-\omega) x}}{2} d x\right)\\
	&\Rightarrow F(\cos \omega x) \frac{1}{\sqrt{2 \pi}}\left(\frac{1}{2} \delta(k+\omega)+\frac{1}{2} \delta(k-\omega)\right)
	\intertext{Therefore, the fourier transform of $f(x)=\cos x \omega x$ consist of two delta functions of same height at $k=\omega$ and $k=-\omega$.}
	\end{align*}
		So the correct answer is \textbf{option (b)}
\end{answer}
\newpage
\begin{abox}
	Laplace Transforms
\end{abox}
The Laplace transform $f(s)$ of a function $F(t)$ is defined by
\begin{equation}
f(s)=\mathcal{L}\{F(t)\}=\int_{0}^{\infty} e^{-s t} F(t) d t .
\end{equation}
A few comments on the existence of the integral are in order. The infinite integral of $F(t)$,
\begin{equation*}
\int_{0}^{\infty} F(t) d t,
\end{equation*}
need not exist. For instance, $F(t)$ may diverge exponentially for large $t$. However, if there are some constants $s_{0}, M$, and $t_{0} \geq 0$ such that for all $t>t_{0}$
\begin{equation}
\left|e^{-s_{0} t} F(t)\right| \leq M,\label{LT-01}
\end{equation}
the Laplace transform will exist for $s>s_{0} $. $F(t)$ is then said to be of exponential order. As a counter example, $F(t)=e^{t^{2}}$ does not satisfy the condition given by Eq. (\ref{LT-01}) and is not of exponential order. Thus, $\mathcal{L}\left\{e^{t^{2}}\right\}$ does not exist.
The Laplace transform may also fail to exist because of a sufficiently strong singularity in the function $F(t)$ as $t \rightarrow 0$. For example,
\begin{equation*}
\int_{0}^{\infty} e^{-s t} t^{n} d t
\end{equation*}
diverges at the origin for $n \leq-1$. The Laplace transform $\mathcal{L}\left\{t^{n}\right\}$ does not exist for $n \leq-1$.

\section{Important Laplace Transforms:}
\begin{enumerate}
	\item $\mathcal{L}(1)=\frac{1}{s}$
	\begin{exercise}
		$$
		\mathcal{L}(1)=\frac{1}{s}
		$$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}(1)&=\int_{0}^{\infty} 1 \cdot e^{-s t} d t=\left[\frac{e^{-s t}}{-s}\right]_{0}^{\infty}\\&=-\frac{1}{s}\left[\frac{1}{e^{s t}}\right]_{0}^{\infty}=-\frac{1}{s}[0-1]\\&=\frac{1}{s}\\
		\text{ Hence }\mathcal{L}(1)&=\frac{1}{s}
		\end{align*}
	\end{answer}
	\item $\mathcal{L}\left(t^{n}\right)=\frac{n !}{s^{n+1}}(n=0,1,2, \ldots \ldots . .)$
	\begin{exercise}
		$\mathcal{L}\left(t^{n}\right)=\frac{n !}{s^{n+1}}$ where $n$ and $s$ are positive.
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}\left(t^{n}\right)&=\int_{0}^{\infty} e^{-s t} t^{n} d t\\
		\text{Putting }s t=&x \quad\text{ or }\quad t=\frac{x}{s} \quad\text{ or } \quad d t=\frac{d x}{s}\\
		\text{Thus we have}\mathcal{L}\left(t^{n}\right)&=\int_{0}^{\infty} e^{-x}\left(\frac{x}{s}\right)^{n} \frac{d x}{s_{r}} \quad \Rightarrow \quad \mathcal{L}\left(t^{n}\right)=\frac{1}{s^{n+1}} \int_{0}^{\infty} e^{-x} \cdot x^{n} d x\\
		\Rightarrow \mathcal{L}\left(t^{n}\right)&=\frac{\sqrt{n+1}}{s^{n+1}} \Rightarrow \mathcal{L}\left(t^{n}\right)=\frac{n !}{s^{n+1}}\hspace{2cm}\left[\begin{array}{c}
		{\left[n+1=\int_{0}^{\infty} e^{-x} \cdot x^{n} d x\right] } \\
		\text { and } \quad \mid \overline{n+1}=n !
		\end{array}\right]
		\end{align*}
	\end{answer}
	\item $\mathcal{L}\left(e^{a t}\right)=\frac{1}{s-a}(s>a)$
	\begin{exercise}
		$\mathcal{L}\left(e^{a t}\right)=\frac{1}{s-a}, \quad$ where $s>a$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}\left(e^{a t}\right) &=\int_{0}^{\infty} e^{-s t} \cdot e^{a t} d t=\int_{0}^{\infty} e^{-s t+a t} \cdot d t \\
		&=\int_{0}^{\infty} e^{(-s+a) t} \cdot d t=\int_{0}^{\infty} e^{-(s-a) t} \cdot d t=\left[\frac{e^{-(s-a) t}}{-(s-a)}\right]_{0}^{\infty}=-\frac{1}{s-a}\left[\frac{1}{e^{(s-a) t}}\right]_{0}^{\infty}\\
		&=\frac{-1}{(s-a)}(0-1)=\frac{1}{s-a}
		\end{align*}
	\end{answer}
	\item $\mathcal{L}(\cos a t)=\frac{s}{s^{2}+a^{2}}$
	$(s>0)$
	\begin{exercise}
		$L(\cos a t)=\frac{s}{s^{2}+a^{2}}$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}(\cos a t)&=\mathcal{L}\left(\frac{e^{t a t}+e^{-i a t}}{2}\right) \quad\left[\because \cos a t=\frac{e^{i a t}+e^{-i a t}}{2}\right]\\
		&=\frac{1}{2}\left[\mathcal{L}\left(e^{i a t}+e^{-i a t}\right)\right]=\frac{1}{2}\left[\mathcal{L}\left(e^{i a t}\right)+\mathcal{L}\left(e^{i a t}\right)\right]=\frac{1}{2}\left[\frac{1}{s-i a}+\frac{1}{s+i a}\right]=\frac{1}{2} \frac{s+i a+s-i a}{s^{2}+a^{2}}\\
		&=\frac{s}{s^{2}+a^{2}}
		\end{align*}
	\end{answer}
	\item $\mathcal{L}(\sin a t)=\frac{a}{s^{2}+a^{2}} \quad(s>0)$
		\begin{exercise}
		$\mathcal{L}(\sin a t)=\frac{a}{s^{2}+a^{2}}$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}(\sin a t)&=\mathcal{L}\left[\frac{e^{i a t}-e^{-i a t}}{2 i}\right]\hspace{3cm} \left[\because \sin a t=\frac{e^{i a t}-e^{-i a t}}{2 i}\right]\\
		&=\frac{1}{2 i}\left[L\left(e^{i a t}-e^{-i a t}\right)\right]=\frac{1}{2 i}\left[L\left(e^{i a t}\right)-\mathcal{L}\left(e^{-i a t}\right)\right] \\
		&=\frac{1}{2 i}\left[\frac{1}{s-i a}-\frac{1}{s+i a}\right]=\frac{1}{2 i} \frac{s+i a-s+i a}{s^{2}+a^{2}}=\frac{1}{2 i} \frac{2 i a}{s^{2}+a^{2}}=\frac{a}{s^{2}+2^{2}}
		\end{align*}
	\end{answer}

	\item $\mathcal{L}(\cosh a t)=\frac{s}{s^{2}-a^{2}}\left(s^{2}>a^{2}\right)$
		\begin{exercise}
		$\mathcal{L}(\cosh a t)=\frac{s}{s^{2}-a^{2}}$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}(\cosh a t) &=L\left[\frac{e^{a t}+e^{-a t}}{2}\right] \hspace{4cm}\left(\therefore \cosh a t=\frac{e^{a t}+e^{-a t}}{2}\right)\\
		&=\frac{1}{2} \mathcal{L}\left(e^{a t}\right)+\frac{1}{2} L\left(e^{-a t}\right)=\frac{1}{2}\left[\frac{1}{s-a}+\frac{1}{s+a}\right] \hspace{2cm}\left[\mathcal{L}\left(e^{a t}\right)=\frac{1}{s-a}\right]\\
		&=\frac{1}{2}\left[\frac{s+a+s-a}{s^{2}-a^{2}}\right]=\frac{s}{s^{2}-a^{2}}
		\end{align*}
	\end{answer}
	\item $\mathcal{L}(\sinh a t)=\frac{a}{s^{2}-a^{2}}\left(s^{2}>a^{2}\right)$
	\begin{exercise}
		$L(\sinh a t)=\frac{a}{s^{2}-a^{2}}$
	\end{exercise}
	\begin{answer}
		\begin{align*}
		\mathcal{L}(\sinh a t) &=\mathcal{L}\left[\frac{1}{2}\left(e^{a t}-e^{-a t}\right)\right] \\
		&=\frac{1}{2}\left[\mathcal{L}\left(e^{a t}\right)-L\left(e^{-a t}\right)\right]=\frac{1}{2}\left[\frac{1}{s-a}-\frac{1}{s+a}\right]=\frac{1}{2}\left[\frac{s+a-s+a}{s^{2}-a^{2}}\right] \\
		&=\frac{a}{s^{2}-a^{2}}
		\end{align*}
	\end{answer}
\end{enumerate}

\subsubsection{Important properties:}
\begin{enumerate}
	\item Linear Property: $\mathcal{L}\left[a_{1} f_{1}(t)+a_{2} f_{2}(t)\right]=a_{1} \mathcal{L}\left[f_{1}(t)\right]+a_{2} \mathcal{L}\left[f_{2}(t)\right]$
	\item Shifting Property: $\mathcal{L}\left[e^{a t} f(t)\right]=f(s-a)$
	\item Scaling Property: $\mathcal{L}[f(a t)]=\frac{1}{a} f\left(\frac{s}{a}\right)$
	\item $\mathcal{L}\left[t^{n} f(t)\right]=(-1)^{n} \frac{d^{n}}{d s^{n}}(f(s))$
	\item $\mathcal{L}\left[\frac{f(t)}{t}\right]=\int_{-\infty}^{\infty} f(s) d s$
	\item $\mathcal{L}\left[\int_{0}^{t} f(t) d t\right]=\frac{1}{s} f(s)$
	\item $\mathcal{L}\left[f^{\prime}(t)\right]=s L[f(t)]-f(0)$
	\item  $\mathcal{L}\left[f^{\prime \prime}(t)\right]=s^{2} L[f(t)]-f^{\prime}(0)-s f(0)$
	\item Laplace transform of a periodic function $f(t)$ having period ' $T$ ' is $$\mathcal{L}[f({t})]=\frac{1}{1-e^{-s T}} \int_{0}^{T} e^{-s t} f({t}) d {t}$$
	\item Laplace transform of the unit step function $u(t-a)=u_{a}(t)=\left\{\begin{array}{lll}0 & \text { for } & t<a \\ 1 & \text { for } & t \geq a\end{array}\right.$ is $\frac{e^{-a s}}{s}$.
	\item Laplace transform of the dirac delta function $\delta(t-a)$ is $e^{-a s}$.
\end{enumerate}
\begin{exercise}
	Find the laplace transform of $f(t)=(1+\cos 2 t)$
\end{exercise}
\begin{answer}
	\begin{align*}
	\begin{aligned}
	\mathcal{L}[f(t)] &=\int_{0}^{\infty} e^{-s t}\left(1+\cos 2 t \cdot d t=\left(\frac{e^{-s t}}{-s}\right)_{0}^{\infty}+\int_{0}^{\infty} e^{-s t} \cos 2 t d t\right.\\
	&=\frac{1}{s}+\frac{s}{4+s}=\frac{2 s^{2}+4}{s\left(s^{2}+4\right)}
	\end{aligned}
	\end{align*}
\end{answer}
\begin{exercise}
	Find the laplace transform of $f(t)=2 \sin 2 t \cos 4 t$
\end{exercise}
\begin{answer}
	\begin{align*}
	\mathcal{L}[f(t)]=\mathcal{L}[2 \sin 2 t \cdot \cos 4 t]=\mathcal{L}[\sin 6 t-\sin 2 t]=\left(\frac{6}{s^{2}+36}-\frac{2}{s^{2}+4}\right)
	\end{align*}
\end{answer}
\begin{exercise}
	Find the laplace transform of $f(t)=e^{-t}(3 \sinh 2 t-5 \cosh 2 t)$
\end{exercise}
\begin{answer}
	\begin{align*}
	\begin{aligned}
	\mathcal{L}[f(t)] &=\mathcal{L}\left(3 e^{-t} \sinh 2 t\right)-\mathcal{L}\left(5 e^{-t} \cosh 2 t\right) \\
	&=3 \frac{2}{(s+1)^{2}-4}-5 \cdot \frac{(s+1)}{(s+1)^{2}-4}=\frac{(1-5 \mathrm{~s})}{\left(\mathrm{s}^{2}+2 \mathrm{~s}-3\right)} \quad \text { (Using 2nd property) }
	\end{aligned}
	\end{align*}
\end{answer}
\begin{exercise}
	Find the laplace transform of the fuction\\
	$f(t)=1$ for $2 n \leq t \leq 2 n+1$\\
	$=0 \quad$ for $2 n+1 \leq t \leq 2 n+2 \quad(n=0,1,2, \ldots . .)$
\end{exercise}
\begin{answer}
	\begin{align*}
	\mathcal{L}[f(t)] &=\frac{1}{1-e^{-s T}} \int_{0}^{T} e^{-s t} f(t) d t=\frac{1}{1-e^{-2 s}} \int_{0}^{2} e^{-s t} d t \\
	&=\frac{1}{1-e^{-2 s}}\left[\int_{0}^{1} e^{-s t} d t\right]=\frac{1}{1-e^{-2 s}}\left(\frac{1-e^{-s}}{s}\right)\\
	&=\frac{\left(1-e^{-s}\right)}{s\left(1+e^{-s}\right)\left(1-e^{-s}\right)}=\frac{1}{s\left(1+e^{-s}\right)}
	\end{align*}
\end{answer}

\begin{exercise}
	Find the laplace transform of $f(t)=\left(1+t e^{-t}\right)^{3}$
\end{exercise}
\begin{answer}
	\begin{align*}
	f(t)&=\left(1+t e^{-t}\right)^{3}=1+t^{3} e^{-3 t}+3 t e^{-t}+3 t^{2} e^{-2 t} \\
	\mathcal{L}[f(t)]&=\mathcal{L}(1)+\mathcal{L}\left(t^{3} e^{-3 t}\right)+\mathcal{L}\left(3 t e^{-t}\right)+\mathcal{L}\left(3 t^{2} e^{-2 t}\right)\\
	&=\frac{1}{s}+(-1)^{3} \frac{d^{3}}{d s^{3}}\left(\frac{1}{s+3}\right)+3(-1)^{1} \frac{d}{d s}\left(\frac{1}{s+1}\right)+3(-1)^{2} \frac{d^{2}}{d s^{2}}\left(\frac{1}{s+2}\right)\text{ (Using 4th property)}\\
	&=\frac{1}{s}+\frac{6}{(s+3)^{4}}+\frac{3}{(s+1)^{2}}+\frac{6}{(s+2)^{3}} \text {. }
	\end{align*}
\end{answer}

\newpage
\begin{abox}
	Practise Set-1
\end{abox}
\begin{enumerate}

\item The Fourier transform of the derivative of the Dirac $\delta-$ function, namely $\delta^{\prime}(x)$, is proportional to
{\exyear{NET/JRF(DEC-2013)}}

\begin{tasks}(4)
\task[\textbf{A.}] 0
\task[\textbf{B.}] 1
\task[\textbf{C.}] $\sin k$
\task[\textbf{D.}] $i k$
\end{tasks}
\item
	The graph of a real periodic function $f(x)$ for the range $[-\infty, \infty]$ is shown below {\exyear{NET/JRF(DEC-2014)}}
	\begin{figure}[H]
		\centering
		\includegraphics[height=3cm,width=5cm]{FT01}
	\end{figure}
	Which of the following graphs represents the real part of its Fourier transform?
	\begin{tasks}(2)
		\task[\textbf{A.}]
		\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-06}
		\end{figure}
		\task[\textbf{B.}]	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-05}
		\end{figure}
		\task[\textbf{C.}]	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT-03}
		\end{figure}
		\task[\textbf{D.}] 	\begin{figure}[H]
			\centering
			\includegraphics[height=2cm,width=2.5cm]{FT02}
		\end{figure}
	\end{tasks}
\item The Fourier transform of $f(x)$ is $\tilde{f}(k)=\int_{-\infty}^{+\infty} d x e^{i k x} f(x)$.
If $f(x)=\alpha \delta(x)+\beta \delta^{\prime}(x)+\gamma \delta^{\prime \prime}(x)$, where $\delta(x)$ is the Dirac delta-function (and prime denotes derivative), what is $\tilde{f}(k) ?$
{\exyear{NET/JRF(DEC-2015)}}

\begin{tasks}(2)
\task[\textbf{A.}] $\alpha+i \beta k+i \gamma k^{2}$
\task[\textbf{B.}] $\alpha+\beta k-\gamma k^{2}$
\task[\textbf{C.}]  $\alpha-i \beta k-\gamma k^{2}$
\task[\textbf{D.}] $i \alpha+\beta k-i \gamma k^{2}$
\end{tasks}
\item What is the Fourier transform $\int d x e^{i l x} f(x)$ of
$$
f(x)=\delta(x)+\sum_{n=1}^{\infty} \frac{d^{n}}{d x^{n}} \delta(x)
$$
where $\delta(x)$ is the Dirac delta-function?
{\exyear{NET/JRF(JUNE-2016)}}

\begin{tasks}(4)
\task[\textbf{A.}]  $\frac{1}{1-i k}$
\task[\textbf{B.}] $\frac{1}{1+i k}$
\task[\textbf{C.}] $\frac{1}{k+i}$
\task[\textbf{D.}] $\frac{1}{k-i}$
\end{tasks}
\item The Fourier transform $\int_{-\infty}^{\infty} d x f(x) e^{i k x}$ of the function $f(x)=\frac{1}{x^{2}+2}$ is
{\exyear{NET/JRF(DEC-2016)}}

\begin{tasks}(4)
\task[\textbf{A.}] $\sqrt{2} \pi e^{-\sqrt{2}|| \mid}$
\task[\textbf{B.}] $\sqrt{2} \pi e^{-\sqrt{2 k}}$
\task[\textbf{C.}] $\frac{\pi}{\sqrt{2}} e^{-\sqrt{2 k}}$
\task[\textbf{D.}] $\frac{\pi}{\sqrt{2}} e^{-\sqrt{2}|k|}$
\end{tasks}

\item The Fourier transform $\int_{-\infty}^{\infty} d x f(x) e^{i k x}$ of the function $f(x)=e^{-|x|}$
{\exyear{NET/JRF(JUNE-2018)}}

\begin{tasks}(4)
\task[\textbf{A.}] $-\frac{2}{1+k^{2}}$
\task[\textbf{B.}] $-\frac{1}{2\left(1+k^{2}\right)}$
\task[\textbf{C.}] $\frac{2}{1+k^{2}}$
\task[\textbf{D.}] $\frac{2}{\left(2+k^{2}\right)}$
\end{tasks}
\item The Heaviside function is defined as $H(t)=\left\{\begin{array}{ll}+1, & \text { for } t>0 \\ -1, & \text { for } t<0\end{array}\right.$ and its Fourier transform is given by $-2 i / \omega$. The Fourier transform of $\frac{1}{2}[H(t+1 / 2)-H(t-1 / 2)]$ is
{\exyear{GATE 2015}}

\begin{tasks}(4)
\task[\textbf{A.}] $\frac{\sin \left(\frac{\omega}{2}\right)}{\frac{\omega}{2}}$
\task[\textbf{B.}]  $\frac{\cos \left(\frac{\omega}{2}\right)}{\frac{\omega}{2}}$
\task[\textbf{C.}] $\sin \left(\frac{\omega}{2}\right)$
\task[\textbf{D.}]  0
\end{tasks}
\item The Fourier transform of the function $\frac{1}{x^{4}+3 x^{2}+2}$ up to proportionality constant is
{\exyear{JEST 2017}}

\begin{tasks}(2)
\task[\textbf{A.}] $\sqrt{2} \exp \left(-k^{2}\right)-\exp \left(-2 k^{2}\right)$
\task[\textbf{B.}]$\sqrt{2} \exp (-|k|)-\exp (-\sqrt{2}|k|)$
\task[\textbf{C.}] $\sqrt{2} \exp (-\sqrt{|k|})-\exp (-\sqrt{2|k|})$
\task[\textbf{D.}]$\sqrt{2} \exp \left(-\sqrt{2} k^{2}\right)-\exp \left(-2 k^{2}\right)$
\end{tasks}

\end{enumerate}
\colorlet{ocre1}{ocre!70!}
\colorlet{ocrel}{ocre!30!}
\setlength\arrayrulewidth{1pt}
\begin{table}[H]
	\centering
	\arrayrulecolor{ocre}
	\begin{tabular}{|p{1.5cm}|p{1.5cm}||p{1.5cm}|p{1.5cm}|}
		\hline
		\multicolumn{4}{|c|}{\textbf{Answer key}}\\\hline\hline
		\rowcolor{ocrel}Q.No.&Answer&Q.No.&Answer\\\hline
		1&\textbf{D} &2&\textbf{B}\\\hline
		3&\textbf{C} &4&\textbf{B} \\\hline
		5&\textbf{D} &6&\textbf{C} \\\hline
		7&\textbf{A}&8&\textbf{B}\\\hline
		9&\textbf{D}&10&\textbf{}\\\hline
		11&\textbf{} &12&\textbf{}\\\hline
		13&\textbf{}&14&\textbf{}\\\hline
		15&\textbf{}& &\\\hline

	\end{tabular}
\end{table}
\newpage
\begin{abox}
	Practise Set-2
\end{abox}
\begin{enumerate}
	\item The graph of the function $f(x)=\left\{\begin{array}{ll}1 & \text { for } 2 n \leq x \leq 2 n+1 \\ 0 & \text { for } 2 n+1 \leq x \leq 2 n+2\end{array}\right.$ where $n=(0,1,2, \ldots \ldots)$ is shown below. Its Laplace transform $\tilde{f}(s)$ is
{	\exyear{NET/JRF(DEC-2011)}}

	\begin{figure}[H]
		\centering
		\includegraphics[height=2.7cm,width=7.5cm]{diagram-20211005(9)-crop}
	\end{figure}
	\begin{tasks}(4)
		\task[\textbf{A.}] $\frac{1+e^{-s}}{s}$
		\task[\textbf{B.}] $\frac{1-e^{-s}}{s}$
		\task[\textbf{C.}] $\frac{1}{s\left(1+e^{-s}\right)}$
		\task[\textbf{D.}]  $\frac{1}{s\left(1-e^{-s}\right)}$
	\end{tasks}

	\item The inverse Laplace transforms of $\frac{1}{s^{2}(s+1)}$ is
	{\exyear{NET/JRF(JUNE-2013)}}

	\begin{tasks}(4)
		\task[\textbf{A.}] $\frac{1}{2} t^{2} e^{-t}$
		\task[\textbf{B.}] $\frac{1}{2} t^{2}+1-e^{-t}$
		\task[\textbf{C.}] $t-1+e^{-t}$
		\task[\textbf{D.}] $\frac{1}{2} t^{2}\left(1-e^{-t}\right)$
	\end{tasks}

	\item The Laplace transform of
	$$
	f(t)=\left\{\begin{array}{cc}
	\frac{t}{T}, & 0<t<T \\
	1 & t>T
	\end{array}\right.
	$$
	is
	{\exyear{NET/JRF(DEC-2016)}}

	\begin{tasks}(4)
		\task[\textbf{A.}] $\frac{-\left(1-e^{-s T}\right)}{s^{2} T}$
		\task[\textbf{B.}] $\frac{\left(1-e^{-s T}\right)}{s^{2} T}$
		\task[\textbf{C.}] $\frac{\left(1+e^{-s T}\right)}{s^{2} T}$
		\task[\textbf{D.}] $\frac{\left(1-e^{s T}\right)}{s^{2} T}$
	\end{tasks}

	\item Consider the differential equation $\frac{d y}{d t}+a y=e^{-b t}$ with the initial condition $y(0)=0$. Then the Laplace transform $Y(s)$ of the solution $y(t)$ is
	{\exyear{NET/JRF(DEC-2017)}}

	\begin{tasks}(4)
		\task[\textbf{A.}] $\frac{1}{(s+a)(s+b)}$
		\task[\textbf{B.}] $\frac{1}{b(s+a)}$
		\task[\textbf{C.}] $\frac{1}{a(s+b)}$
		\task[\textbf{D.}] $\frac{e^{-a}-e^{-b}}{b-a}$
	\end{tasks}

	\item If $f(x)=\left\{\begin{array}{ll}0 & \text { for } x<3, \\ x-3 & \text { for } x \geq 3\end{array}\right.$ then the Laplace transform of $f(x)$ is
	{\exyear{GATE 2010}}

	\begin{tasks}(4)
		\task[\textbf{A.}] $s^{-2} e^{3 s}$
		\task[\textbf{B.}] $s^{2} e^{3 s}$
		\task[\textbf{C.}] $s^{-2}$
		\task[\textbf{D.}] $s^{-2} e^{-3 s}$
	\end{tasks}

	\item The Laplace transform of $\frac{(\sin (a t)-a t \cos (a t))}{\left(2 a^{3}\right)}$ is
	{\exyear{JEST 2018}}

	\begin{tasks}(4)
		\task[\textbf{A.}] $\frac{2 a s}{\left(s^{2}+a^{2}\right)^{2}}$
		\task[\textbf{B.}]$\frac{s^{2}-a^{2}}{\left(s^{2}+a^{2}\right)^{2}}$
		\task[\textbf{C.}]$\frac{1}{(s+a)^{2}}$
		\task[\textbf{D.}]$\frac{1}{\left(s^{2}+a^{2}\right)^{2}}$
	\end{tasks}
\end{enumerate}
\colorlet{ocre1}{ocre!70!}
\colorlet{ocrel}{ocre!30!}
\setlength\arrayrulewidth{1pt}
\begin{table}[H]
	\centering
	\arrayrulecolor{ocre}
	\begin{tabular}{|p{1.5cm}|p{1.5cm}||p{1.5cm}|p{1.5cm}|}
		\hline
		\multicolumn{4}{|c|}{\textbf{Answer key}}\\\hline\hline
		\rowcolor{ocrel}Q.No.&Answer&Q.No.&Answer\\\hline
		1&\textbf{C} &2&\textbf{C}\\\hline
		3&\textbf{B} &4&\textbf{A} \\\hline
		5&\textbf{D} &6 &\textbf{D} \\\hline

	\end{tabular}
\end{table}
\newpage
\begin{abox}
	Practise Set-3
\end{abox}
\begin{enumerate}

	\item The Fourier transform of $f(x)=\left\{\begin{array}{cl}-1 & -1<x<0 \\ 1 & 0<x<1 \\ 0 & \text { otherwise }\end{array}\right.$ is
	\begin{tasks}(2)
		\task[\textbf{a.}] $\frac{i}{\omega} \sqrt{\frac{2}{\pi}}(\cos \omega+1)$
		\task[\textbf{b.}] $\frac{i}{\omega} \sqrt{\frac{2}{\pi}}(\cos \omega-1)$
		\task[\textbf{c.}]$-\frac{i}{\omega} \sqrt{\frac{2}{\pi}}(1+\cos \omega)$
		\task[\textbf{d.}] $\frac{i}{\omega} \sqrt{\frac{2}{\pi}}(1-\cos \omega)$
	\end{tasks}
	\begin{answer}
	\begin{align*}
	H(f)&=\int_{-\infty}^{+\infty} h(t) e^{-j 2 \pi f t} d t=\int_{0}^{+\infty} \beta e^{-\alpha t} e^{-j 2 \pi f t} d t=\beta \int_{0}^{+\infty} e^{-(\alpha+j 2 \pi f) t} d t\\
	\Rightarrow H(f)&=\left.\frac{-\beta}{\alpha+j 2 \pi f} e^{-(\alpha+j 2 \pi f) t}\right|_{0} ^{\infty}=\frac{\beta}{\alpha+j 2 \pi f}=\frac{\beta \alpha}{\alpha^{2}+(2 \pi f)^{2}}-j \frac{2 \pi f \beta}{\alpha^{2}+(2 \pi f)^{2}}\\
	\Rightarrow H(f)&=\frac{\beta}{\sqrt{\alpha^{2}+(2 \pi f)^{2}}} e^{j \tan ^{-1}[-2 \pi f / \alpha]}
	\end{align*}
	So the correct answer is \textbf{Option (d)}
\end{answer}
	\item The Fourier transform of $f(x)= \begin{cases}x, & 0<x<a \\ 0, & \text { otherwise }\end{cases}$ is
	\begin{tasks}(2)
		\task[\textbf{a.}]$\frac{1}{\sqrt{2 \pi} \cdot \omega^{2}}\left[e^{-i \omega n a}(1+i a \omega)-1\right]$
		\task[\textbf{b.}]$\frac{1}{\sqrt{2 \pi} \cdot \omega^{2}}\left[e^{-i \omega a}(1-i a \omega)-1\right]$
		\task[\textbf{c.}] $\frac{1}{\sqrt{2 \pi} \cdot \omega^{2}}\left[e^{-1 \text { tox }}(1+i a \omega)+1\right]$
		\task[\textbf{d.}] $\frac{1}{\sqrt{2 \pi} \cdot \omega^{2}}\left[e^{-i \omega a}(1-i a \omega)+1\right]$
	\end{tasks}
	\begin{answer}
	\begin{align*}
	f(x)&= \begin{cases}x, & 0<x<a \\ 0, & \text { otherwise }\end{cases}\\
	F[f(x)]&=\frac{1}{\sqrt{2 \pi}} \int_{0}^{a} x e^{-i \omega x} d x=\frac{1}{\sqrt{2 \pi}}\left[\left(\frac{x e^{-i e x}}{-i \omega}\right)_{0}^{a}-\left(\frac{e^{-i \omega x}}{(-i \omega)^{2}}\right)_{0}^{a}\right]\\&=\frac{1}{\sqrt{2 \pi}}\left[\frac{a e^{-i \omega a}}{-i \omega}-\frac{e^{-i \omega a}-1}{(-i \omega)^{2}}\right]=\frac{1}{\sqrt{2 \pi}}\left[\frac{i a \omega e^{-i e a}}{\omega^{2}}+\frac{e^{-i e a}-1}{\omega^{2}}\right]\\
	&=\frac{1}{\sqrt{2 \pi} \cdot \omega^{2}}\left[e^{-i \omega x}(1+i a \omega)-1\right]
	\end{align*}
	So the correct answer is \textbf{Option (a)}
\end{answer}

\item	If $F\left\{e^{-i 2 \text { avat }}\right\}=f(\omega+a)$, then $F(\cos 2 \pi v a t)=$ ?

\begin{answer}
	\begin{align*}
	\mathrm{F}[\cos 2 \pi v \mathrm{vat}]=\mathrm{F} \frac{\left[\mathrm{e}^{\mathrm{i} 2 \pi \mathrm{vat}}+\mathrm{e}^{-\mathrm{i} 2 \pi \mathrm{vat}}\right]}{2}=\frac{1}{2}\left\{F\left[e^{i 2 \pi v a t}\right]+F\left[e^{-i 2 \pi v a t}\right]\right\}=\frac{1}{2}[f(\omega-a)+f(\omega+a)]
	\end{align*}
\end{answer}

\item	Given that $F[\delta(x-a)]=\exp [-i 2 \pi v a]$, then $F^{-1}[\cos 2 \pi v a]=$ ?

\begin{answer}
	\begin{align*}
	\text{	As }\quad F\{\delta(x-a)\}&=\exp [-i 2 \pi v a] \quad \Rightarrow \delta(x-a)=F^{-1}[\exp (-i 2 \pi v a)]\\
	\text{Now }F^{-1}(\cos 2 \pi v a)&=F^{-1}\left[\frac{\exp (-i 2 \pi v a)+\exp (i 2 \pi v a)}{2}\right]=\frac{1}{2}[\delta(x+a)+\delta(x-a)]
	\end{align*}
\end{answer}

\item	Find the fourier cosine transform of the function $f(x)=e^{-a^{2} x^{2}}$

\begin{answer}
	\begin{align*}
	\begin{aligned}
	f_{c}(s) &=F_{c}[f(x)]=\sqrt{\frac{2}{\pi}} \int_{b}^{\infty} e^{-a^{2} x^{2}} \cos s x d x=\frac{1}{2} \sqrt{\frac{2}{\pi}} \int_{-\infty}^{\infty} e^{-a^{2} x^{2}} \cos s x d x \\
	&=\frac{1}{2} \sqrt{\frac{2}{\pi}} \text { Real part of } \int_{-\infty}^{\infty} e^{-a^{2} x^{2}} e^{i s x} d x=\frac{1}{2} \sqrt{\frac{2}{\pi}} \text { Real part of }\left(\sqrt{\frac{\pi}{a^{2}}} e^{\frac{i^{2} s^{2}}{4 a^{2}}}\right)=\frac{1}{\sqrt{2 a^{2}}} e^{-s^{2} / 4 a^{2}}
	\end{aligned}
	\end{align*}
\end{answer}

\item	Find the sine transform of $\frac{x}{1+x^{2}}$

\begin{answer}
	\begin{align}
	\text { Firstly we shall determine}&\text{ cosine transform of } \frac{1}{1+x^{2}}\notag\\
	F_{c}\left\{\frac{1}{1+x^{2}}\right\}&=\int_{0}^{\infty} \frac{\cos s x}{1+x^{2}} d x=I(\text { say })\notag\\
	\text{then }I&=\int_{0}^{\infty} \frac{\cos s x}{1+x^{2}} d x\label{FT-03}\\
	\text{Dufferentiating w.r.t.s,}\notag\\
	\frac{d I}{d s} &=\int_{0}^{\infty} \frac{-x \sin s x}{1+x^{2}} d x=F_{s}\left\{\frac{-x}{1+x^{2}}\right\}\label{FT-04} \\
	&=-\int_{0}^{\infty} \frac{x^{2} \sin s x d x}{x\left(1+x^{2}\right)}=-\int_{0}^{\infty} \frac{\left(1+x^{2}-1\right) \sin s x \cdot d x}{x\left(1+x^{2}\right)}\notag\\
	&=-\int_{0}^{\infty} \frac{\sin s x}{x} d x+\int_{0}^{\infty} \frac{\sin s x d x}{x\left(1+x^{2}\right)}=-\frac{\pi}{2}+\int_{0}^{\infty} \frac{\sin s x d x}{x\left(1+x^{2}\right)}\notag\\
	&=-\int_{0}^{\infty} \frac{\sin s x}{x} d x+\int_{0}^{\infty} \frac{\sin s x d x}{x\left(1+x^{2}\right)}=-\frac{\pi}{2}+\int_{0}^{\infty} \frac{\sin s x d x}{x\left(1+x^{2}\right)}\label{FT-05}\\
	\text{Differentiating again w.r.t. s,}\notag\\
	\frac{d^{2} I}{d s^{2}}&=\int_{0}^{\infty} \frac{x \cos (s x) d x}{x\left(1+x^{2}\right)}=I\notag\\
	\text { Or, } &\quad \frac{d^{2} I}{d s^{2}}-I=0\notag\\
	\text{The solution of it is }I&=A e^{-s}+B e^{s}\label{FT-06}\\
	\text{ Putting }\mathrm{s}&=0 \text{in (\ref{FT-03}),}\notag\\
	I &=\int_{0}^{\infty} \frac{1}{1+x^{2}} d x=\left(\tan ^{-1} x\right)_{0}^{\infty}=\frac{\pi}{2} \notag\\
	\therefore \quad I &=\frac{\pi}{2} \text { when } s=0\notag\\
	\text{Subjecting (\ref{FT-06}) to this}&\text{ condition}\notag\\
	\frac{\pi}{2}&=A+B\label{FT-07}
	\end{align}
\end{answer}
\item
	Find cosine transform of $f(x)$ if $f(x)= \begin{cases}\cos x, & 0<x<a \\ 0, & x>a\end{cases}$

\begin{answer}
	\begin{align*}
	F_{C}\{f(x)\} &=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f(x) \cos (p x) d x \\
	&=\sqrt{\frac{2}{\pi}} \int_{0}^{a} \cos x \cos (p x) d x+\int_{a}^{\infty} 0 \cdot \cos p x d x \\
	&=\sqrt{\frac{2}{\pi}} \frac{1}{2} \int_{0}^{a}[\cos (p+1) x \cos (p-1) x] d x\\
	&=\sqrt{\frac{2}{\pi}} \frac{1}{2}\left[\frac{\sin (p+1) x}{p+1}+\frac{\sin (p-1) x}{p-1}\right]_{x=0}^{a} \\
	&=\sqrt{\frac{2}{\pi}} \frac{1}{2}\left[\frac{\sin (p+1) a}{p+1}+\frac{\sin (p-1) a}{p-1}\right]
	\end{align*}
\end{answer}

\item	Fourier transform of the derivative of the Dirac $\delta$-function, namely, $\delta^{\prime}(x)$, is proportional to
	\begin{tasks}(4)
		\task[\textbf{a.}]0
		\task[\textbf{b.}]1
		\task[\textbf{c.}] $\sin k$
		\task[\textbf{d.}] $\mathrm{i} k$
	\end{tasks}

\begin{answer}
	\begin{align*}
	\text { Fourier transform of } \delta^{\prime}(x)&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} \delta^{\prime}(x) e^{i k x} d x\\
	\intertext { Using the property of Dirac delta function, } \int_{-\infty}^{\infty} f(x) \delta^{\prime}(x-a) d x&=-f^{\prime}(a)\\
	\text { So, } \quad F\left[\delta^{\prime}(x)\right]&=-\frac{1}{\sqrt{2 \pi}}(i k)  \\ F\left[\delta^{\prime}(x)\right] &\propto i k
	\end{align*}
	So the correct answer is \textbf{option (d)}
\end{answer}
\item Find the fourier transform of
$f(x)=\left\{\begin{array}{lll}1 & \text { for } & |x|<a \\ 0 & \text { for } & |x|>a\end{array}\right.$
\begin{answer}
	\begin{align}
	\intertext{The fourier transform of a function $f(x)$ is given by}
	F[f(x)]&=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} f(x) \cdot e^{i s x} d x\label{FT15}
	\intertext{Substituting the value of $f(x)$ in (\ref{FT15}), we get}
	F[f(x)] &=\frac{1}{\sqrt{2 \pi}} \int_{-a}^{a} 1 \cdot e^{i s x} d x=\left[\frac{e^{i s x}}{i s}\right]_{-a}^{a}=\frac{1}{\sqrt{2 \pi}} \frac{1}{(i s)}\left[e^{i a s}-e^{-i a s}\right] \notag\\
	&=\frac{1}{\sqrt{2 \pi}} \frac{2}{s} \cdot \frac{e^{i a s}-e^{-i a s}}{2 i}=\frac{1}{\sqrt{2 \pi}} \frac{2 \sin s a}{s}=\sqrt{\frac{2}{\pi}} \frac{\sin s a}{s}\notag
	\end{align}
\end{answer}

\item Find Fourier Sine transform of $\frac{1}{x}$
\begin{answer}
	\begin{align}
	\text{Here, }f(x)&=\frac{1}{x}\notag\\
	F_{s}[f(x)]&=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f(x) \sin s x d x\label{FT18}\\
	\text { Putting the value of } &f(x) \text { in }(\ref{FT18}) \text {, we get }\notag\\
	F_{s}\left(\frac{1}{x}\right) &=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} \frac{\sin s x}{x} d x=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} \frac{\sin \theta}{\frac{\theta}{s}} \frac{d \theta}{s} \quad \text { Putting } s x=\theta \text { so that } s d x=d \theta \notag\\
	&=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} \frac{\sin \theta}{\theta} d \theta=\sqrt{\frac{2}{\pi}}\left(\frac{\pi}{2}\right) \quad \text { [Some useful result I on page 1208] Ans. } \notag\\
	&=\sqrt{\frac{\pi}{2}}\notag
	\end{align}
\end{answer}
\item Find the Fourier Sine Transform of $e^{-a x}$
\begin{answer}
	\begin{align}
	\text{Here, }f(x)&=e^{-a x}\notag
\intertext{	The Fourier sine transform of $f(x)$ :}
	F_{s}[f(x)]&=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} f(x) \sin s x d x\label{FT19}
\intertext{	On putting the value of $f(x)$ in (\ref{FT19}), we get}
	F_{s}\left[e^{-a x}\right]&=\sqrt{\frac{2}{\pi}} \int_{0}^{\infty} e^{-a x} \sin s x d x\notag
	\intertext{On integrating by parts, we get}
	F_{s}\left[e^{-a x}\right] &=\sqrt{\frac{2}{\pi}}\left[\frac{e^{-a x}}{a^{2}+s^{2}}[-a \sin s x-s \cos s x]\right]_{0}^{\infty}\left[\int e^{a x} \sin b x d x=\frac{e^{a x}}{a^{2}+b^{2}}(a \sin b x-b \cos b x)\right] \notag\\
	&=\sqrt{\frac{2}{\pi}}\left[0-\frac{1}{a^{2}+s^{2}}(-s)\right]=\sqrt{\frac{2}{\pi}}\left(\frac{s}{a^{2}+s^{2}}\right)\notag
\end{align}
\end{answer}
\item Find the laplace transform of $f(t)=\frac{1-e^{t}}{t}$

\begin{answer}
	\begin{align*}
	\mathcal{L}\left(\frac{1-e^{t}}{t}\right)&=\int_{s}^{\infty}\left(\frac{1}{s}-\frac{1}{s-1}\right) d s=[\ln s-\ln (s-1)]_{s}^{\infty}=\left[\ln \frac{s}{s-1}\right]_{s}^{\infty}:\text{ (Using 5th property)}\\
	&=[\ln s-\ln (s-1)]_{s}^{\infty}=\left[\ln \frac{s}{s-1}\right]_{s}^{\infty}=\ln \left(\frac{1}{\left.1-\frac{1}{s}\right)_{s}}\right)^{\infty} \\
	&=0-\ln \frac{s}{s-1}=\ln \frac{(s-1)}{s}
	\end{align*}
\end{answer}

\item	Find the inverse laplace transform of
	$$\mathrm{f}(\mathrm{s}) =\frac{\mathrm{s}-2}{(\mathrm{~s}-2)^{2}+25}+\frac{\mathrm{s}+4}{(\mathrm{~s}+4)^{2}+81}+\frac{1}{(\mathrm{~s}+2)^{2}+9} $$

\begin{answer}
	\begin{align*}
	\mathcal{L}^{-1}[\mathrm{f}(\mathrm{s})] &=\mathcal{L}^{-1}\left[\frac{\mathrm{s}-2}{(\mathrm{~s}-2)^{2}+25}\right]+\mathrm{L}^{-1}\left[\frac{\mathrm{s}+4}{(\mathrm{~s}+4)^{2}+81}\right]+\mathrm{L}^{-1}\left[\frac{1}{(\mathrm{~s}+2)^{2}+9}\right] \\
	&=\mathrm{e}^{2 \mathrm{t}} \cos 5 \mathrm{t}+\mathrm{e}^{-4 \mathrm{t}} \cos 9 \mathrm{t}+\frac{\mathrm{e}^{-2 \mathrm{t}}}{3} \sin 3 \mathrm{t}
	\end{align*}
\end{answer}

\item	The graph of the function
	$$f(t)= \begin{cases}1 & \text { for } 2 n \leq t \leq 2 n+1 \\ 0 & \text { for } 2 n+1 \leq t \leq 2 n+2\end{cases}$$
	(Where $n=0,1,2,........$)is shown below.
	\begin{figure}[H]
		\centering
		\includegraphics[height=2.5cm,width=6cm]{LT-01}
	\end{figure}
	Its Laplace transform $\tilde{f}(\mathrm{s})$ is
	\begin{tasks}(2)
		\task[\textbf{a.}]$\frac{1+e^{-s}}{s}$
		\task[\textbf{b.}]$\frac{1-e^{-s}}{s}$
		\task[\textbf{c.}]$\frac{1}{s\left(1+e^{-s}\right)}$
		\task[\textbf{d.}]  $\frac{1}{s\left(1-e^{-s}\right)}$
	\end{tasks}

\begin{answer}
	Given function is a periodic function of period $T=2$
	\begin{align*}
	\mathcal{L}[f(t)] &=\frac{1}{1-e^{-s T}} \int_{0}^{T} e^{-s t} f(t) d t=\frac{1}{1-e^{-2 s}} \int_{0}^{2} e^{-s t} d t \\
	&=\frac{1}{1-e^{-2 s}}\left[\int_{0}^{1} e^{-s t} d t\right]=\frac{1}{1-e^{-2 s}}\left(\frac{1-e^{-s}}{s}\right) \\
	&=\frac{\left(1-e^{-s}\right)}{s\left(1+e^{-s}\right)\left(1-e^{-s}\right)}=\frac{1}{s\left(1+e^{-s}\right)}
	\end{align*}
	So the correct answer is \textbf{option (c)}
\end{answer}

\item	The inverse transform of $\frac{1}{s^2(s+1)}$ is
	\begin{tasks}(2)
		\task[\textbf{a.}]$\frac{1}{2} t^{2} e^{-t}$
		\task[\textbf{b.}]$\frac{1}{2} t^{2}+1-e^{-t}$
		\task[\textbf{c.}]$t-1+e^{-t}$
		\task[\textbf{d.}] $\frac{1}{2} t^{2}\left(1-e^{-t}\right)$
	\end{tasks}

\begin{answer}
	\begin{align*}
	&f(s)=\frac{1}{s^{2}(s+1)}=\frac{(s+1)-s(s+1)+s^{2}}{s^{2}(s+1)}=\frac{1}{s^{2}}-\frac{1}{s}+\frac{1}{s+1} \\
	&\Rightarrow \mathcal{L}^{-1}[f(s)]=t-1+e^{-t}
	\end{align*}
	So the correct answer is \textbf{option (c)}
\end{answer}
\end{enumerate}

CSIR- Mathematical Physics/chapter/Fourier Transform.tex