went back to the flashy styles
This commit is contained in:
@@ -1,539 +0,0 @@
|
||||
\documentclass{article}
|
||||
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{extramarks}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsthm}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{tikz}
|
||||
\usepackage[plain]{algorithm}
|
||||
\usepackage{algpseudocode}
|
||||
|
||||
\usetikzlibrary{automata,positioning}
|
||||
|
||||
%
|
||||
% Basic Document Settings
|
||||
%
|
||||
|
||||
\topmargin=-0.45in
|
||||
\evensidemargin=0in
|
||||
\oddsidemargin=0in
|
||||
\textwidth=6.5in
|
||||
\textheight=9.0in
|
||||
\headsep=0.25in
|
||||
|
||||
\linespread{1.1}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\lhead{\hmwkAuthorName}
|
||||
\chead{\hmwkClass\ (\hmwkClassInstructor\ \hmwkClassTime): \hmwkTitle}
|
||||
\rhead{\firstxmark}
|
||||
\lfoot{\lastxmark}
|
||||
\cfoot{\thepage}
|
||||
|
||||
\renewcommand\headrulewidth{0.4pt}
|
||||
\renewcommand\footrulewidth{0.4pt}
|
||||
|
||||
\setlength\parindent{0pt}
|
||||
|
||||
%
|
||||
% Create Problem Sections
|
||||
%
|
||||
|
||||
\newcommand{\enterProblemHeader}[1]{
|
||||
\nobreak\extramarks{}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
}
|
||||
|
||||
\newcommand{\exitProblemHeader}[1]{
|
||||
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
\stepcounter{#1}
|
||||
\nobreak\extramarks{Problem \arabic{#1}}{}\nobreak{}
|
||||
}
|
||||
|
||||
\setcounter{secnumdepth}{0}
|
||||
\newcounter{partCounter}
|
||||
\newcounter{homeworkProblemCounter}
|
||||
\setcounter{homeworkProblemCounter}{1}
|
||||
\nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{}
|
||||
|
||||
%
|
||||
% Homework Problem Environment
|
||||
%
|
||||
% This environment takes an optional argument. When given, it will adjust the
|
||||
% problem counter. This is useful for when the problems given for your
|
||||
% assignment aren't sequential. See the last 3 problems of this template for an
|
||||
% example.
|
||||
%
|
||||
\newenvironment{homeworkProblem}[1][-1]{
|
||||
\ifnum#1>0
|
||||
\setcounter{homeworkProblemCounter}{#1}
|
||||
\fi
|
||||
\section{Problem \arabic{homeworkProblemCounter}}
|
||||
\setcounter{partCounter}{1}
|
||||
\enterProblemHeader{homeworkProblemCounter}
|
||||
}{
|
||||
\exitProblemHeader{homeworkProblemCounter}
|
||||
}
|
||||
|
||||
%
|
||||
% Homework Details
|
||||
% - Title
|
||||
% - Due date
|
||||
% - Class
|
||||
% - Section/Time
|
||||
% - Instructor
|
||||
% - Author
|
||||
%
|
||||
|
||||
\newcommand{\hmwkTitle}{Homework\ \#2}
|
||||
\newcommand{\hmwkDueDate}{February 12, 2014}
|
||||
\newcommand{\hmwkClass}{Calculus}
|
||||
\newcommand{\hmwkClassTime}{Section A}
|
||||
\newcommand{\hmwkClassInstructor}{Professor Isaac Newton}
|
||||
\newcommand{\hmwkAuthorName}{\textbf{Josh Davis} \and \textbf{Davis Josh}}
|
||||
|
||||
%
|
||||
% Title Page
|
||||
%
|
||||
|
||||
\title{
|
||||
\vspace{2in}
|
||||
\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\
|
||||
\normalsize\vspace{0.1in}\small{Due\ on\ \hmwkDueDate\ at 3:10pm}\\
|
||||
\vspace{0.1in}\large{\textit{\hmwkClassInstructor\ \hmwkClassTime}}
|
||||
\vspace{3in}
|
||||
}
|
||||
|
||||
\author{\hmwkAuthorName}
|
||||
\date{}
|
||||
|
||||
\renewcommand{\part}[1]{\textbf{\large Part \Alph{partCounter}}\stepcounter{partCounter}\\}
|
||||
|
||||
%
|
||||
% Various Helper Commands
|
||||
%
|
||||
|
||||
% Useful for algorithms
|
||||
\newcommand{\alg}[1]{\textsc{\bfseries \footnotesize #1}}
|
||||
|
||||
% For derivatives
|
||||
\newcommand{\deriv}[1]{\frac{\mathrm{d}}{\mathrm{d}x} (#1)}
|
||||
|
||||
% For partial derivatives
|
||||
\newcommand{\pderiv}[2]{\frac{\partial}{\partial #1} (#2)}
|
||||
|
||||
% Integral dx
|
||||
\newcommand{\dx}{\mathrm{d}x}
|
||||
|
||||
% Alias for the Solution section header
|
||||
\newcommand{\solution}{\textbf{\large Solution}}
|
||||
|
||||
% Probability commands: Expectation, Variance, Covariance, Bias
|
||||
\newcommand{\E}{\mathrm{E}}
|
||||
\newcommand{\Var}{\mathrm{Var}}
|
||||
\newcommand{\Cov}{\mathrm{Cov}}
|
||||
\newcommand{\Bias}{\mathrm{Bias}}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Give an appropriate positive constant \(c\) such that \(f(n) \leq c \cdot
|
||||
g(n)\) for all \(n > 1\).
|
||||
|
||||
\begin{enumerate}
|
||||
\item \(f(n) = n^2 + n + 1\), \(g(n) = 2n^3\)
|
||||
\item \(f(n) = n\sqrt{n} + n^2\), \(g(n) = n^2\)
|
||||
\item \(f(n) = n^2 - n + 1\), \(g(n) = n^2 / 2\)
|
||||
\end{enumerate}
|
||||
|
||||
\textbf{Solution}
|
||||
|
||||
We solve each solution algebraically to determine a possible constant
|
||||
\(c\).
|
||||
\\
|
||||
|
||||
\textbf{Part One}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 + n + 1 &=
|
||||
\\
|
||||
&\leq n^2 + n^2 + n^2
|
||||
\\
|
||||
&= 3n^2
|
||||
\\
|
||||
&\leq c \cdot 2n^3
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) could be when \(c = 2\).
|
||||
\\
|
||||
|
||||
\textbf{Part Two}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 + n\sqrt{n} &=
|
||||
\\
|
||||
&= n^2 + n^{3/2}
|
||||
\\
|
||||
&\leq n^2 + n^{4/2}
|
||||
\\
|
||||
&= n^2 + n^2
|
||||
\\
|
||||
&= 2n^2
|
||||
\\
|
||||
&\leq c \cdot n^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) is \(c = 2\).
|
||||
\\
|
||||
|
||||
\textbf{Part Three}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 - n + 1 &=
|
||||
\\
|
||||
&\leq n^2
|
||||
\\
|
||||
&\leq c \cdot n^2/2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) is \(c = 2\).
|
||||
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Let \(\Sigma = \{0, 1\}\). Construct a DFA \(A\) that recognizes the
|
||||
language that consists of all binary numbers that can be divided by 5.
|
||||
\\
|
||||
|
||||
Let the state \(q_k\) indicate the remainder of \(k\) divided by 5. For
|
||||
example, the remainder of 2 would correlate to state \(q_2\) because \(7
|
||||
\mod 5 = 2\).
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]
|
||||
\node[state, accepting, initial] (q_0) {$q_0$};
|
||||
\node[state] (q_1) [right=of q_0] {$q_1$};
|
||||
\node[state] (q_2) [right=of q_1] {$q_2$};
|
||||
\node[state] (q_3) [right=of q_2] {$q_3$};
|
||||
\node[state] (q_4) [right=of q_3] {$q_4$};
|
||||
\path[->]
|
||||
(q_0)
|
||||
edge [loop above] node {0} (q_0)
|
||||
edge node {1} (q_1)
|
||||
(q_1)
|
||||
edge node {0} (q_2)
|
||||
edge [bend right=-30] node {1} (q_3)
|
||||
(q_2)
|
||||
edge [bend left] node {1} (q_0)
|
||||
edge [bend right=-30] node {0} (q_4)
|
||||
(q_3)
|
||||
edge node {1} (q_2)
|
||||
edge [bend left] node {0} (q_1)
|
||||
(q_4)
|
||||
edge node {0} (q_3)
|
||||
edge [loop below] node {1} (q_4);
|
||||
\end{tikzpicture}
|
||||
\caption{DFA, \(A\), this is really beautiful, ya know?}
|
||||
\label{fig:multiple5}
|
||||
\end{figure}
|
||||
|
||||
\textbf{Justification}
|
||||
\\
|
||||
|
||||
Take a given binary number, \(x\). Since there are only two inputs to our
|
||||
state machine, \(x\) can either become \(x0\) or \(x1\). When a 0 comes
|
||||
into the state machine, it is the same as taking the binary number and
|
||||
multiplying it by two. When a 1 comes into the machine, it is the same as
|
||||
multipying by two and adding one.
|
||||
\\
|
||||
|
||||
Using this knowledge, we can construct a transition table that tell us
|
||||
where to go:
|
||||
|
||||
\begin{table}[ht]
|
||||
\centering
|
||||
\begin{tabular}{c || c | c | c | c | c}
|
||||
& \(x \mod 5 = 0\)
|
||||
& \(x \mod 5 = 1\)
|
||||
& \(x \mod 5 = 2\)
|
||||
& \(x \mod 5 = 3\)
|
||||
& \(x \mod 5 = 4\)
|
||||
\\
|
||||
\hline
|
||||
\(x0\) & 0 & 2 & 4 & 1 & 3 \\
|
||||
\(x1\) & 1 & 3 & 0 & 2 & 4 \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
Therefore on state \(q_0\) or (\(x \mod 5 = 0\)), a transition line should
|
||||
go to state \(q_0\) for the input 0 and a line should go to state \(q_1\)
|
||||
for input 1. Continuing this gives us the Figure~\ref{fig:multiple5}.
|
||||
\end{homeworkProblem}
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Write part of \alg{Quick-Sort($list, start, end$)}
|
||||
|
||||
\begin{algorithm}[]
|
||||
\begin{algorithmic}[1]
|
||||
\Function{Quick-Sort}{$list, start, end$}
|
||||
\If{$start \geq end$}
|
||||
\State{} \Return{}
|
||||
\EndIf{}
|
||||
\State{} $mid \gets \Call{Partition}{list, start, end}$
|
||||
\State{} \Call{Quick-Sort}{$list, start, mid - 1$}
|
||||
\State{} \Call{Quick-Sort}{$list, mid + 1, end$}
|
||||
\EndFunction{}
|
||||
\end{algorithmic}
|
||||
\caption{Start of QuickSort}
|
||||
\end{algorithm}
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Suppose we would like to fit a straight line through the origin, i.e.,
|
||||
\(Y_i = \beta_1 x_i + e_i\) with \(i = 1, \ldots, n\), \(\E [e_i] = 0\),
|
||||
and \(\Var [e_i] = \sigma^2_e\) and \(\Cov[e_i, e_j] = 0, \forall i \neq
|
||||
j\).
|
||||
\\
|
||||
|
||||
\part
|
||||
|
||||
Find the least squares esimator for \(\hat{\beta_1}\) for the slope
|
||||
\(\beta_1\).
|
||||
\\
|
||||
|
||||
\solution
|
||||
|
||||
To find the least squares estimator, we should minimize our Residual Sum
|
||||
of Squares, RSS:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
RSS &= \sum_{i = 1}^{n} {(Y_i - \hat{Y_i})}^2
|
||||
\\
|
||||
&= \sum_{i = 1}^{n} {(Y_i - \hat{\beta_1} x_i)}^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
By taking the partial derivative in respect to \(\hat{\beta_1}\), we get:
|
||||
|
||||
\[
|
||||
\pderiv{
|
||||
\hat{\beta_1}
|
||||
}{RSS}
|
||||
= -2 \sum_{i = 1}^{n} {x_i (Y_i - \hat{\beta_1} x_i)}
|
||||
= 0
|
||||
\]
|
||||
|
||||
This gives us:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\sum_{i = 1}^{n} {x_i (Y_i - \hat{\beta_1} x_i)}
|
||||
&= \sum_{i = 1}^{n} {x_i Y_i} - \sum_{i = 1}^{n} \hat{\beta_1} x_i^2
|
||||
\\
|
||||
&= \sum_{i = 1}^{n} {x_i Y_i} - \hat{\beta_1}\sum_{i = 1}^{n} x_i^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Solving for \(\hat{\beta_1}\) gives the final estimator for \(\beta_1\):
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\hat{\beta_1}
|
||||
&= \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
\pagebreak
|
||||
|
||||
\part
|
||||
|
||||
Calculate the bias and the variance for the estimated slope
|
||||
\(\hat{\beta_1}\).
|
||||
\\
|
||||
|
||||
\solution
|
||||
|
||||
For the bias, we need to calculate the expected value
|
||||
\(\E[\hat{\beta_1}]\):
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\E[\hat{\beta_1}]
|
||||
&= \E \left[ \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}\right]
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i \E[Y_i]}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i (\beta_1 x_i)}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i^2 \beta_1}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \beta_1 \frac{
|
||||
\sum {x_i^2 \beta_1}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \beta_1
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus since our estimator's expected value is \(\beta_1\), we can conclude
|
||||
that the bias of our estimator is 0.
|
||||
\\
|
||||
|
||||
For the variance:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\Var[\hat{\beta_1}]
|
||||
&= \Var \left[ \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}\right]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sum {x_i^2}
|
||||
}{
|
||||
\sum x_i^2 \sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sum {x_i^2}
|
||||
}{
|
||||
\sum x_i^2 \sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
1
|
||||
}{
|
||||
\sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
1
|
||||
}{
|
||||
\sum x_i^2
|
||||
} \sigma^2
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sigma^2
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Prove a polynomial of degree \(k\), \(a_kn^k + a_{k - 1}n^{k - 1} + \hdots
|
||||
+ a_1n^1 + a_0n^0\) is a member of \(\Theta(n^k)\) where \(a_k \hdots a_0\)
|
||||
are nonnegative constants.
|
||||
|
||||
\begin{proof}
|
||||
To prove that \(a_kn^k + a_{k - 1}n^{k - 1} + \hdots + a_1n^1 +
|
||||
a_0n^0\), we must show the following:
|
||||
|
||||
\[
|
||||
\exists c_1 \exists c_2 \forall n \geq n_0,\ {c_1 \cdot g(n) \leq
|
||||
f(n) \leq c_2 \cdot g(n)}
|
||||
\]
|
||||
|
||||
For the first inequality, it is easy to see that it holds because no
|
||||
matter what the constants are, \(n^k \leq a_kn^k + a_{k - 1}n^{k - 1} +
|
||||
\hdots + a_1n^1 + a_0n^0\) even if \(c_1 = 1\) and \(n_0 = 1\). This
|
||||
is because \(n^k \leq c_1 \cdot a_kn^k\) for any nonnegative constant,
|
||||
\(c_1\) and \(a_k\).
|
||||
\\
|
||||
|
||||
Taking the second inequality, we prove it in the following way.
|
||||
By summation, \(\sum\limits_{i=0}^k a_i\) will give us a new constant,
|
||||
\(A\). By taking this value of \(A\), we can then do the following:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
a_kn^k + a_{k - 1}n^{k - 1} + \hdots + a_1n^1 + a_0n^0 &=
|
||||
\\
|
||||
&\leq (a_k + a_{k - 1} \hdots a_1 + a_0) \cdot n^k
|
||||
\\
|
||||
&= A \cdot n^k
|
||||
\\
|
||||
&\leq c_2 \cdot n^k
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
where \(n_0 = 1\) and \(c_2 = A\). \(c_2\) is just a constant. Thus the
|
||||
proof is complete.
|
||||
\end{proof}
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
%
|
||||
% Non sequential homework problems
|
||||
%
|
||||
|
||||
% Jump to problem 18
|
||||
\begin{homeworkProblem}[18]
|
||||
Evaluate \(\sum_{k=1}^{5} k^2\) and \(\sum_{k=1}^{5} (k - 1)^2\).
|
||||
\end{homeworkProblem}
|
||||
|
||||
% Continue counting to 19
|
||||
\begin{homeworkProblem}
|
||||
Find the derivative of \(f(x) = x^4 + 3x^2 - 2\)
|
||||
\end{homeworkProblem}
|
||||
|
||||
% Go back to where we left off
|
||||
\begin{homeworkProblem}[6]
|
||||
Evaluate the integrals
|
||||
\(\int_0^1 (1 - x^2) \dx\)
|
||||
and
|
||||
\(\int_1^{\infty} \frac{1}{x^2} \dx\).
|
||||
\end{homeworkProblem}
|
||||
|
||||
\end{document}
|
||||
136
general-template/letterfonts.tex
Normal file
136
general-template/letterfonts.tex
Normal file
@@ -0,0 +1,136 @@
|
||||
% number sets
|
||||
\newcommand{\RR}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{R}}{\mathbb{R}^{#1}}}}
|
||||
\newcommand{\NN}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{N}}{\mathbb{N}^{#1}}}}
|
||||
\newcommand{\ZZ}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{Z}}{\mathbb{Z}^{#1}}}}
|
||||
\newcommand{\QQ}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{Q}}{\mathbb{Q}^{#1}}}}
|
||||
\newcommand{\CC}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{C}}{\mathbb{C}^{#1}}}}
|
||||
\newcommand{\PP}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{P}}{\mathbb{P}^{#1}}}}
|
||||
\newcommand{\HH}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{H}}{\mathbb{H}^{#1}}}}
|
||||
\newcommand{\FF}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{F}}{\mathbb{F}^{#1}}}}
|
||||
% expected value
|
||||
\newcommand{\EE}{\ensuremath{\mathbb{E}}}
|
||||
|
||||
%---------------------------------------
|
||||
% BlackBoard Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\bbA}{\mathbb{A}} \newcommand{\bbB}{\mathbb{B}}
|
||||
\newcommand{\bbC}{\mathbb{C}} \newcommand{\bbD}{\mathbb{D}}
|
||||
\newcommand{\bbE}{\mathbb{E}} \newcommand{\bbF}{\mathbb{F}}
|
||||
\newcommand{\bbG}{\mathbb{G}} \newcommand{\bbH}{\mathbb{H}}
|
||||
\newcommand{\bbI}{\mathbb{I}} \newcommand{\bbJ}{\mathbb{J}}
|
||||
\newcommand{\bbK}{\mathbb{K}} \newcommand{\bbL}{\mathbb{L}}
|
||||
\newcommand{\bbM}{\mathbb{M}} \newcommand{\bbN}{\mathbb{N}}
|
||||
\newcommand{\bbO}{\mathbb{O}} \newcommand{\bbP}{\mathbb{P}}
|
||||
\newcommand{\bbQ}{\mathbb{Q}} \newcommand{\bbR}{\mathbb{R}}
|
||||
\newcommand{\bbS}{\mathbb{S}} \newcommand{\bbT}{\mathbb{T}}
|
||||
\newcommand{\bbU}{\mathbb{U}} \newcommand{\bbV}{\mathbb{V}}
|
||||
\newcommand{\bbW}{\mathbb{W}} \newcommand{\bbX}{\mathbb{X}}
|
||||
\newcommand{\bbY}{\mathbb{Y}} \newcommand{\bbZ}{\mathbb{Z}}
|
||||
|
||||
%---------------------------------------
|
||||
% MathCal Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\mcA}{\mathcal{A}} \newcommand{\mcB}{\mathcal{B}}
|
||||
\newcommand{\mcC}{\mathcal{C}} \newcommand{\mcD}{\mathcal{D}}
|
||||
\newcommand{\mcE}{\mathcal{E}} \newcommand{\mcF}{\mathcal{F}}
|
||||
\newcommand{\mcG}{\mathcal{G}} \newcommand{\mcH}{\mathcal{H}}
|
||||
\newcommand{\mcI}{\mathcal{I}} \newcommand{\mcJ}{\mathcal{J}}
|
||||
\newcommand{\mcK}{\mathcal{K}} \newcommand{\mcL}{\mathcal{L}}
|
||||
\newcommand{\mcM}{\mathcal{M}} \newcommand{\mcN}{\mathcal{N}}
|
||||
\newcommand{\mcO}{\mathcal{O}} \newcommand{\mcP}{\mathcal{P}}
|
||||
\newcommand{\mcQ}{\mathcal{Q}} \newcommand{\mcR}{\mathcal{R}}
|
||||
\newcommand{\mcS}{\mathcal{S}} \newcommand{\mcT}{\mathcal{T}}
|
||||
\newcommand{\mcU}{\mathcal{U}} \newcommand{\mcV}{\mathcal{V}}
|
||||
\newcommand{\mcW}{\mathcal{W}} \newcommand{\mcX}{\mathcal{X}}
|
||||
\newcommand{\mcY}{\mathcal{Y}} \newcommand{\mcZ}{\mathcal{Z}}
|
||||
|
||||
|
||||
|
||||
%---------------------------------------
|
||||
% Bold Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\bmA}{\boldsymbol{A}} \newcommand{\bmB}{\boldsymbol{B}}
|
||||
\newcommand{\bmC}{\boldsymbol{C}} \newcommand{\bmD}{\boldsymbol{D}}
|
||||
\newcommand{\bmE}{\boldsymbol{E}} \newcommand{\bmF}{\boldsymbol{F}}
|
||||
\newcommand{\bmG}{\boldsymbol{G}} \newcommand{\bmH}{\boldsymbol{H}}
|
||||
\newcommand{\bmI}{\boldsymbol{I}} \newcommand{\bmJ}{\boldsymbol{J}}
|
||||
\newcommand{\bmK}{\boldsymbol{K}} \newcommand{\bmL}{\boldsymbol{L}}
|
||||
\newcommand{\bmM}{\boldsymbol{M}} \newcommand{\bmN}{\boldsymbol{N}}
|
||||
\newcommand{\bmO}{\boldsymbol{O}} \newcommand{\bmP}{\boldsymbol{P}}
|
||||
\newcommand{\bmQ}{\boldsymbol{Q}} \newcommand{\bmR}{\boldsymbol{R}}
|
||||
\newcommand{\bmS}{\boldsymbol{S}} \newcommand{\bmT}{\boldsymbol{T}}
|
||||
\newcommand{\bmU}{\boldsymbol{U}} \newcommand{\bmV}{\boldsymbol{V}}
|
||||
\newcommand{\bmW}{\boldsymbol{W}} \newcommand{\bmX}{\boldsymbol{X}}
|
||||
\newcommand{\bmY}{\boldsymbol{Y}} \newcommand{\bmZ}{\boldsymbol{Z}}
|
||||
%Small Letters
|
||||
\newcommand{\bma}{\boldsymbol{a}} \newcommand{\bmb}{\boldsymbol{b}}
|
||||
\newcommand{\bmc}{\boldsymbol{c}} \newcommand{\bmd}{\boldsymbol{d}}
|
||||
\newcommand{\bme}{\boldsymbol{e}} \newcommand{\bmf}{\boldsymbol{f}}
|
||||
\newcommand{\bmg}{\boldsymbol{g}} \newcommand{\bmh}{\boldsymbol{h}}
|
||||
\newcommand{\bmi}{\boldsymbol{i}} \newcommand{\bmj}{\boldsymbol{j}}
|
||||
\newcommand{\bmk}{\boldsymbol{k}} \newcommand{\bml}{\boldsymbol{l}}
|
||||
\newcommand{\bmm}{\boldsymbol{m}} \newcommand{\bmn}{\boldsymbol{n}}
|
||||
\newcommand{\bmo}{\boldsymbol{o}} \newcommand{\bmp}{\boldsymbol{p}}
|
||||
\newcommand{\bmq}{\boldsymbol{q}} \newcommand{\bmr}{\boldsymbol{r}}
|
||||
\newcommand{\bms}{\boldsymbol{s}} \newcommand{\bmt}{\boldsymbol{t}}
|
||||
\newcommand{\bmu}{\boldsymbol{u}} \newcommand{\bmv}{\boldsymbol{v}}
|
||||
\newcommand{\bmw}{\boldsymbol{w}} \newcommand{\bmx}{\boldsymbol{x}}
|
||||
\newcommand{\bmy}{\boldsymbol{y}} \newcommand{\bmz}{\boldsymbol{z}}
|
||||
|
||||
%---------------------------------------
|
||||
% Scr Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
\newcommand{\sA}{{\mathscr{A}}} \newcommand{\sB}{{\mathscr{B}}}
|
||||
\newcommand{\sC}{{\mathscr{C}}} \newcommand{\sD}{{\mathscr{D}}}
|
||||
\newcommand{\sE}{{\mathscr{E}}} \newcommand{\sF}{{\mathscr{F}}}
|
||||
\newcommand{\sG}{{\mathscr{G}}} \newcommand{\sH}{{\mathscr{H}}}
|
||||
\newcommand{\sI}{{\mathscr{I}}} \newcommand{\sJ}{{\mathscr{J}}}
|
||||
\newcommand{\sK}{{\mathscr{K}}} \newcommand{\sL}{{\mathscr{L}}}
|
||||
\newcommand{\sM}{{\mathscr{M}}} \newcommand{\sN}{{\mathscr{N}}}
|
||||
\newcommand{\sO}{{\mathscr{O}}} \newcommand{\sP}{{\mathscr{P}}}
|
||||
\newcommand{\sQ}{{\mathscr{Q}}} \newcommand{\sR}{{\mathscr{R}}}
|
||||
\newcommand{\sS}{{\mathscr{S}}} \newcommand{\sT}{{\mathscr{T}}}
|
||||
\newcommand{\sU}{{\mathscr{U}}} \newcommand{\sV}{{\mathscr{V}}}
|
||||
\newcommand{\sW}{{\mathscr{W}}} \newcommand{\sX}{{\mathscr{X}}}
|
||||
\newcommand{\sY}{{\mathscr{Y}}} \newcommand{\sZ}{{\mathscr{Z}}}
|
||||
|
||||
|
||||
%---------------------------------------
|
||||
% Math Fraktur Font
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\mfA}{\mathfrak{A}} \newcommand{\mfB}{\mathfrak{B}}
|
||||
\newcommand{\mfC}{\mathfrak{C}} \newcommand{\mfD}{\mathfrak{D}}
|
||||
\newcommand{\mfE}{\mathfrak{E}} \newcommand{\mfF}{\mathfrak{F}}
|
||||
\newcommand{\mfG}{\mathfrak{G}} \newcommand{\mfH}{\mathfrak{H}}
|
||||
\newcommand{\mfI}{\mathfrak{I}} \newcommand{\mfJ}{\mathfrak{J}}
|
||||
\newcommand{\mfK}{\mathfrak{K}} \newcommand{\mfL}{\mathfrak{L}}
|
||||
\newcommand{\mfM}{\mathfrak{M}} \newcommand{\mfN}{\mathfrak{N}}
|
||||
\newcommand{\mfO}{\mathfrak{O}} \newcommand{\mfP}{\mathfrak{P}}
|
||||
\newcommand{\mfQ}{\mathfrak{Q}} \newcommand{\mfR}{\mathfrak{R}}
|
||||
\newcommand{\mfS}{\mathfrak{S}} \newcommand{\mfT}{\mathfrak{T}}
|
||||
\newcommand{\mfU}{\mathfrak{U}} \newcommand{\mfV}{\mathfrak{V}}
|
||||
\newcommand{\mfW}{\mathfrak{W}} \newcommand{\mfX}{\mathfrak{X}}
|
||||
\newcommand{\mfY}{\mathfrak{Y}} \newcommand{\mfZ}{\mathfrak{Z}}
|
||||
%Small Letters
|
||||
\newcommand{\mfa}{\mathfrak{a}} \newcommand{\mfb}{\mathfrak{b}}
|
||||
\newcommand{\mfc}{\mathfrak{c}} \newcommand{\mfd}{\mathfrak{d}}
|
||||
\newcommand{\mfe}{\mathfrak{e}} \newcommand{\mff}{\mathfrak{f}}
|
||||
\newcommand{\mfg}{\mathfrak{g}} \newcommand{\mfh}{\mathfrak{h}}
|
||||
\newcommand{\mfi}{\mathfrak{i}} \newcommand{\mfj}{\mathfrak{j}}
|
||||
\newcommand{\mfk}{\mathfrak{k}} \newcommand{\mfl}{\mathfrak{l}}
|
||||
\newcommand{\mfm}{\mathfrak{m}} \newcommand{\mfn}{\mathfrak{n}}
|
||||
\newcommand{\mfo}{\mathfrak{o}} \newcommand{\mfp}{\mathfrak{p}}
|
||||
\newcommand{\mfq}{\mathfrak{q}} \newcommand{\mfr}{\mathfrak{r}}
|
||||
\newcommand{\mfs}{\mathfrak{s}} \newcommand{\mft}{\mathfrak{t}}
|
||||
\newcommand{\mfu}{\mathfrak{u}} \newcommand{\mfv}{\mathfrak{v}}
|
||||
\newcommand{\mfw}{\mathfrak{w}} \newcommand{\mfx}{\mathfrak{x}}
|
||||
\newcommand{\mfy}{\mathfrak{y}} \newcommand{\mfz}{\mathfrak{z}}
|
||||
33
general-template/macros.tex
Normal file
33
general-template/macros.tex
Normal file
@@ -0,0 +1,33 @@
|
||||
\newcommand{\eps}{\epsilon}
|
||||
\newcommand{\veps}{\varepsilon}
|
||||
\newcommand{\Qed}{\begin{flushright}\qed\end{flushright}}
|
||||
|
||||
\newcommand{\parinn}{\setlength{\parindent}{1cm}}
|
||||
\newcommand{\parinf}{\setlength{\parindent}{0cm}}
|
||||
|
||||
% \newcommand{\norm}{\|\cdot\|}
|
||||
\newcommand{\inorm}{\norm_{\infty}}
|
||||
\newcommand{\opensets}{\{V_{\alpha}\}_{\alpha\in I}}
|
||||
\newcommand{\oset}{V_{\alpha}}
|
||||
\newcommand{\opset}[1]{V_{\alpha_{#1}}}
|
||||
\newcommand{\lub}{\text{lub}}
|
||||
\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}}
|
||||
\newcommand{\Del}[3]{\frac{\partial^{#1} #2}{\partial^{#1} #3}}
|
||||
\newcommand{\deld}[2]{\dfrac{\partial #1}{\partial #2}}
|
||||
\newcommand{\Deld}[3]{\dfrac{\partial^{#1} #2}{\partial^{#1} #3}}
|
||||
\newcommand{\der}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}}
|
||||
% \newcommand{\ddd}[3]{\frac{\mathrm{d}^{#3} #1}{\mathrm{d}^{#3} #2}}
|
||||
\newcommand{\lm}{\lambda}
|
||||
\newcommand{\uin}{\mathbin{\rotatebox[origin=c]{90}{$\in$}}}
|
||||
\newcommand{\usubset}{\mathbin{\rotatebox[origin=c]{90}{$\subset$}}}
|
||||
\newcommand{\lt}{\left}
|
||||
\newcommand{\rt}{\right}
|
||||
\newcommand{\bs}[1]{\boldsymbol{#1}}
|
||||
\newcommand{\exs}{\exists}
|
||||
\newcommand{\st}{\strut}
|
||||
\newcommand{\dps}[1]{\displaystyle{#1}}
|
||||
\newcommand{\id}{\text{id}}
|
||||
|
||||
|
||||
\newcommand{\sol}{\setlength{\parindent}{0cm}\textbf{\textit{Solution:}}\setlength{\parindent}{1cm} }
|
||||
\newcommand{\solve}[1]{\setlength{\parindent}{0cm}\textbf{\textit{Solution: }}\setlength{\parindent}{1cm}#1 \Qed}
|
||||
746
general-template/preamble.tex
Normal file
746
general-template/preamble.tex
Normal file
@@ -0,0 +1,746 @@
|
||||
\usepackage[tmargin=2cm,rmargin=1in,lmargin=1in,margin=0.85in,bmargin=2cm,footskip=.2in]{geometry}
|
||||
\usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools}
|
||||
\usepackage{gensymb}
|
||||
|
||||
\usepackage[varbb]{newpxmath}
|
||||
\usepackage{xfrac}
|
||||
\usepackage[makeroom]{cancel}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{bookmark}
|
||||
\usepackage{enumitem}
|
||||
\usepackage{hyperref,theoremref}
|
||||
\hypersetup{
|
||||
pdftitle={assignment},
|
||||
colorlinks=true, linkcolor=doc!90,
|
||||
bookmarksnumbered=true,
|
||||
bookmarksopen=true
|
||||
}
|
||||
\usepackage[most,many,breakable]{tcolorbox}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{varwidth}
|
||||
\usepackage{varwidth}
|
||||
\usepackage{etoolbox}
|
||||
%\usepackage{authblk}
|
||||
\usepackage{nameref}
|
||||
\usepackage{multicol,array}
|
||||
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
|
||||
\usepackage{comment} % enables the use of multi-line comments (\ifx \fi)
|
||||
\usepackage{import}
|
||||
\usepackage{xifthen}
|
||||
\usepackage{pdfpages}
|
||||
\usepackage{transparent}
|
||||
\usepackage{chngcntr}
|
||||
\usepackage{tikz}
|
||||
\usepackage{titletoc}
|
||||
|
||||
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
|
||||
\SetCommentSty{mycommfont}
|
||||
\newcommand{\incfig}[1]{%
|
||||
\def\svgwidth{\columnwidth}
|
||||
\import{./figures/}{#1.pdf_tex}
|
||||
}
|
||||
|
||||
\usepackage{tikzsymbols}
|
||||
\tikzset{
|
||||
symbol/.style={
|
||||
draw=none,
|
||||
every to/.append style={
|
||||
edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
|
||||
}
|
||||
}
|
||||
\tikzstyle{c} = [circle,fill=black,scale=0.5]
|
||||
\tikzstyle{b} = [draw, thick, black, -]
|
||||
\tikzset{
|
||||
vertex/.style={
|
||||
circle,
|
||||
draw,
|
||||
minimum size=6mm,
|
||||
inner sep=0pt
|
||||
}
|
||||
}
|
||||
|
||||
\renewcommand\qedsymbol{$\Laughey$}
|
||||
|
||||
% \usepackage{xparse}
|
||||
% \usepackage{pgffor}
|
||||
% \usepackage{emoji}
|
||||
%
|
||||
% \NewDocumentCommand{\memoji}{m o}{%
|
||||
% \IfNoValueTF{#2}
|
||||
% {\ifmmode \text{\emoji{#1}} \else \emoji{#1}\fi} % Single emoji case
|
||||
% {\foreach \index in {1,...,#2}{\ifmmode \text{\emoji{#1}} \else \emoji{#1}\fi}} % Repeated emoji case
|
||||
% }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% SELF MADE COLORS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\definecolor{doc}{RGB}{0,60,110}
|
||||
\definecolor{myg}{RGB}{56, 140, 70}
|
||||
\definecolor{myb}{RGB}{45, 111, 177}
|
||||
\definecolor{myr}{RGB}{199, 68, 64}
|
||||
\definecolor{mytheorembg}{HTML}{F2F2F9}
|
||||
\definecolor{mytheoremfr}{HTML}{00007B}
|
||||
\definecolor{mylemmabg}{HTML}{FFFAF8}
|
||||
\definecolor{mylemmafr}{HTML}{983b0f}
|
||||
\definecolor{mypropbg}{HTML}{f2fbfc}
|
||||
\definecolor{mypropfr}{HTML}{191971}
|
||||
\definecolor{myexamplebg}{HTML}{F2FBF8}
|
||||
\definecolor{myexamplefr}{HTML}{88D6D1}
|
||||
\definecolor{myexampleti}{HTML}{2A7F7F}
|
||||
\definecolor{mydefinitbg}{HTML}{E5E5FF}
|
||||
\definecolor{mydefinitfr}{HTML}{3F3FA3}
|
||||
\definecolor{notesgreen}{RGB}{0,162,0}
|
||||
\definecolor{myp}{RGB}{197, 92, 212}
|
||||
\definecolor{mygr}{HTML}{2C3338}
|
||||
\definecolor{myred}{RGB}{127,0,0}
|
||||
\definecolor{myyellow}{RGB}{169,121,69}
|
||||
\definecolor{myexercisebg}{HTML}{F2FBF8}
|
||||
\definecolor{myexercisefg}{HTML}{88D6D1}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TCOLORBOX SETUPS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\setlength{\parindent}{1cm}
|
||||
%================================
|
||||
% THEOREM BOX
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Theorem}{Theorem}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mytheorembg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mytheoremfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mytheoremfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mytheoremfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{theorem}{Theorem}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mytheorembg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mytheoremfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mytheoremfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mytheoremfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcolorbox{Theoremcon}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = mytheorembg
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{mytheoremfr}
|
||||
,sharp corners
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
}
|
||||
|
||||
%================================
|
||||
% Corollery
|
||||
%================================
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Corollary}{Corollary}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myp!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myp!85!black}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myp!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myp!85!black}
|
||||
}
|
||||
{th}
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{corollary}{Corollary}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myp!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myp!85!black}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myp!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myp!85!black}
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% LEMMA
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Lemma}{Lemma}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mylemmabg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mylemmafr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mylemmafr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mylemmafr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{lemma}{lemma}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mylemmabg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mylemmafr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mylemmafr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mylemmafr},
|
||||
}
|
||||
{th}
|
||||
|
||||
%================================
|
||||
% Exercise
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Exercise}{Exercise}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = myexercisebg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{myexercisefg},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = myexercisefg,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, myexercisefg},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{exercise}{Exercise}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = myexercisebg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{myexercisefg},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = myexercisefg,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, myexercisefg},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% PROPOSITION
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Prop}{Proposition}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mypropbg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mypropfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mypropfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mypropfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{prop}{Proposition}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mypropbg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mypropfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mypropfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mypropfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% CLAIM
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{claim}{Claim}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myg!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myg}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myg!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myg!85!black}
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
|
||||
%================================
|
||||
% EXAMPLE BOX
|
||||
%================================
|
||||
|
||||
\newtcbtheorem[number within=section]{Example}{Example}
|
||||
{%
|
||||
colback = myexamplebg
|
||||
,breakable
|
||||
,colframe = myexamplefr
|
||||
,coltitle = myexampleti
|
||||
,boxrule = 1pt
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper=\tcbtitle\par\smallskip
|
||||
,fonttitle = \bfseries
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,description delimiters parenthesis
|
||||
}
|
||||
{ex}
|
||||
|
||||
\newtcbtheorem[number within=chapter]{example}{Example}
|
||||
{%
|
||||
colback = myexamplebg
|
||||
,breakable
|
||||
,colframe = myexamplefr
|
||||
,coltitle = myexampleti
|
||||
,boxrule = 1pt
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper=\tcbtitle\par\smallskip
|
||||
,fonttitle = \bfseries
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,description delimiters parenthesis
|
||||
}
|
||||
{ex}
|
||||
|
||||
%================================
|
||||
% DEFINITION BOX
|
||||
%================================
|
||||
|
||||
\newtcbtheorem[number within=section]{Definition}{Definition}{enhanced,
|
||||
before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
|
||||
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
|
||||
boxed title style={frame code={
|
||||
\path[fill=tcbcolback]
|
||||
([yshift=-1mm,xshift=-1mm]frame.north west)
|
||||
arc[start angle=0,end angle=180,radius=1mm]
|
||||
([yshift=-1mm,xshift=1mm]frame.north east)
|
||||
arc[start angle=180,end angle=0,radius=1mm];
|
||||
\path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
|
||||
middle color=tcbcolback!80!black]
|
||||
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
|
||||
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
|
||||
-- (frame.south east) -- (frame.south west)
|
||||
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
|
||||
[sharp corners]-- cycle;
|
||||
},interior engine=empty,
|
||||
},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},#1}{def}
|
||||
\newtcbtheorem[number within=chapter]{definition}{Definition}{enhanced,
|
||||
before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
|
||||
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
|
||||
boxed title style={frame code={
|
||||
\path[fill=tcbcolback]
|
||||
([yshift=-1mm,xshift=-1mm]frame.north west)
|
||||
arc[start angle=0,end angle=180,radius=1mm]
|
||||
([yshift=-1mm,xshift=1mm]frame.north east)
|
||||
arc[start angle=180,end angle=0,radius=1mm];
|
||||
\path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
|
||||
middle color=tcbcolback!80!black]
|
||||
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
|
||||
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
|
||||
-- (frame.south east) -- (frame.south west)
|
||||
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
|
||||
[sharp corners]-- cycle;
|
||||
},interior engine=empty,
|
||||
},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},#1}{def}
|
||||
|
||||
|
||||
%================================
|
||||
% EXERCISE BOX
|
||||
%================================
|
||||
|
||||
\newcounter{questioncounter}
|
||||
\counterwithin{questioncounter}{chapter}
|
||||
% \counterwithin{questioncounter}{section}
|
||||
|
||||
\makeatletter
|
||||
\newtcbtheorem[use counter=questioncounter]{question}{Question}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=myb!80!black,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
\makeatother
|
||||
|
||||
%================================
|
||||
% SOLUTION BOX
|
||||
%================================
|
||||
|
||||
\makeatletter
|
||||
\newtcolorbox{solution}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=myg!80!black,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
title=Solution,
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
}
|
||||
\makeatother
|
||||
|
||||
%================================
|
||||
% Question BOX
|
||||
%================================
|
||||
|
||||
\makeatletter
|
||||
\newtcbtheorem{qstion}{Question}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=mygr,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
\makeatother
|
||||
|
||||
\newtcbtheorem[number within=chapter]{wconc}{Wrong Concept}{
|
||||
breakable,
|
||||
enhanced,
|
||||
colback=white,
|
||||
colframe=myr,
|
||||
arc=0pt,
|
||||
outer arc=0pt,
|
||||
fonttitle=\bfseries\sffamily\large,
|
||||
colbacktitle=myr,
|
||||
attach boxed title to top left={},
|
||||
boxed title style={
|
||||
enhanced,
|
||||
skin=enhancedfirst jigsaw,
|
||||
arc=3pt,
|
||||
bottom=0pt,
|
||||
interior style={fill=myr}
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
|
||||
|
||||
%================================
|
||||
% NOTE BOX
|
||||
%================================
|
||||
|
||||
\usetikzlibrary{arrows,calc,shadows.blur}
|
||||
\tcbuselibrary{skins}
|
||||
\newtcolorbox{note}[1][]{%
|
||||
enhanced jigsaw,
|
||||
colback=gray!20!white,%
|
||||
colframe=gray!80!black,
|
||||
size=small,
|
||||
boxrule=1pt,
|
||||
title=\textbf{Note:-},
|
||||
halign title=flush center,
|
||||
coltitle=black,
|
||||
breakable,
|
||||
drop shadow=black!50!white,
|
||||
attach boxed title to top left={xshift=1cm,yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
|
||||
minipage boxed title=1.5cm,
|
||||
boxed title style={%
|
||||
colback=white,
|
||||
size=fbox,
|
||||
boxrule=1pt,
|
||||
boxsep=2pt,
|
||||
underlay={%
|
||||
\coordinate (dotA) at ($(interior.west) + (-0.5pt,0)$);
|
||||
\coordinate (dotB) at ($(interior.east) + (0.5pt,0)$);
|
||||
\begin{scope}
|
||||
\clip (interior.north west) rectangle ([xshift=3ex]interior.east);
|
||||
\filldraw [white, blur shadow={shadow opacity=60, shadow yshift=-.75ex}, rounded corners=2pt] (interior.north west) rectangle (interior.south east);
|
||||
\end{scope}
|
||||
\begin{scope}[gray!80!black]
|
||||
\fill (dotA) circle (2pt);
|
||||
\fill (dotB) circle (2pt);
|
||||
\end{scope}
|
||||
},
|
||||
},
|
||||
#1,
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% SELF MADE COMMANDS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\newcommand{\thm}[2]{\begin{Theorem}{#1}{}#2\end{Theorem}}
|
||||
\newcommand{\cor}[2]{\begin{Corollary}{#1}{}#2\end{Corollary}}
|
||||
\newcommand{\mlemma}[2]{\begin{Lemma}{#1}{}#2\end{Lemma}}
|
||||
\newcommand{\mer}[2]{\begin{Exercise}{#1}{}#2\end{Exercise}}
|
||||
\newcommand{\mprop}[2]{\begin{Prop}{#1}{}#2\end{Prop}}
|
||||
\newcommand{\clm}[3]{\begin{claim}{#1}{#2}#3\end{claim}}
|
||||
\newcommand{\wc}[2]{\begin{wconc}{#1}{}\setlength{\parindent}{1cm}#2\end{wconc}}
|
||||
\newcommand{\thmcon}[1]{\begin{Theoremcon}{#1}\end{Theoremcon}}
|
||||
\newcommand{\ex}[2]{\begin{Example}{#1}{}#2\end{Example}}
|
||||
\newcommand{\dfn}[2]{\begin{Definition}[colbacktitle=red!75!black]{#1}{}#2\end{Definition}}
|
||||
\newcommand{\dfnc}[2]{\begin{definition}[colbacktitle=red!75!black]{#1}{}#2\end{definition}}
|
||||
\newcommand{\qs}[2]{\begin{question}{#1}{}#2\end{question}}
|
||||
\newcommand{\pf}[2]{\begin{myproof}[#1]#2\end{myproof}}
|
||||
\newcommand{\nt}[1]{\begin{note}#1\end{note}}
|
||||
|
||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
|
||||
\newcommand\getcurrentref[1]{%
|
||||
\ifnumequal{\value{#1}}{0}
|
||||
{??}
|
||||
{\the\value{#1}}%
|
||||
}
|
||||
\newcommand{\getCurrentSectionNumber}{\getcurrentref{section}}
|
||||
\newenvironment{myproof}[1][\proofname]{%
|
||||
\proof[\bfseries #1: ]%
|
||||
}{\endproof}
|
||||
|
||||
\newcommand{\mclm}[2]{\begin{myclaim}[#1]#2\end{myclaim}}
|
||||
\newenvironment{myclaim}[1][\claimname]{\proof[\bfseries #1: ]}{}
|
||||
\newenvironment{iclaim}[1][\claimname]{\bfseries #1\mdseries:}{}
|
||||
\newcommand{\iclm}[2]{\begin{iclaim}[#1]#2\end{iclaim}}
|
||||
|
||||
\newcounter{mylabelcounter}
|
||||
|
||||
\makeatletter
|
||||
\newcommand{\setword}[2]{%
|
||||
\phantomsection
|
||||
#1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
|
||||
}
|
||||
\makeatother
|
||||
|
||||
% deliminators
|
||||
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
|
||||
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
|
||||
|
||||
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
|
||||
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
|
||||
\DeclarePairedDelimiter{\round}{\lfloor}{\rceil}
|
||||
|
||||
\newsavebox\diffdbox
|
||||
\newcommand{\slantedromand}{{\mathpalette\makesl{d}}}
|
||||
\newcommand{\makesl}[2]{%
|
||||
\begingroup
|
||||
\sbox{\diffdbox}{$\mathsurround=0pt#1\mathrm{#2}$}%
|
||||
\pdfsave
|
||||
\pdfsetmatrix{1 0 0.2 1}%
|
||||
\rlap{\usebox{\diffdbox}}%
|
||||
\pdfrestore
|
||||
\hskip\wd\diffdbox
|
||||
\endgroup
|
||||
}
|
||||
\newcommand{\dd}[1][]{\ensuremath{\mathop{}\!\ifstrempty{#1}{%
|
||||
\slantedromand\@ifnextchar^{\hspace{0.2ex}}{\hspace{0.1ex}}}%
|
||||
{\slantedromand\hspace{0.2ex}^{#1}}}}
|
||||
\ProvideDocumentCommand\dv{o m g}{%
|
||||
\ensuremath{%
|
||||
\IfValueTF{#3}{%
|
||||
\IfNoValueTF{#1}{%
|
||||
\frac{\dd #2}{\dd #3}%
|
||||
}{%
|
||||
\frac{\dd^{#1} #2}{\dd #3^{#1}}%
|
||||
}%
|
||||
}{%
|
||||
\IfNoValueTF{#1}{%
|
||||
\frac{\dd}{\dd #2}%
|
||||
}{%
|
||||
\frac{\dd^{#1}}{\dd #2^{#1}}%
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
\providecommand*{\pdv}[3][]{\frac{\partial^{#1}#2}{\partial#3^{#1}}}
|
||||
% - others
|
||||
\DeclareMathOperator{\Lap}{\mathcal{L}}
|
||||
\DeclareMathOperator{\Var}{Var} % varience
|
||||
\DeclareMathOperator{\Cov}{Cov} % covarience
|
||||
\DeclareMathOperator{\E}{E} % expected
|
||||
|
||||
% Since the amsthm package isn't loaded
|
||||
|
||||
% I prefer the slanted \leq
|
||||
\let\oldleq\leq % save them in case they're every wanted
|
||||
\let\oldgeq\geq
|
||||
\renewcommand{\leq}{\leqslant}
|
||||
\renewcommand{\geq}{\geqslant}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TABLE OF CONTENTS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\contentsmargin{0cm}
|
||||
\titlecontents{chapter}[3.7pc]
|
||||
{\addvspace{30pt}%
|
||||
\begin{tikzpicture}[remember picture, overlay]%
|
||||
\draw[fill=doc!60,draw=doc!60] (-7,-.1) rectangle (-0.9,.5);%
|
||||
\pgftext[left,x=-3.7cm,y=0.2cm]{\color{white}\Large\sc\bfseries Chapter\ \thecontentslabel};%
|
||||
\end{tikzpicture}\color{doc!60}\large\sc\bfseries}%
|
||||
{}
|
||||
{}
|
||||
{\;\titlerule\;\large\sc\bfseries Page \thecontentspage
|
||||
\begin{tikzpicture}[remember picture, overlay]
|
||||
\draw[fill=doc!60,draw=doc!60] (2pt,0) rectangle (4,0.1pt);
|
||||
\end{tikzpicture}}%
|
||||
\titlecontents{section}[3.7pc]
|
||||
{\addvspace{2pt}}
|
||||
{\contentslabel[\thecontentslabel]{2pc}}
|
||||
{}
|
||||
{\hfill\small \thecontentspage}
|
||||
[]
|
||||
\titlecontents*{subsection}[3.7pc]
|
||||
{\addvspace{-1pt}\small}
|
||||
{}
|
||||
{}
|
||||
{\ --- \small\thecontentspage}
|
||||
[ \textbullet\ ][]
|
||||
|
||||
\makeatletter
|
||||
\renewcommand{\tableofcontents}{%
|
||||
\chapter*{%
|
||||
\vspace*{-20\p@}%
|
||||
\begin{tikzpicture}[remember picture, overlay]%
|
||||
\pgftext[right,x=15cm,y=0.2cm]{\color{doc!60}\Huge\sc\bfseries \contentsname};%
|
||||
\draw[fill=doc!60,draw=doc!60] (13,-.75) rectangle (20,1);%
|
||||
\clip (13,-.75) rectangle (20,1);
|
||||
\pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
|
||||
\end{tikzpicture}}%
|
||||
\@starttoc{toc}}
|
||||
\makeatother
|
||||
128
general-template/template.tex
Normal file
128
general-template/template.tex
Normal file
@@ -0,0 +1,128 @@
|
||||
\documentclass{report}
|
||||
|
||||
\input{preamble}
|
||||
\input{macros}
|
||||
\input{letterfonts}
|
||||
|
||||
\title{\Huge{Some Class}\\Random Examples}
|
||||
\author{\huge{Your Name}}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\newpage% or \cleardoublepage
|
||||
% \pdfbookmark[<level>]{<title>}{<dest>}
|
||||
\pdfbookmark[section]{\contentsname}{toc}
|
||||
\tableofcontents
|
||||
\pagebreak
|
||||
|
||||
\chapter{}
|
||||
\section{Random Examples}
|
||||
\dfn{Limit of Sequence in $\bs{\bbR}$}{Let $\{s_n\}$ be a sequence in $\bbR$. We say $$\lim_{n\to\infty}s_n=s$$ where $s\in\bbR$ if $\forall$ real numbers $\eps>0$ $\exists$ natural number $N$ such that for $n>N$ $$s-\eps<s_n<s+\eps\text{ i.e. }|s-s_n|<\eps$$}
|
||||
\qs{}{Is the set ${x-}$axis${\setminus\{\text{Origin}\}}$ a closed set}
|
||||
\sol We have to take its complement and check whether that set is a open set i.e. if it is a union of open balls
|
||||
\nt{We will do topology in Normed Linear Space (Mainly $\bbR^n$ and occasionally $\bbC^n$)using the language of Metric Space}
|
||||
\clm{Topology}{}{Topology is cool}
|
||||
\ex{Open Set and Close Set}{
|
||||
\begin{tabular}{rl}
|
||||
Open Set: & $\bullet$ $\phi$ \\
|
||||
& $\bullet$ $\bigcup\limits_{x\in X}B_r(x)$ (Any $r>0$ will do) \\[3mm]
|
||||
& $\bullet$ $B_r(x)$ is open \\
|
||||
Closed Set: & $\bullet$ $X,\ \phi$ \\
|
||||
& $\bullet$ $\overline{B_r(x)}$ \\
|
||||
& $x-$axis $\cup$ $y-$axis
|
||||
\end{tabular}}
|
||||
\thm{}{If $x\in$ open set $V$ then $\exists$ $\delta>0$ such that $B_{\delta}(x)\subset V$}
|
||||
\begin{myproof}By openness of $V$, $x\in B_r(u)\subset V$
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
\draw[red] (0,0) circle [x radius=3.5cm, y radius=2cm] ;
|
||||
\draw (3,1.6) node[red]{$V$};
|
||||
\draw [blue] (1,0) circle (1.45cm) ;
|
||||
\filldraw[blue] (1,0) circle (1pt) node[anchor=north]{$u$};
|
||||
\draw (2.9,0.4) node[blue]{$B_r(u)$};
|
||||
\draw [green!40!black] (1.7,0) circle (0.5cm) node [yshift=0.7cm]{$B_{\delta}(x)$} ;
|
||||
\filldraw[green!40!black] (1.7,0) circle (1pt) node[anchor=west]{$x$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
Given $x\in B_r(u)\subset V$, we want $\delta>0$ such that $x\in B_{\delta} (x)\subset B_r(u)\subset V$. Let $d=d(u,x)$. Choose $\delta $ such that $d+\delta<r$ (e.g. $\delta<\frac{r-d}{2}$)
|
||||
|
||||
If $y\in B_{\delta}(x)$ we will be done by showing that $d(u,y)<r$ but $$d(u,y)\leq d(u,x)+d(x,y)<d+\delta<r$$
|
||||
\end{myproof}
|
||||
|
||||
\cor{}{By the result of the proof, we can then show...}
|
||||
\mlenma{}{Suppose $\vec{v_1}, \dots, \vec{v_n} \in \RR[n]$ is subspace of $\RR^n$.}
|
||||
\mprop{}{$1 + 1 = 2$.}
|
||||
|
||||
\section{Random}
|
||||
\dfn{Normed Linear Space and Norm $\boldsymbol{\|\cdot\|}$}{Let $V$ be a vector space over $\bbR$ (or $\bbC$). A norm on $V$ is function $\|\cdot\|\ V\to \bbR_{\geq 0}$ satisfying \begin{enumerate}[label=\bfseries\tiny\protect\circled{\small\arabic*}]
|
||||
\item \label{n:1}$\|x\|=0 \iff x=0$ $\forall$ $x\in V$
|
||||
\item \label{n:2} $\|\lambda x\|=|\lambda|\|x\|$ $\forall$ $\lambda\in\bbR$(or $\bbC$), $x\in V$
|
||||
\item \label{n:3} $\|x+y\| \leq \|x\|+\|y\|$ $\forall$ $x,y\in V$ (Triangle Inequality/Subadditivity)
|
||||
\end{enumerate}And $V$ is called a normed linear space.
|
||||
|
||||
$\bullet $ Same definition works with $V$ a vector space over $\bbC$ (again $\|\cdot\|\to\bbR_{\geq 0}$) where \ref{n:2} becomes $\|\lambda x\|=|\lambda|\|x\|$ $\forall$ $\lambda\in\bbC$, $x\in V$, where for $\lambda=a+ib$, $|\lambda|=\sqrt{a^2+b^2}$ }
|
||||
|
||||
|
||||
\ex{$\bs{p-}$Norm}{\label{pnorm}$V={\bbR}^m$, $p\in\bbR_{\geq 0}$. Define for $x=(x_1,x_2,\cdots,x_m)\in\bbR^m$ $$\|x\|_p=\Big(|x_1|^p+|x_2|^p+\cdots+|x_m|^p\Big)^{\frac1p}$$(In school $p=2$)}
|
||||
\textbf{Special Case $\bs{p=1}$}: $\|x\|_1=|x_1|+|x_2|+\cdots+|x_m|$ is clearly a norm by usual triangle inequality. \par
|
||||
\textbf{Special Case $\bs{p\to\infty\ (\bbR^m$ with $\|\cdot\|_{\infty})}$}: $\|x\|_{\infty}=\max\{|x_1|,|x_2|,\cdots,|x_m|\}$\\
|
||||
For $m=1$ these $p-$norms are nothing but $|x|$.
|
||||
Now exercise
|
||||
\qs{}{\label{exs1}Prove that triangle inequality is true if $p\geq 1$ for $p-$norms. (What goes wrong for $p<1$ ?)}
|
||||
\sol{\textbf{For Property \ref{n:3} for norm-2} \subsubsection*{\textbf{When field is $\bbR:$}} We have to show\begin{align*}
|
||||
& \sum_i(x_i+y_i)^2\leq \left(\sqrt{\sum_ix_i^2} +\sqrt{\sum_iy_i^2}\right)^2 \\
|
||||
\implies & \sum_i (x_i^2+2x_iy_i+y_i^2)\leq \sum_ix_i^2+2\sqrt{\left[\sum_ix_i^2\right]\left[\sum_iy_i^2\right]}+\sum_iy_i^2 \\
|
||||
\implies & \left[\sum_ix_iy_i\right]^2\leq \left[\sum_ix_i^2\right]\left[\sum_iy_i^2\right]
|
||||
\end{align*}So in other words prove $\langle x,y\rangle^2 \leq \langle x,x\rangle\langle y,y\rangle$ where
|
||||
$$\langle x,y\rangle =\sum\limits_i x_iy_i$$
|
||||
|
||||
\begin{note}
|
||||
\begin{itemize}
|
||||
\item $\|x\|^2=\langle x,x\rangle$
|
||||
\item $\langle x,y\rangle=\langle y,x\rangle$
|
||||
\item $\langle \cdot,\cdot\rangle$ is $\bbR-$linear in each slot i.e. \begin{align*}
|
||||
\langle rx+x',y\rangle=r\langle x,y\rangle+\langle x',y\rangle \text{ and similarly for second slot}
|
||||
\end{align*}Here in $\langle x,y\rangle$ $x$ is in first slot and $y$ is in second slot.
|
||||
\end{itemize}
|
||||
\end{note}Now the statement is just the Cauchy-Schwartz Inequality. For proof $$\langle x,y\rangle^2\leq \langle x,x\rangle\langle y,y\rangle $$ expand everything of $\langle x-\lambda y,x-\lambda y\rangle$ which is going to give a quadratic equation in variable $\lambda $ \begin{align*}
|
||||
\langle x-\lambda y,x-\lambda y\rangle & =\langle x,x-\lambda y\rangle-\lambda\langle y,x-\lambda y\rangle \\
|
||||
& =\langle x ,x\rangle -\lambda\langle x,y\rangle -\lambda\langle y,x\rangle +\lambda^2\langle y,y\rangle \\
|
||||
& =\langle x,x\rangle -2\lambda\langle x,y\rangle+\lambda^2\langle y,y\rangle
|
||||
\end{align*}Now unless $x=\lambda y$ we have $\langle x-\lambda y,x-\lambda y\rangle>0$ Hence the quadratic equation has no root therefore the discriminant is greater than zero.
|
||||
|
||||
\subsubsection*{\textbf{When field is $\bbC:$}}Modify the definition by $$\langle x,y\rangle=\sum_i\overline{x_i}y_i$$Then we still have $\langle x,x\rangle\geq 0$}
|
||||
|
||||
\section{Algorithms}
|
||||
\begin{algorithm}[H]
|
||||
\KwIn{This is some input}
|
||||
\KwOut{This is some output}
|
||||
\SetAlgoLined
|
||||
\SetNoFillComment
|
||||
\tcc{This is a comment}
|
||||
\vspace{3mm}
|
||||
some code here\;
|
||||
$x \leftarrow 0$\;
|
||||
$y \leftarrow 0$\;
|
||||
\uIf{$ x > 5$} {
|
||||
x is greater than 5 \tcp*{This is also a comment}
|
||||
}
|
||||
\Else {
|
||||
x is less than or equal to 5\;
|
||||
}
|
||||
\ForEach{y in 0..5} {
|
||||
$y \leftarrow y + 1$\;
|
||||
}
|
||||
\For{$y$ in $0..5$} {
|
||||
$y \leftarrow y - 1$\;
|
||||
}
|
||||
\While{$x > 5$} {
|
||||
$x \leftarrow x - 1$\;
|
||||
}
|
||||
\Return Return something here\;
|
||||
\caption{what}
|
||||
\end{algorithm}
|
||||
|
||||
\end{document}
|
||||
Binary file not shown.
@@ -1,541 +0,0 @@
|
||||
\documentclass{article}
|
||||
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{extramarks}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amsthm}
|
||||
\usepackage{amsfonts}
|
||||
\usepackage{tikz}
|
||||
\usepackage[plain]{algorithm}
|
||||
\usepackage{algpseudocode}
|
||||
\usepackage{comment}
|
||||
\usetikzlibrary{automata,positioning}
|
||||
|
||||
%
|
||||
% Basic Document Settings
|
||||
%
|
||||
|
||||
\topmargin=-0.45in
|
||||
\evensidemargin=0in
|
||||
\oddsidemargin=0in
|
||||
\textwidth=6.5in
|
||||
\textheight=9.0in
|
||||
\headsep=0.25in
|
||||
|
||||
\linespread{1.1}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\lhead{\hmwkAuthorName}
|
||||
\chead{\hmwkClass\ (\hmwkClassInstructor\ \hmwkClassTime): \hmwkTitle}
|
||||
\rhead{\firstxmark}
|
||||
\lfoot{\lastxmark}
|
||||
\cfoot{\thepage}
|
||||
|
||||
\renewcommand\headrulewidth{0.4pt}
|
||||
\renewcommand\footrulewidth{0.4pt}
|
||||
|
||||
\setlength\parindent{0pt}
|
||||
|
||||
%
|
||||
% Create Problem Sections
|
||||
%
|
||||
|
||||
\newcommand{\enterProblemHeader}[1]{
|
||||
\nobreak\extramarks{}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
}
|
||||
|
||||
\newcommand{\exitProblemHeader}[1]{
|
||||
\nobreak\extramarks{Problem \arabic{#1} (continued)}{Problem \arabic{#1} continued on next page\ldots}\nobreak{}
|
||||
\stepcounter{#1}
|
||||
\nobreak\extramarks{Problem \arabic{#1}}{}\nobreak{}
|
||||
}
|
||||
|
||||
\setcounter{secnumdepth}{0}
|
||||
\newcounter{partCounter}
|
||||
\newcounter{homeworkProblemCounter}
|
||||
\setcounter{homeworkProblemCounter}{1}
|
||||
\nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{}
|
||||
|
||||
%
|
||||
% Homework Problem Environment
|
||||
%
|
||||
% This environment takes an optional argument. When given, it will adjust the
|
||||
% problem counter. This is useful for when the problems given for your
|
||||
% assignment aren't sequential. See the last 3 problems of this template for an
|
||||
% example.
|
||||
%
|
||||
\newenvironment{homeworkProblem}[1][-1]{
|
||||
\ifnum#1>0
|
||||
\setcounter{homeworkProblemCounter}{#1}
|
||||
\fi
|
||||
\section{Problem \arabic{homeworkProblemCounter}}
|
||||
\setcounter{partCounter}{1}
|
||||
\enterProblemHeader{homeworkProblemCounter}
|
||||
}{
|
||||
\exitProblemHeader{homeworkProblemCounter}
|
||||
}
|
||||
|
||||
%
|
||||
% Homework Details
|
||||
% - Title
|
||||
% - Due date
|
||||
% - Class
|
||||
% - Section/Time
|
||||
% - Instructor
|
||||
% - Author
|
||||
%
|
||||
|
||||
\newcommand{\hmwkTitle}{Homework\ \#1}
|
||||
\newcommand{\hmwkDueDate}{September 21, 2025}
|
||||
\newcommand{\hmwkClass}{Calc III}
|
||||
\newcommand{\hmwkClassTime}{$6^{\text{th}}$ Hour}}
|
||||
\newcommand{\hmwkClassInstructor}{Professor Foresee}
|
||||
\newcommand{\hmwkAuthorName}{\textbf{Krishna A.}}
|
||||
|
||||
%
|
||||
% Title Page
|
||||
%
|
||||
|
||||
\title{
|
||||
\vspace{2in}
|
||||
\textmd{\textbf{\hmwkClass:\ \hmwkTitle}}\\
|
||||
\normalsize\vspace{0.1in}\small{Due\ on\ \hmwkDueDate\ at 3:10pm}\\
|
||||
\vspace{0.1in}\large{\textit{\hmwkClassInstructor\ \hmwkClassTime}}
|
||||
\vspace{3in}
|
||||
}
|
||||
|
||||
\author{\hmwkAuthorName}
|
||||
\date{}
|
||||
|
||||
\renewcommand{\part}[1]{\textbf{\large Part \Alph{partCounter}}\stepcounter{partCounter}\\}
|
||||
|
||||
%
|
||||
% Various Helper Commands
|
||||
%
|
||||
|
||||
% Useful for algorithms
|
||||
\newcommand{\alg}[1]{\textsc{\bfseries \footnotesize #1}}
|
||||
|
||||
% For derivatives
|
||||
\newcommand{\deriv}[1]{\frac{\mathrm{d}}{\mathrm{d}x} (#1)}
|
||||
|
||||
% For partial derivatives
|
||||
\newcommand{\pderiv}[2]{\frac{\partial}{\partial #1} (#2)}
|
||||
|
||||
% Integral dx
|
||||
\newcommand{\dx}{\mathrm{d}x}
|
||||
|
||||
% Alias for the Solution section header
|
||||
\newcommand{\solution}{\textbf{\large Solution}}
|
||||
|
||||
% Probability commands: Expectation, Variance, Covariance, Bias
|
||||
\newcommand{\E}{\mathrm{E}}
|
||||
\newcommand{\Var}{\mathrm{Var}}
|
||||
\newcommand{\Cov}{\mathrm{Cov}}
|
||||
\newcommand{\Bias}{\mathrm{Bias}}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{comment}
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Give an appropriate positive constant \(c\) such that \(f(n) \leq c \cdot
|
||||
g(n)\) for all \(n > 1\).
|
||||
|
||||
\begin{enumerate}
|
||||
\item \(f(n) = n^2 + n + 1\), \(g(n) = 2n^3\)
|
||||
\item \(f(n) = n\sqrt{n} + n^2\), \(g(n) = n^2\)
|
||||
\item \(f(n) = n^2 - n + 1\), \(g(n) = n^2 / 2\)
|
||||
\end{enumerate}
|
||||
|
||||
\textbf{Solution}
|
||||
|
||||
We solve each solution algebraically to determine a possible constant
|
||||
\(c\).
|
||||
\\
|
||||
|
||||
\textbf{Part One}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 + n + 1 &=
|
||||
\\
|
||||
&\leq n^2 + n^2 + n^2
|
||||
\\
|
||||
&= 3n^2
|
||||
\\
|
||||
&\leq c \cdot 2n^3
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) could be when \(c = 2\).
|
||||
\\
|
||||
|
||||
\textbf{Part Two}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 + n\sqrt{n} &=
|
||||
\\
|
||||
&= n^2 + n^{3/2}
|
||||
\\
|
||||
&\leq n^2 + n^{4/2}
|
||||
\\
|
||||
&= n^2 + n^2
|
||||
\\
|
||||
&= 2n^2
|
||||
\\
|
||||
&\leq c \cdot n^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) is \(c = 2\).
|
||||
\\
|
||||
|
||||
\textbf{Part Three}
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
n^2 - n + 1 &=
|
||||
\\
|
||||
&\leq n^2
|
||||
\\
|
||||
&\leq c \cdot n^2/2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus a valid \(c\) is \(c = 2\).
|
||||
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Let \(\Sigma = \{0, 1\}\). Construct a DFA \(A\) that recognizes the
|
||||
language that consists of all binary numbers that can be divided by 5.
|
||||
\\
|
||||
|
||||
Let the state \(q_k\) indicate the remainder of \(k\) divided by 5. For
|
||||
example, the remainder of 2 would correlate to state \(q_2\) because \(7
|
||||
\mod 5 = 2\).
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]
|
||||
\node[state, accepting, initial] (q_0) {$q_0$};
|
||||
\node[state] (q_1) [right=of q_0] {$q_1$};
|
||||
\node[state] (q_2) [right=of q_1] {$q_2$};
|
||||
\node[state] (q_3) [right=of q_2] {$q_3$};
|
||||
\node[state] (q_4) [right=of q_3] {$q_4$};
|
||||
\path[->]
|
||||
(q_0)
|
||||
edge [loop above] node {0} (q_0)
|
||||
edge node {1} (q_1)
|
||||
(q_1)
|
||||
edge node {0} (q_2)
|
||||
edge [bend right=-30] node {1} (q_3)
|
||||
(q_2)
|
||||
edge [bend left] node {1} (q_0)
|
||||
edge [bend right=-30] node {0} (q_4)
|
||||
(q_3)
|
||||
edge node {1} (q_2)
|
||||
edge [bend left] node {0} (q_1)
|
||||
(q_4)
|
||||
edge node {0} (q_3)
|
||||
edge [loop below] node {1} (q_4);
|
||||
\end{tikzpicture}
|
||||
\caption{DFA, \(A\), this is really beautiful, ya know?}
|
||||
\label{fig:multiple5}
|
||||
\end{figure}
|
||||
|
||||
\textbf{Justification}
|
||||
\\
|
||||
|
||||
Take a given binary number, \(x\). Since there are only two inputs to our
|
||||
state machine, \(x\) can either become \(x0\) or \(x1\). When a 0 comes
|
||||
into the state machine, it is the same as taking the binary number and
|
||||
multiplying it by two. When a 1 comes into the machine, it is the same as
|
||||
multipying by two and adding one.
|
||||
\\
|
||||
|
||||
Using this knowledge, we can construct a transition table that tell us
|
||||
where to go:
|
||||
|
||||
\begin{table}[ht]
|
||||
\centering
|
||||
\begin{tabular}{c || c | c | c | c | c}
|
||||
& \(x \mod 5 = 0\)
|
||||
& \(x \mod 5 = 1\)
|
||||
& \(x \mod 5 = 2\)
|
||||
& \(x \mod 5 = 3\)
|
||||
& \(x \mod 5 = 4\)
|
||||
\\
|
||||
\hline
|
||||
\(x0\) & 0 & 2 & 4 & 1 & 3 \\
|
||||
\(x1\) & 1 & 3 & 0 & 2 & 4 \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
Therefore on state \(q_0\) or (\(x \mod 5 = 0\)), a transition line should
|
||||
go to state \(q_0\) for the input 0 and a line should go to state \(q_1\)
|
||||
for input 1. Continuing this gives us the Figure~\ref{fig:multiple5}.
|
||||
\end{homeworkProblem}
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Write part of \alg{Quick-Sort($list, start, end$)}
|
||||
|
||||
\begin{algorithm}[]
|
||||
\begin{algorithmic}[1]
|
||||
\Function{Quick-Sort}{$list, start, end$}
|
||||
\If{$start \geq end$}
|
||||
\State{} \Return{}
|
||||
\EndIf{}
|
||||
\State{} $mid \gets \Call{Partition}{list, start, end}$
|
||||
\State{} \Call{Quick-Sort}{$list, start, mid - 1$}
|
||||
\State{} \Call{Quick-Sort}{$list, mid + 1, end$}
|
||||
\EndFunction{}
|
||||
\end{algorithmic}
|
||||
\caption{Start of QuickSort}
|
||||
\end{algorithm}
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Suppose we would like to fit a straight line through the origin, i.e.,
|
||||
\(Y_i = \beta_1 x_i + e_i\) with \(i = 1, \ldots, n\), \(\E [e_i] = 0\),
|
||||
and \(\Var [e_i] = \sigma^2_e\) and \(\Cov[e_i, e_j] = 0, \forall i \neq
|
||||
j\).
|
||||
\\
|
||||
|
||||
\part
|
||||
|
||||
Find the least squares esimator for \(\hat{\beta_1}\) for the slope
|
||||
\(\beta_1\).
|
||||
\\
|
||||
|
||||
\solution
|
||||
|
||||
To find the least squares estimator, we should minimize our Residual Sum
|
||||
of Squares, RSS:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
RSS &= \sum_{i = 1}^{n} {(Y_i - \hat{Y_i})}^2
|
||||
\\
|
||||
&= \sum_{i = 1}^{n} {(Y_i - \hat{\beta_1} x_i)}^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
By taking the partial derivative in respect to \(\hat{\beta_1}\), we get:
|
||||
|
||||
\[
|
||||
\pderiv{
|
||||
\hat{\beta_1}
|
||||
}{RSS}
|
||||
= -2 \sum_{i = 1}^{n} {x_i (Y_i - \hat{\beta_1} x_i)}
|
||||
= 0
|
||||
\]
|
||||
|
||||
This gives us:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\sum_{i = 1}^{n} {x_i (Y_i - \hat{\beta_1} x_i)}
|
||||
&= \sum_{i = 1}^{n} {x_i Y_i} - \sum_{i = 1}^{n} \hat{\beta_1} x_i^2
|
||||
\\
|
||||
&= \sum_{i = 1}^{n} {x_i Y_i} - \hat{\beta_1}\sum_{i = 1}^{n} x_i^2
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Solving for \(\hat{\beta_1}\) gives the final estimator for \(\beta_1\):
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\hat{\beta_1}
|
||||
&= \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
\pagebreak
|
||||
|
||||
\part
|
||||
|
||||
Calculate the bias and the variance for the estimated slope
|
||||
\(\hat{\beta_1}\).
|
||||
\\
|
||||
|
||||
\solution
|
||||
|
||||
For the bias, we need to calculate the expected value
|
||||
\(\E[\hat{\beta_1}]\):
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\E[\hat{\beta_1}]
|
||||
&= \E \left[ \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}\right]
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i \E[Y_i]}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i (\beta_1 x_i)}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \frac{
|
||||
\sum {x_i^2 \beta_1}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \beta_1 \frac{
|
||||
\sum {x_i^2 \beta_1}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\\
|
||||
&= \beta_1
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
Thus since our estimator's expected value is \(\beta_1\), we can conclude
|
||||
that the bias of our estimator is 0.
|
||||
\\
|
||||
|
||||
For the variance:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
\Var[\hat{\beta_1}]
|
||||
&= \Var \left[ \frac{
|
||||
\sum {x_i Y_i}
|
||||
}{
|
||||
\sum x_i^2
|
||||
}\right]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sum {x_i^2}
|
||||
}{
|
||||
\sum x_i^2 \sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sum {x_i^2}
|
||||
}{
|
||||
\sum x_i^2 \sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
1
|
||||
}{
|
||||
\sum x_i^2
|
||||
} \Var[Y_i]
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
1
|
||||
}{
|
||||
\sum x_i^2
|
||||
} \sigma^2
|
||||
\\
|
||||
&=
|
||||
\frac{
|
||||
\sigma^2
|
||||
}{
|
||||
\sum x_i^2
|
||||
}
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
\begin{homeworkProblem}
|
||||
Prove a polynomial of degree \(k\), \(a_kn^k + a_{k - 1}n^{k - 1} + \hdots
|
||||
+ a_1n^1 + a_0n^0\) is a member of \(\Theta(n^k)\) where \(a_k \hdots a_0\)
|
||||
are nonnegative constants.
|
||||
|
||||
\begin{proof}
|
||||
To prove that \(a_kn^k + a_{k - 1}n^{k - 1} + \hdots + a_1n^1 +
|
||||
a_0n^0\), we must show the following:
|
||||
|
||||
\[
|
||||
\exists c_1 \exists c_2 \forall n \geq n_0,\ {c_1 \cdot g(n) \leq
|
||||
f(n) \leq c_2 \cdot g(n)}
|
||||
\]
|
||||
|
||||
For the first inequality, it is easy to see that it holds because no
|
||||
matter what the constants are, \(n^k \leq a_kn^k + a_{k - 1}n^{k - 1} +
|
||||
\hdots + a_1n^1 + a_0n^0\) even if \(c_1 = 1\) and \(n_0 = 1\). This
|
||||
is because \(n^k \leq c_1 \cdot a_kn^k\) for any nonnegative constant,
|
||||
\(c_1\) and \(a_k\).
|
||||
\\
|
||||
|
||||
Taking the second inequality, we prove it in the following way.
|
||||
By summation, \(\sum\limits_{i=0}^k a_i\) will give us a new constant,
|
||||
\(A\). By taking this value of \(A\), we can then do the following:
|
||||
|
||||
\[
|
||||
\begin{split}
|
||||
a_kn^k + a_{k - 1}n^{k - 1} + \hdots + a_1n^1 + a_0n^0 &=
|
||||
\\
|
||||
&\leq (a_k + a_{k - 1} \hdots a_1 + a_0) \cdot n^k
|
||||
\\
|
||||
&= A \cdot n^k
|
||||
\\
|
||||
&\leq c_2 \cdot n^k
|
||||
\end{split}
|
||||
\]
|
||||
|
||||
where \(n_0 = 1\) and \(c_2 = A\). \(c_2\) is just a constant. Thus the
|
||||
proof is complete.
|
||||
\end{proof}
|
||||
\end{homeworkProblem}
|
||||
|
||||
\pagebreak
|
||||
|
||||
%
|
||||
% Non sequential homework problems
|
||||
%
|
||||
|
||||
% Jump to problem 18
|
||||
\begin{homeworkProblem}[18]
|
||||
Evaluate \(\sum_{k=1}^{5} k^2\) and \(\sum_{k=1}^{5} (k - 1)^2\).
|
||||
\end{homeworkProblem}
|
||||
|
||||
% Continue counting to 19
|
||||
\begin{homeworkProblem}
|
||||
Find the derivative of \(f(x) = x^4 + 3x^2 - 2\)
|
||||
\end{homeworkProblem}
|
||||
|
||||
% Go back to where we left off
|
||||
\begin{homeworkProblem}[6]
|
||||
Evaluate the integrals
|
||||
\(\int_0^1 (1 - x^2) \dx\)
|
||||
and
|
||||
\(\int_1^{\infty} \frac{1}{x^2} \dx\).
|
||||
\end{homeworkProblem}
|
||||
\end{comment}
|
||||
\end{document}
|
||||
136
labs-set-1/letterfonts.tex
Normal file
136
labs-set-1/letterfonts.tex
Normal file
@@ -0,0 +1,136 @@
|
||||
% number sets
|
||||
\newcommand{\RR}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{R}}{\mathbb{R}^{#1}}}}
|
||||
\newcommand{\NN}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{N}}{\mathbb{N}^{#1}}}}
|
||||
\newcommand{\ZZ}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{Z}}{\mathbb{Z}^{#1}}}}
|
||||
\newcommand{\QQ}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{Q}}{\mathbb{Q}^{#1}}}}
|
||||
\newcommand{\CC}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{C}}{\mathbb{C}^{#1}}}}
|
||||
\newcommand{\PP}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{P}}{\mathbb{P}^{#1}}}}
|
||||
\newcommand{\HH}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{H}}{\mathbb{H}^{#1}}}}
|
||||
\newcommand{\FF}[1][]{\ensuremath{\ifstrempty{#1}{\mathbb{F}}{\mathbb{F}^{#1}}}}
|
||||
% expected value
|
||||
\newcommand{\EE}{\ensuremath{\mathbb{E}}}
|
||||
|
||||
%---------------------------------------
|
||||
% BlackBoard Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\bbA}{\mathbb{A}} \newcommand{\bbB}{\mathbb{B}}
|
||||
\newcommand{\bbC}{\mathbb{C}} \newcommand{\bbD}{\mathbb{D}}
|
||||
\newcommand{\bbE}{\mathbb{E}} \newcommand{\bbF}{\mathbb{F}}
|
||||
\newcommand{\bbG}{\mathbb{G}} \newcommand{\bbH}{\mathbb{H}}
|
||||
\newcommand{\bbI}{\mathbb{I}} \newcommand{\bbJ}{\mathbb{J}}
|
||||
\newcommand{\bbK}{\mathbb{K}} \newcommand{\bbL}{\mathbb{L}}
|
||||
\newcommand{\bbM}{\mathbb{M}} \newcommand{\bbN}{\mathbb{N}}
|
||||
\newcommand{\bbO}{\mathbb{O}} \newcommand{\bbP}{\mathbb{P}}
|
||||
\newcommand{\bbQ}{\mathbb{Q}} \newcommand{\bbR}{\mathbb{R}}
|
||||
\newcommand{\bbS}{\mathbb{S}} \newcommand{\bbT}{\mathbb{T}}
|
||||
\newcommand{\bbU}{\mathbb{U}} \newcommand{\bbV}{\mathbb{V}}
|
||||
\newcommand{\bbW}{\mathbb{W}} \newcommand{\bbX}{\mathbb{X}}
|
||||
\newcommand{\bbY}{\mathbb{Y}} \newcommand{\bbZ}{\mathbb{Z}}
|
||||
|
||||
%---------------------------------------
|
||||
% MathCal Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\mcA}{\mathcal{A}} \newcommand{\mcB}{\mathcal{B}}
|
||||
\newcommand{\mcC}{\mathcal{C}} \newcommand{\mcD}{\mathcal{D}}
|
||||
\newcommand{\mcE}{\mathcal{E}} \newcommand{\mcF}{\mathcal{F}}
|
||||
\newcommand{\mcG}{\mathcal{G}} \newcommand{\mcH}{\mathcal{H}}
|
||||
\newcommand{\mcI}{\mathcal{I}} \newcommand{\mcJ}{\mathcal{J}}
|
||||
\newcommand{\mcK}{\mathcal{K}} \newcommand{\mcL}{\mathcal{L}}
|
||||
\newcommand{\mcM}{\mathcal{M}} \newcommand{\mcN}{\mathcal{N}}
|
||||
\newcommand{\mcO}{\mathcal{O}} \newcommand{\mcP}{\mathcal{P}}
|
||||
\newcommand{\mcQ}{\mathcal{Q}} \newcommand{\mcR}{\mathcal{R}}
|
||||
\newcommand{\mcS}{\mathcal{S}} \newcommand{\mcT}{\mathcal{T}}
|
||||
\newcommand{\mcU}{\mathcal{U}} \newcommand{\mcV}{\mathcal{V}}
|
||||
\newcommand{\mcW}{\mathcal{W}} \newcommand{\mcX}{\mathcal{X}}
|
||||
\newcommand{\mcY}{\mathcal{Y}} \newcommand{\mcZ}{\mathcal{Z}}
|
||||
|
||||
|
||||
|
||||
%---------------------------------------
|
||||
% Bold Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\bmA}{\boldsymbol{A}} \newcommand{\bmB}{\boldsymbol{B}}
|
||||
\newcommand{\bmC}{\boldsymbol{C}} \newcommand{\bmD}{\boldsymbol{D}}
|
||||
\newcommand{\bmE}{\boldsymbol{E}} \newcommand{\bmF}{\boldsymbol{F}}
|
||||
\newcommand{\bmG}{\boldsymbol{G}} \newcommand{\bmH}{\boldsymbol{H}}
|
||||
\newcommand{\bmI}{\boldsymbol{I}} \newcommand{\bmJ}{\boldsymbol{J}}
|
||||
\newcommand{\bmK}{\boldsymbol{K}} \newcommand{\bmL}{\boldsymbol{L}}
|
||||
\newcommand{\bmM}{\boldsymbol{M}} \newcommand{\bmN}{\boldsymbol{N}}
|
||||
\newcommand{\bmO}{\boldsymbol{O}} \newcommand{\bmP}{\boldsymbol{P}}
|
||||
\newcommand{\bmQ}{\boldsymbol{Q}} \newcommand{\bmR}{\boldsymbol{R}}
|
||||
\newcommand{\bmS}{\boldsymbol{S}} \newcommand{\bmT}{\boldsymbol{T}}
|
||||
\newcommand{\bmU}{\boldsymbol{U}} \newcommand{\bmV}{\boldsymbol{V}}
|
||||
\newcommand{\bmW}{\boldsymbol{W}} \newcommand{\bmX}{\boldsymbol{X}}
|
||||
\newcommand{\bmY}{\boldsymbol{Y}} \newcommand{\bmZ}{\boldsymbol{Z}}
|
||||
%Small Letters
|
||||
\newcommand{\bma}{\boldsymbol{a}} \newcommand{\bmb}{\boldsymbol{b}}
|
||||
\newcommand{\bmc}{\boldsymbol{c}} \newcommand{\bmd}{\boldsymbol{d}}
|
||||
\newcommand{\bme}{\boldsymbol{e}} \newcommand{\bmf}{\boldsymbol{f}}
|
||||
\newcommand{\bmg}{\boldsymbol{g}} \newcommand{\bmh}{\boldsymbol{h}}
|
||||
\newcommand{\bmi}{\boldsymbol{i}} \newcommand{\bmj}{\boldsymbol{j}}
|
||||
\newcommand{\bmk}{\boldsymbol{k}} \newcommand{\bml}{\boldsymbol{l}}
|
||||
\newcommand{\bmm}{\boldsymbol{m}} \newcommand{\bmn}{\boldsymbol{n}}
|
||||
\newcommand{\bmo}{\boldsymbol{o}} \newcommand{\bmp}{\boldsymbol{p}}
|
||||
\newcommand{\bmq}{\boldsymbol{q}} \newcommand{\bmr}{\boldsymbol{r}}
|
||||
\newcommand{\bms}{\boldsymbol{s}} \newcommand{\bmt}{\boldsymbol{t}}
|
||||
\newcommand{\bmu}{\boldsymbol{u}} \newcommand{\bmv}{\boldsymbol{v}}
|
||||
\newcommand{\bmw}{\boldsymbol{w}} \newcommand{\bmx}{\boldsymbol{x}}
|
||||
\newcommand{\bmy}{\boldsymbol{y}} \newcommand{\bmz}{\boldsymbol{z}}
|
||||
|
||||
%---------------------------------------
|
||||
% Scr Math Fonts :-
|
||||
%---------------------------------------
|
||||
|
||||
\newcommand{\sA}{{\mathscr{A}}} \newcommand{\sB}{{\mathscr{B}}}
|
||||
\newcommand{\sC}{{\mathscr{C}}} \newcommand{\sD}{{\mathscr{D}}}
|
||||
\newcommand{\sE}{{\mathscr{E}}} \newcommand{\sF}{{\mathscr{F}}}
|
||||
\newcommand{\sG}{{\mathscr{G}}} \newcommand{\sH}{{\mathscr{H}}}
|
||||
\newcommand{\sI}{{\mathscr{I}}} \newcommand{\sJ}{{\mathscr{J}}}
|
||||
\newcommand{\sK}{{\mathscr{K}}} \newcommand{\sL}{{\mathscr{L}}}
|
||||
\newcommand{\sM}{{\mathscr{M}}} \newcommand{\sN}{{\mathscr{N}}}
|
||||
\newcommand{\sO}{{\mathscr{O}}} \newcommand{\sP}{{\mathscr{P}}}
|
||||
\newcommand{\sQ}{{\mathscr{Q}}} \newcommand{\sR}{{\mathscr{R}}}
|
||||
\newcommand{\sS}{{\mathscr{S}}} \newcommand{\sT}{{\mathscr{T}}}
|
||||
\newcommand{\sU}{{\mathscr{U}}} \newcommand{\sV}{{\mathscr{V}}}
|
||||
\newcommand{\sW}{{\mathscr{W}}} \newcommand{\sX}{{\mathscr{X}}}
|
||||
\newcommand{\sY}{{\mathscr{Y}}} \newcommand{\sZ}{{\mathscr{Z}}}
|
||||
|
||||
|
||||
%---------------------------------------
|
||||
% Math Fraktur Font
|
||||
%---------------------------------------
|
||||
|
||||
%Captital Letters
|
||||
\newcommand{\mfA}{\mathfrak{A}} \newcommand{\mfB}{\mathfrak{B}}
|
||||
\newcommand{\mfC}{\mathfrak{C}} \newcommand{\mfD}{\mathfrak{D}}
|
||||
\newcommand{\mfE}{\mathfrak{E}} \newcommand{\mfF}{\mathfrak{F}}
|
||||
\newcommand{\mfG}{\mathfrak{G}} \newcommand{\mfH}{\mathfrak{H}}
|
||||
\newcommand{\mfI}{\mathfrak{I}} \newcommand{\mfJ}{\mathfrak{J}}
|
||||
\newcommand{\mfK}{\mathfrak{K}} \newcommand{\mfL}{\mathfrak{L}}
|
||||
\newcommand{\mfM}{\mathfrak{M}} \newcommand{\mfN}{\mathfrak{N}}
|
||||
\newcommand{\mfO}{\mathfrak{O}} \newcommand{\mfP}{\mathfrak{P}}
|
||||
\newcommand{\mfQ}{\mathfrak{Q}} \newcommand{\mfR}{\mathfrak{R}}
|
||||
\newcommand{\mfS}{\mathfrak{S}} \newcommand{\mfT}{\mathfrak{T}}
|
||||
\newcommand{\mfU}{\mathfrak{U}} \newcommand{\mfV}{\mathfrak{V}}
|
||||
\newcommand{\mfW}{\mathfrak{W}} \newcommand{\mfX}{\mathfrak{X}}
|
||||
\newcommand{\mfY}{\mathfrak{Y}} \newcommand{\mfZ}{\mathfrak{Z}}
|
||||
%Small Letters
|
||||
\newcommand{\mfa}{\mathfrak{a}} \newcommand{\mfb}{\mathfrak{b}}
|
||||
\newcommand{\mfc}{\mathfrak{c}} \newcommand{\mfd}{\mathfrak{d}}
|
||||
\newcommand{\mfe}{\mathfrak{e}} \newcommand{\mff}{\mathfrak{f}}
|
||||
\newcommand{\mfg}{\mathfrak{g}} \newcommand{\mfh}{\mathfrak{h}}
|
||||
\newcommand{\mfi}{\mathfrak{i}} \newcommand{\mfj}{\mathfrak{j}}
|
||||
\newcommand{\mfk}{\mathfrak{k}} \newcommand{\mfl}{\mathfrak{l}}
|
||||
\newcommand{\mfm}{\mathfrak{m}} \newcommand{\mfn}{\mathfrak{n}}
|
||||
\newcommand{\mfo}{\mathfrak{o}} \newcommand{\mfp}{\mathfrak{p}}
|
||||
\newcommand{\mfq}{\mathfrak{q}} \newcommand{\mfr}{\mathfrak{r}}
|
||||
\newcommand{\mfs}{\mathfrak{s}} \newcommand{\mft}{\mathfrak{t}}
|
||||
\newcommand{\mfu}{\mathfrak{u}} \newcommand{\mfv}{\mathfrak{v}}
|
||||
\newcommand{\mfw}{\mathfrak{w}} \newcommand{\mfx}{\mathfrak{x}}
|
||||
\newcommand{\mfy}{\mathfrak{y}} \newcommand{\mfz}{\mathfrak{z}}
|
||||
33
labs-set-1/macros.tex
Normal file
33
labs-set-1/macros.tex
Normal file
@@ -0,0 +1,33 @@
|
||||
\newcommand{\eps}{\epsilon}
|
||||
\newcommand{\veps}{\varepsilon}
|
||||
\newcommand{\Qed}{\begin{flushright}\qed\end{flushright}}
|
||||
|
||||
\newcommand{\parinn}{\setlength{\parindent}{1cm}}
|
||||
\newcommand{\parinf}{\setlength{\parindent}{0cm}}
|
||||
|
||||
% \newcommand{\norm}{\|\cdot\|}
|
||||
\newcommand{\inorm}{\norm_{\infty}}
|
||||
\newcommand{\opensets}{\{V_{\alpha}\}_{\alpha\in I}}
|
||||
\newcommand{\oset}{V_{\alpha}}
|
||||
\newcommand{\opset}[1]{V_{\alpha_{#1}}}
|
||||
\newcommand{\lub}{\text{lub}}
|
||||
\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}}
|
||||
\newcommand{\Del}[3]{\frac{\partial^{#1} #2}{\partial^{#1} #3}}
|
||||
\newcommand{\deld}[2]{\dfrac{\partial #1}{\partial #2}}
|
||||
\newcommand{\Deld}[3]{\dfrac{\partial^{#1} #2}{\partial^{#1} #3}}
|
||||
\newcommand{\der}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}}
|
||||
% \newcommand{\ddd}[3]{\frac{\mathrm{d}^{#3} #1}{\mathrm{d}^{#3} #2}}
|
||||
\newcommand{\lm}{\lambda}
|
||||
\newcommand{\uin}{\mathbin{\rotatebox[origin=c]{90}{$\in$}}}
|
||||
\newcommand{\usubset}{\mathbin{\rotatebox[origin=c]{90}{$\subset$}}}
|
||||
\newcommand{\lt}{\left}
|
||||
\newcommand{\rt}{\right}
|
||||
\newcommand{\bs}[1]{\boldsymbol{#1}}
|
||||
\newcommand{\exs}{\exists}
|
||||
\newcommand{\st}{\strut}
|
||||
\newcommand{\dps}[1]{\displaystyle{#1}}
|
||||
\newcommand{\id}{\text{id}}
|
||||
|
||||
|
||||
\newcommand{\sol}{\setlength{\parindent}{0cm}\textbf{\textit{Solution:}}\setlength{\parindent}{1cm} }
|
||||
\newcommand{\solve}[1]{\setlength{\parindent}{0cm}\textbf{\textit{Solution: }}\setlength{\parindent}{1cm}#1 \Qed}
|
||||
745
labs-set-1/preamble.tex
Normal file
745
labs-set-1/preamble.tex
Normal file
@@ -0,0 +1,745 @@
|
||||
\usepackage[tmargin=2cm,rmargin=1in,lmargin=1in,margin=0.85in,bmargin=2cm,footskip=.2in]{geometry}
|
||||
\usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools}
|
||||
\usepackage{gensymb}
|
||||
\usepackage[varbb]{newpxmath}
|
||||
\usepackage{xfrac}
|
||||
\usepackage[makeroom]{cancel}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{bookmark}
|
||||
\usepackage{enumitem}
|
||||
\usepackage{hyperref,theoremref}
|
||||
\hypersetup{
|
||||
pdftitle={assignment},
|
||||
colorlinks=true, linkcolor=doc!90,
|
||||
bookmarksnumbered=true,
|
||||
bookmarksopen=true
|
||||
}
|
||||
\usepackage[most,many,breakable]{tcolorbox}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{varwidth}
|
||||
\usepackage{varwidth}
|
||||
\usepackage{etoolbox}
|
||||
%\usepackage{authblk}
|
||||
\usepackage{nameref}
|
||||
\usepackage{multicol,array}
|
||||
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
|
||||
\usepackage{comment} % enables the use of multi-line comments (\ifx \fi)
|
||||
\usepackage{import}
|
||||
\usepackage{xifthen}
|
||||
\usepackage{pdfpages}
|
||||
\usepackage{transparent}
|
||||
\usepackage{chngcntr}
|
||||
\usepackage{tikz}
|
||||
\usepackage{titletoc}
|
||||
|
||||
\newcommand\mycommfont[1]{\footnotesize\ttfamily\textcolor{blue}{#1}}
|
||||
\SetCommentSty{mycommfont}
|
||||
\newcommand{\incfig}[1]{%
|
||||
\def\svgwidth{\columnwidth}
|
||||
\import{./figures/}{#1.pdf_tex}
|
||||
}
|
||||
|
||||
\usepackage{tikzsymbols}
|
||||
\tikzset{
|
||||
symbol/.style={
|
||||
draw=none,
|
||||
every to/.append style={
|
||||
edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
|
||||
}
|
||||
}
|
||||
\tikzstyle{c} = [circle,fill=black,scale=0.5]
|
||||
\tikzstyle{b} = [draw, thick, black, -]
|
||||
\tikzset{
|
||||
vertex/.style={
|
||||
circle,
|
||||
draw,
|
||||
minimum size=6mm,
|
||||
inner sep=0pt
|
||||
}
|
||||
}
|
||||
|
||||
\renewcommand\qedsymbol{$\Laughey$}
|
||||
|
||||
% \usepackage{xparse}
|
||||
% \usepackage{pgffor}
|
||||
% \usepackage{emoji}
|
||||
%
|
||||
% \NewDocumentCommand{\memoji}{m o}{%
|
||||
% \IfNoValueTF{#2}
|
||||
% {\ifmmode \text{\emoji{#1}} \else \emoji{#1}\fi} % Single emoji case
|
||||
% {\foreach \index in {1,...,#2}{\ifmmode \text{\emoji{#1}} \else \emoji{#1}\fi}} % Repeated emoji case
|
||||
% }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% SELF MADE COLORS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\definecolor{doc}{RGB}{0,60,110}
|
||||
\definecolor{myg}{RGB}{56, 140, 70}
|
||||
\definecolor{myb}{RGB}{45, 111, 177}
|
||||
\definecolor{myr}{RGB}{199, 68, 64}
|
||||
\definecolor{mytheorembg}{HTML}{F2F2F9}
|
||||
\definecolor{mytheoremfr}{HTML}{00007B}
|
||||
\definecolor{mylemmabg}{HTML}{FFFAF8}
|
||||
\definecolor{mylemmafr}{HTML}{983b0f}
|
||||
\definecolor{mypropbg}{HTML}{f2fbfc}
|
||||
\definecolor{mypropfr}{HTML}{191971}
|
||||
\definecolor{myexamplebg}{HTML}{F2FBF8}
|
||||
\definecolor{myexamplefr}{HTML}{88D6D1}
|
||||
\definecolor{myexampleti}{HTML}{2A7F7F}
|
||||
\definecolor{mydefinitbg}{HTML}{E5E5FF}
|
||||
\definecolor{mydefinitfr}{HTML}{3F3FA3}
|
||||
\definecolor{notesgreen}{RGB}{0,162,0}
|
||||
\definecolor{myp}{RGB}{197, 92, 212}
|
||||
\definecolor{mygr}{HTML}{2C3338}
|
||||
\definecolor{myred}{RGB}{127,0,0}
|
||||
\definecolor{myyellow}{RGB}{169,121,69}
|
||||
\definecolor{myexercisebg}{HTML}{F2FBF8}
|
||||
\definecolor{myexercisefg}{HTML}{88D6D1}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TCOLORBOX SETUPS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\setlength{\parindent}{1cm}
|
||||
%================================
|
||||
% THEOREM BOX
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Theorem}{Theorem}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mytheorembg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mytheoremfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mytheoremfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mytheoremfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{theorem}{Theorem}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mytheorembg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mytheoremfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mytheoremfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mytheoremfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcolorbox{Theoremcon}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = mytheorembg
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{mytheoremfr}
|
||||
,sharp corners
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
}
|
||||
|
||||
%================================
|
||||
% Corollery
|
||||
%================================
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Corollary}{Corollary}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myp!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myp!85!black}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myp!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myp!85!black}
|
||||
}
|
||||
{th}
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{corollary}{Corollary}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myp!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myp!85!black}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myp!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myp!85!black}
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% LEMMA
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Lemma}{Lemma}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mylemmabg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mylemmafr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mylemmafr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mylemmafr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{lemma}{lemma}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mylemmabg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mylemmafr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mylemmafr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mylemmafr},
|
||||
}
|
||||
{th}
|
||||
|
||||
%================================
|
||||
% Exercise
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Exercise}{Exercise}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = myexercisebg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{myexercisefg},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = myexercisefg,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, myexercisefg},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{exercise}{Exercise}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = myexercisebg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{myexercisefg},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = myexercisefg,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, myexercisefg},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% PROPOSITION
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{Prop}{Proposition}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mypropbg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mypropfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mypropfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mypropfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=chapter]{prop}{Proposition}
|
||||
{%
|
||||
enhanced,
|
||||
breakable,
|
||||
colback = mypropbg,
|
||||
frame hidden,
|
||||
boxrule = 0sp,
|
||||
borderline west = {2pt}{0pt}{mypropfr},
|
||||
sharp corners,
|
||||
detach title,
|
||||
before upper = \tcbtitle\par\smallskip,
|
||||
coltitle = mypropfr,
|
||||
fonttitle = \bfseries\sffamily,
|
||||
description font = \mdseries,
|
||||
separator sign none,
|
||||
segmentation style={solid, mypropfr},
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
%================================
|
||||
% CLAIM
|
||||
%================================
|
||||
|
||||
\tcbuselibrary{theorems,skins,hooks}
|
||||
\newtcbtheorem[number within=section]{claim}{Claim}
|
||||
{%
|
||||
enhanced
|
||||
,breakable
|
||||
,colback = myg!10
|
||||
,frame hidden
|
||||
,boxrule = 0sp
|
||||
,borderline west = {2pt}{0pt}{myg}
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper = \tcbtitle\par\smallskip
|
||||
,coltitle = myg!85!black
|
||||
,fonttitle = \bfseries\sffamily
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,segmentation style={solid, myg!85!black}
|
||||
}
|
||||
{th}
|
||||
|
||||
|
||||
|
||||
%================================
|
||||
% EXAMPLE BOX
|
||||
%================================
|
||||
|
||||
\newtcbtheorem[number within=section]{Example}{Example}
|
||||
{%
|
||||
colback = myexamplebg
|
||||
,breakable
|
||||
,colframe = myexamplefr
|
||||
,coltitle = myexampleti
|
||||
,boxrule = 1pt
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper=\tcbtitle\par\smallskip
|
||||
,fonttitle = \bfseries
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,description delimiters parenthesis
|
||||
}
|
||||
{ex}
|
||||
|
||||
\newtcbtheorem[number within=chapter]{example}{Example}
|
||||
{%
|
||||
colback = myexamplebg
|
||||
,breakable
|
||||
,colframe = myexamplefr
|
||||
,coltitle = myexampleti
|
||||
,boxrule = 1pt
|
||||
,sharp corners
|
||||
,detach title
|
||||
,before upper=\tcbtitle\par\smallskip
|
||||
,fonttitle = \bfseries
|
||||
,description font = \mdseries
|
||||
,separator sign none
|
||||
,description delimiters parenthesis
|
||||
}
|
||||
{ex}
|
||||
|
||||
%================================
|
||||
% DEFINITION BOX
|
||||
%================================
|
||||
|
||||
\newtcbtheorem[number within=section]{Definition}{Definition}{enhanced,
|
||||
before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
|
||||
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
|
||||
boxed title style={frame code={
|
||||
\path[fill=tcbcolback]
|
||||
([yshift=-1mm,xshift=-1mm]frame.north west)
|
||||
arc[start angle=0,end angle=180,radius=1mm]
|
||||
([yshift=-1mm,xshift=1mm]frame.north east)
|
||||
arc[start angle=180,end angle=0,radius=1mm];
|
||||
\path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
|
||||
middle color=tcbcolback!80!black]
|
||||
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
|
||||
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
|
||||
-- (frame.south east) -- (frame.south west)
|
||||
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
|
||||
[sharp corners]-- cycle;
|
||||
},interior engine=empty,
|
||||
},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},#1}{def}
|
||||
\newtcbtheorem[number within=chapter]{definition}{Definition}{enhanced,
|
||||
before skip=2mm,after skip=2mm, colback=red!5,colframe=red!80!black,boxrule=0.5mm,
|
||||
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
|
||||
boxed title style={frame code={
|
||||
\path[fill=tcbcolback]
|
||||
([yshift=-1mm,xshift=-1mm]frame.north west)
|
||||
arc[start angle=0,end angle=180,radius=1mm]
|
||||
([yshift=-1mm,xshift=1mm]frame.north east)
|
||||
arc[start angle=180,end angle=0,radius=1mm];
|
||||
\path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
|
||||
middle color=tcbcolback!80!black]
|
||||
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
|
||||
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
|
||||
-- (frame.south east) -- (frame.south west)
|
||||
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
|
||||
[sharp corners]-- cycle;
|
||||
},interior engine=empty,
|
||||
},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},#1}{def}
|
||||
|
||||
|
||||
%================================
|
||||
% EXERCISE BOX
|
||||
%================================
|
||||
|
||||
\newcounter{questioncounter}
|
||||
\counterwithin{questioncounter}{chapter}
|
||||
% \counterwithin{questioncounter}{section}
|
||||
|
||||
\makeatletter
|
||||
\newtcbtheorem[use counter=questioncounter]{question}{Question}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=myb!80!black,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
\makeatother
|
||||
|
||||
%================================
|
||||
% SOLUTION BOX
|
||||
%================================
|
||||
|
||||
\makeatletter
|
||||
\newtcolorbox{solution}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=myg!80!black,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
title=Solution,
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
}
|
||||
\makeatother
|
||||
|
||||
%================================
|
||||
% Question BOX
|
||||
%================================
|
||||
|
||||
\makeatletter
|
||||
\newtcbtheorem{qstion}{Question}{enhanced,
|
||||
breakable,
|
||||
colback=white,
|
||||
colframe=mygr,
|
||||
attach boxed title to top left={yshift*=-\tcboxedtitleheight},
|
||||
fonttitle=\bfseries,
|
||||
title={#2},
|
||||
boxed title size=title,
|
||||
boxed title style={%
|
||||
sharp corners,
|
||||
rounded corners=northwest,
|
||||
colback=tcbcolframe,
|
||||
boxrule=0pt,
|
||||
},
|
||||
underlay boxed title={%
|
||||
\path[fill=tcbcolframe] (title.south west)--(title.south east)
|
||||
to[out=0, in=180] ([xshift=5mm]title.east)--
|
||||
(title.center-|frame.east)
|
||||
[rounded corners=\kvtcb@arc] |-
|
||||
(frame.north) -| cycle;
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
\makeatother
|
||||
|
||||
\newtcbtheorem[number within=chapter]{wconc}{Wrong Concept}{
|
||||
breakable,
|
||||
enhanced,
|
||||
colback=white,
|
||||
colframe=myr,
|
||||
arc=0pt,
|
||||
outer arc=0pt,
|
||||
fonttitle=\bfseries\sffamily\large,
|
||||
colbacktitle=myr,
|
||||
attach boxed title to top left={},
|
||||
boxed title style={
|
||||
enhanced,
|
||||
skin=enhancedfirst jigsaw,
|
||||
arc=3pt,
|
||||
bottom=0pt,
|
||||
interior style={fill=myr}
|
||||
},
|
||||
#1
|
||||
}{def}
|
||||
|
||||
|
||||
%================================
|
||||
% NOTE BOX
|
||||
%================================
|
||||
|
||||
\usetikzlibrary{arrows,calc,shadows.blur}
|
||||
\tcbuselibrary{skins}
|
||||
\newtcolorbox{note}[1][]{%
|
||||
enhanced jigsaw,
|
||||
colback=gray!20!white,%
|
||||
colframe=gray!80!black,
|
||||
size=small,
|
||||
boxrule=1pt,
|
||||
title=\textbf{Note:-},
|
||||
halign title=flush center,
|
||||
coltitle=black,
|
||||
breakable,
|
||||
drop shadow=black!50!white,
|
||||
attach boxed title to top left={xshift=1cm,yshift=-\tcboxedtitleheight/2,yshifttext=-\tcboxedtitleheight/2},
|
||||
minipage boxed title=1.5cm,
|
||||
boxed title style={%
|
||||
colback=white,
|
||||
size=fbox,
|
||||
boxrule=1pt,
|
||||
boxsep=2pt,
|
||||
underlay={%
|
||||
\coordinate (dotA) at ($(interior.west) + (-0.5pt,0)$);
|
||||
\coordinate (dotB) at ($(interior.east) + (0.5pt,0)$);
|
||||
\begin{scope}
|
||||
\clip (interior.north west) rectangle ([xshift=3ex]interior.east);
|
||||
\filldraw [white, blur shadow={shadow opacity=60, shadow yshift=-.75ex}, rounded corners=2pt] (interior.north west) rectangle (interior.south east);
|
||||
\end{scope}
|
||||
\begin{scope}[gray!80!black]
|
||||
\fill (dotA) circle (2pt);
|
||||
\fill (dotB) circle (2pt);
|
||||
\end{scope}
|
||||
},
|
||||
},
|
||||
#1,
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% SELF MADE COMMANDS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\newcommand{\thm}[2]{\begin{Theorem}{#1}{}#2\end{Theorem}}
|
||||
\newcommand{\cor}[2]{\begin{Corollary}{#1}{}#2\end{Corollary}}
|
||||
\newcommand{\mlemma}[2]{\begin{Lemma}{#1}{}#2\end{Lemma}}
|
||||
\newcommand{\mer}[2]{\begin{Exercise}{#1}{}#2\end{Exercise}}
|
||||
\newcommand{\mprop}[2]{\begin{Prop}{#1}{}#2\end{Prop}}
|
||||
\newcommand{\clm}[3]{\begin{claim}{#1}{#2}#3\end{claim}}
|
||||
\newcommand{\wc}[2]{\begin{wconc}{#1}{}\setlength{\parindent}{1cm}#2\end{wconc}}
|
||||
\newcommand{\thmcon}[1]{\begin{Theoremcon}{#1}\end{Theoremcon}}
|
||||
\newcommand{\ex}[2]{\begin{Example}{#1}{}#2\end{Example}}
|
||||
\newcommand{\dfn}[2]{\begin{Definition}[colbacktitle=red!75!black]{#1}{}#2\end{Definition}}
|
||||
\newcommand{\dfnc}[2]{\begin{definition}[colbacktitle=red!75!black]{#1}{}#2\end{definition}}
|
||||
\newcommand{\qs}[2]{\begin{question}{#1}{}#2\end{question}}
|
||||
\newcommand{\pf}[2]{\begin{myproof}[#1]#2\end{myproof}}
|
||||
\newcommand{\nt}[1]{\begin{note}#1\end{note}}
|
||||
|
||||
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
|
||||
\node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
|
||||
\newcommand\getcurrentref[1]{%
|
||||
\ifnumequal{\value{#1}}{0}
|
||||
{??}
|
||||
{\the\value{#1}}%
|
||||
}
|
||||
\newcommand{\getCurrentSectionNumber}{\getcurrentref{section}}
|
||||
\newenvironment{myproof}[1][\proofname]{%
|
||||
\proof[\bfseries #1: ]%
|
||||
}{\endproof}
|
||||
|
||||
\newcommand{\mclm}[2]{\begin{myclaim}[#1]#2\end{myclaim}}
|
||||
\newenvironment{myclaim}[1][\claimname]{\proof[\bfseries #1: ]}{}
|
||||
\newenvironment{iclaim}[1][\claimname]{\bfseries #1\mdseries:}{}
|
||||
\newcommand{\iclm}[2]{\begin{iclaim}[#1]#2\end{iclaim}}
|
||||
|
||||
\newcounter{mylabelcounter}
|
||||
|
||||
\makeatletter
|
||||
\newcommand{\setword}[2]{%
|
||||
\phantomsection
|
||||
#1\def\@currentlabel{\unexpanded{#1}}\label{#2}%
|
||||
}
|
||||
\makeatother
|
||||
|
||||
% deliminators
|
||||
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
|
||||
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
|
||||
|
||||
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
|
||||
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
|
||||
\DeclarePairedDelimiter{\round}{\lfloor}{\rceil}
|
||||
|
||||
\newsavebox\diffdbox
|
||||
\newcommand{\slantedromand}{{\mathpalette\makesl{d}}}
|
||||
\newcommand{\makesl}[2]{%
|
||||
\begingroup
|
||||
\sbox{\diffdbox}{$\mathsurround=0pt#1\mathrm{#2}$}%
|
||||
\pdfsave
|
||||
\pdfsetmatrix{1 0 0.2 1}%
|
||||
\rlap{\usebox{\diffdbox}}%
|
||||
\pdfrestore
|
||||
\hskip\wd\diffdbox
|
||||
\endgroup
|
||||
}
|
||||
\newcommand{\dd}[1][]{\ensuremath{\mathop{}\!\ifstrempty{#1}{%
|
||||
\slantedromand\@ifnextchar^{\hspace{0.2ex}}{\hspace{0.1ex}}}%
|
||||
{\slantedromand\hspace{0.2ex}^{#1}}}}
|
||||
\ProvideDocumentCommand\dv{o m g}{%
|
||||
\ensuremath{%
|
||||
\IfValueTF{#3}{%
|
||||
\IfNoValueTF{#1}{%
|
||||
\frac{\dd #2}{\dd #3}%
|
||||
}{%
|
||||
\frac{\dd^{#1} #2}{\dd #3^{#1}}%
|
||||
}%
|
||||
}{%
|
||||
\IfNoValueTF{#1}{%
|
||||
\frac{\dd}{\dd #2}%
|
||||
}{%
|
||||
\frac{\dd^{#1}}{\dd #2^{#1}}%
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
\providecommand*{\pdv}[3][]{\frac{\partial^{#1}#2}{\partial#3^{#1}}}
|
||||
% - others
|
||||
\DeclareMathOperator{\Lap}{\mathcal{L}}
|
||||
\DeclareMathOperator{\Var}{Var} % varience
|
||||
\DeclareMathOperator{\Cov}{Cov} % covarience
|
||||
\DeclareMathOperator{\E}{E} % expected
|
||||
|
||||
% Since the amsthm package isn't loaded
|
||||
|
||||
% I prefer the slanted \leq
|
||||
\let\oldleq\leq % save them in case they're every wanted
|
||||
\let\oldgeq\geq
|
||||
\renewcommand{\leq}{\leqslant}
|
||||
\renewcommand{\geq}{\geqslant}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% TABLE OF CONTENTS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\contentsmargin{0cm}
|
||||
\titlecontents{chapter}[3.7pc]
|
||||
{\addvspace{30pt}%
|
||||
\begin{tikzpicture}[remember picture, overlay]%
|
||||
\draw[fill=doc!60,draw=doc!60] (-7,-.1) rectangle (-0.9,.5);%
|
||||
\pgftext[left,x=-3.7cm,y=0.2cm]{\color{white}\Large\sc\bfseries Chapter\ \thecontentslabel};%
|
||||
\end{tikzpicture}\color{doc!60}\large\sc\bfseries}%
|
||||
{}
|
||||
{}
|
||||
{\;\titlerule\;\large\sc\bfseries Page \thecontentspage
|
||||
\begin{tikzpicture}[remember picture, overlay]
|
||||
\draw[fill=doc!60,draw=doc!60] (2pt,0) rectangle (4,0.1pt);
|
||||
\end{tikzpicture}}%
|
||||
\titlecontents{section}[3.7pc]
|
||||
{\addvspace{2pt}}
|
||||
{\contentslabel[\thecontentslabel]{2pc}}
|
||||
{}
|
||||
{\hfill\small \thecontentspage}
|
||||
[]
|
||||
\titlecontents*{subsection}[3.7pc]
|
||||
{\addvspace{-1pt}\small}
|
||||
{}
|
||||
{}
|
||||
{\ --- \small\thecontentspage}
|
||||
[ \textbullet\ ][]
|
||||
|
||||
\makeatletter
|
||||
\renewcommand{\tableofcontents}{%
|
||||
\chapter*{%
|
||||
\vspace*{-20\p@}%
|
||||
\begin{tikzpicture}[remember picture, overlay]%
|
||||
\pgftext[right,x=15cm,y=0.2cm]{\color{doc!60}\Huge\sc\bfseries \contentsname};%
|
||||
\draw[fill=doc!60,draw=doc!60] (13,-.75) rectangle (20,1);%
|
||||
\clip (13,-.75) rectangle (20,1);
|
||||
\pgftext[right,x=15cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \contentsname};%
|
||||
\end{tikzpicture}}%
|
||||
\@starttoc{toc}}
|
||||
\makeatother
|
||||
BIN
labs-set-1/template.pdf
Normal file
BIN
labs-set-1/template.pdf
Normal file
Binary file not shown.
44
labs-set-1/template.tex
Normal file
44
labs-set-1/template.tex
Normal file
@@ -0,0 +1,44 @@
|
||||
\documentclass{report}
|
||||
|
||||
\input{preamble}
|
||||
\input{macros}
|
||||
\input{letterfonts}
|
||||
|
||||
\title{\Huge{Calculus III}\\Homework \# 1}
|
||||
\author{\huge{Krishna Ayyalasomayajula}}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\newpage% or \cleardoublepage
|
||||
% \pdfbookmark[<level>]{<title>}{<dest>}
|
||||
\pdfbookmark[section]{\contentsname}{toc}
|
||||
\tableofcontents
|
||||
\pagebreak
|
||||
|
||||
\chapter{Lab 2 - 13.1 Apps}
|
||||
\section{Work}
|
||||
|
||||
\qs{}{
|
||||
Let $\vec{T_1}$ represent the tension of the leftmost cable, while $\vec{T_2}$ encodes the tension force experienced by the rightmost cable. Our coordinate system will originate at the intersection of the two cables.
|
||||
|
||||
\begin{align*}
|
||||
\vec{T_1} \coloneqq \langle \|\vec{T_1}\| ; 135\degree \rangle \\
|
||||
\vec{T_2} \coloneqq \langle \|\vec{T_2}|\| ; 15\degree \rangle \\
|
||||
500=\|\vec{T_1}\|\sin{135\degree} + \|\vec{T_2}\|\sin{15} \\
|
||||
0 = \|\vec{T_1}\|\cos{135\degree} + \|\vec{T_2}\|\cos{15} \\
|
||||
\implies 500=\|\vec{T_1}\|\tfrac{\sqrt{2}}{2} + \|\vec{T_2}\|\cdot0.258819045103 \\
|
||||
\implies0 = \|\vec{T_1}\|\tfrac{-\sqrt{2}}{2} + \|\vec{T_2}\|\cdot0.965925826289 \\
|
||||
\text{Solving the system numerically yields: }\\
|
||||
\|\vec{T_1}\| \Rightarrow 557.677\, \mathrm{lb}\\
|
||||
\|\vec{T_2}\| \Rightarrow 408.248\,\mathrm{lb} \\
|
||||
\text{This corresponds to answer choice A}
|
||||
\end{align*}
|
||||
|
||||
}
|
||||
|
||||
\qs{}{
|
||||
|
||||
}
|
||||
\end{document}
|
||||
3
labs-set-1/template.toc
Normal file
3
labs-set-1/template.toc
Normal file
@@ -0,0 +1,3 @@
|
||||
\contentsline {chapter}{\numberline {1}Lab 2 - 13.1 Apps}{2}{chapter.1}%
|
||||
\contentsline {section}{\numberline {1.1}Work}{2}{section.1.1}%
|
||||
\contentsfinish
|
||||
Reference in New Issue
Block a user