-
Notifications
You must be signed in to change notification settings - Fork 0
/
mathHashingStandAlone.tex
56 lines (48 loc) · 2.46 KB
/
mathHashingStandAlone.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% Defining braces
\newcommand{\enc}[1]{\ensuremath{\left( #1 \right)}}
\newcommand{\encsq}[1]{\ensuremath{\left[ #1 \right] }}
\newcommand{\encbr}[1]{\ensuremath{\left\lbrace #1 \right\rbrace }}
\newcommand{\mean}[1]{\ensuremath{\left\langle #1 \right\rangle}}
\newcommand{\efrac}[2]{\ensuremath{\enc{\frac{#1}{#2}}}}
%% Vector operators
\newcommand{\cross}{\ensuremath{\times}}
%% Differential operators
\newcommand{\diff}[2]{ \frac{d #1}{d #2} }
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdd}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\pdc}[3]{ \left( \frac{\partial #1}{\partial #2} \right)_{#3}}
\newcommand{\dive}{\ensuremath{\vec{\nabla}\cdot}}
\newcommand{\grad}{\ensuremath{\vec{\nabla}}}
\newcommand{\curl}{\ensuremath{ \nabla \times}}
\newcommand{\lap}{\ensuremath{\nabla^2 }}
\def\dbar{{\mathchar'26\mkern-12mu d}}
%defining commutation relation
\newcommand{\com}[2]{\ensuremath{\left[ \, #1 \, , \, #2 \right]}}
\newcommand{\anticom}[2]{\ensuremath{\left\lbrace \, #1 \, , \, #2 \right\rbrace}}
%%Defining Dirac Notation shorthand
\newcommand{\bra}[1]{\ensuremath{\left\langle #1 \right|}}
\newcommand{\ket}[1]{\ensuremath{\left| #1 \right\rangle }}
\newcommand{\braket}[2]{\ensuremath{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}}
\newcommand{\Obraket}[3]{\ensuremath{ \left< #1 \vphantom{#2} \vphantom{#3} \right| #2 \left| \vphantom{#1} \vphantom{#2} #3 \right>}}
%% contraction notation
\newcommand{\con}[2]{\ensuremath{\left< #1 \,,\, #2 \right>}}
%% Functions
\newcommand{\abs}[1]{\ensuremath{\left| #1 \right|}}
\newcommand{\sinc}[1]{\ensuremath{\textnormal{sinc}\enc{#1}}}
\newcommand{\set}[1]{\ensuremath{\left\lbrace #1 \right\rbrace}}
\newcommand{\cond}[2]{\ensuremath{\left. \left( #1 \right) \right|_{#2} }}
\newcommand{\Real}[1]{\ensuremath{\mathbb{Re}\encsq{#1}}}
\newcommand{\atan}[1]{\ensuremath{\,\textnormal{tan}^{-1}\enc{#1}}}
\newcommand{\asin}[1]{\ensuremath{\,\textnormal{sin}^{-1}\enc{#1}}}
\newcommand{\acos}[1]{\ensuremath{\,\textnormal{cos}^{-1}\enc{#1}}}
%% New functions
\let\oldsin\sin
\let\oldcos\cos
\let\oldtan\tan
%\let\oldln\ln
%\renewcommand{\ln}[1]{\ensuremath{\textnormal{ln}\enc{#1}}}
\renewcommand{\sin}[1]{\ensuremath{\textnormal{sin}\enc{#1}}}
\renewcommand{\cos}[1]{\ensuremath{\textnormal{cos}\enc{#1}}}
\renewcommand{\tan}[1]{\ensuremath{\textnormal{tan}\enc{#1}}}
\newcommand{\pcos}[2]{\ensuremath{\textnormal{cos}^{#2}\enc{#1}}}
\newcommand{\psin}[2]{\ensuremath{\textnormal{sin}^{#2}\enc{#1}}}