From e35738c5caa4cf7d4ddbbf7b7384b0f24f5860bd Mon Sep 17 00:00:00 2001 From: utensil Date: Mon, 7 Oct 2019 21:54:27 +0800 Subject: [PATCH 1/2] Merge abrombo's new printer per #38 Co-authored-by: Alan Bromborsky --- galgebra/printer.py | 185 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 143 insertions(+), 42 deletions(-) diff --git a/galgebra/printer.py b/galgebra/printer.py index c724112d..7ccb5995 100755 --- a/galgebra/printer.py +++ b/galgebra/printer.py @@ -13,6 +13,7 @@ from sympy.core.function import _coeff_isneg from sympy.core.operations import AssocOp from sympy import init_printing +import builtins from . import utils try: @@ -26,34 +27,74 @@ from inspect import getouterframes, currentframe +#Save original print function +old_print = builtins.print + ZERO_STR = ' 0 ' Format_cnt = 0 ip_cmds = \ -""" -$\\DeclareMathOperator{\\Tr}{Tr} -\\DeclareMathOperator{\\Adj}{Adj} -\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}} -\\newcommand{\\lp}{\\left (} -\\newcommand{\\rp}{\\right )} -\\newcommand{\\paren}[1]{\\lp {#1} \\rp} -\\newcommand{\\half}{\\frac{1}{2}} -\\newcommand{\\llt}{\\left <} -\\newcommand{\\rgt}{\\right >} -\\newcommand{\\abs}[1]{\\left |{#1}\\right | } -\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}} -\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}} -\\newcommand{\\lbrc}{\\left \\{} -\\newcommand{\\rbrc}{\\right \\}} -\\newcommand{\\W}{\\wedge} -\\newcommand{\\prm}[1]{{#1}'} -\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}} -\\newcommand{\\R}{\\dagger} -\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}} -\\newcommand{\\grade}[1]{\\left < {#1} \\right >} -\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp} -\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}$ +r""" +\DeclareMathOperator{\Tr}{Tr} +\DeclareMathOperator{\Adj}{Adj} +\newcommand{\bfrac}[2]{\displaystyle\frac{#1}{#2}} +\newcommand{\lp}{\left (} +\newcommand{\rp}{\right )} +\newcommand{\paren}[1]{\lp {#1} \rp} +\newcommand{\half}{\frac{1}{2}} +\newcommand{\llt}{\left <} +\newcommand{\rgt}{\right >} +\newcommand{\abs}[1]{\left |{#1}\right | } +\newcommand{\pdiff}[2]{\bfrac{\partial {#1}}{\partial {#2}}} +\newcommand{\npdiff}[3]{\bfrac{\partial^{#3} {#1}}{\partial {#2}^{#3}}} +\newcommand{\lbrc}{\left \{} +\newcommand{\rbrc}{\right \}} +\newcommand{\W}{\wedge} +\newcommand{\prm}[1]{{#1}'} +\newcommand{\ddt}[1]{\bfrac{d{#1}}{dt}} +\newcommand{\R}{\dagger} +\newcommand{\deriv}[3]{\bfrac{d^{#3}#1}{d{#2}^{#3}}} +\newcommand{\grd}[1]{\left < {#1} \right >} +\newcommand{\f}[2]{{#1}\lp {#2} \rp} +\newcommand{\eval}[2]{\left . {#1} \right |_{#2}} +\newcommand{\bs}[1]{\boldsymbol{#1}} +\newcommand{\es}[1]{\boldsymbol{e}_{#1}} +\newcommand{\eS}[1]{\boldsymbol{e}^{#1}} +\newcommand{\grade}[2]{\left < {#1} \right >_{#2}} +\newcommand{\lc}{\rfloor} +\newcommand{\rc}{\lfloor} +\newcommand{\T}[1]{\text{#1}} +\newcommand{\lop}[1]{\overleftarrow{#1}} +\newcommand{\rop}[1]{\overrightarrow{#1}} +\newcommand{\ldot}{\lfloor} +\newcommand{\rdot}{\rfloor} + +%MacDonald LaTeX macros + +\newcommand {\thalf} {\textstyle \frac{1}{2}} +\newcommand {\tthird} {\textstyle \frac{1}{3}} +\newcommand {\tquarter} {\textstyle \frac{1}{4}} +\newcommand {\tsixth} {\textstyle \frac{1}{6}} + +\newcommand {\RE} {\mathbb{R}} +\newcommand {\GA} {\mathbb{G}} +\newcommand {\inner} {\mathbin{\pmb{\cdot}}} +\renewcommand {\outer} {\mathbin{\wedge}} +\newcommand {\cross} {\mathbin{\times}} +\newcommand {\meet} {\mathbin{{\,\vee\;}}} +\renewcommand {\iff} {\Leftrightarrow} +\renewcommand {\impliedby}{\Leftarrow} +\renewcommand {\implies} {\Rightarrow} +\newcommand {\perpc} {\perp} % Orthogonal complement +\newcommand {\perpm} {*} % Dual of multivector +\newcommand {\del} {\mathbf{\nabla}} %{\boldsymbol\nabla\!} +\newcommand {\mpart}[2]{\left\langle\, #1 \,\right\rangle_{#2}} % AMS has a \part +\newcommand {\spart}[1]{\mpart{#1}{0}} +\newcommand {\ds} {\displaystyle} +\newcommand {\os} {\overset} +\newcommand {\galgebra} {\mbox{$\mathcal{G\!A}$\hspace{.01in}lgebra}} +\newcommand {\latex} {\LaTeX} """ print_replace_old = None @@ -622,26 +663,21 @@ def sub_split_super_sub(text): @staticmethod def redirect(): + GaLatexPrinter.latex_str = '' if GaLatexPrinter.latex_str is None else GaLatexPrinter.latex_str + GaLatexPrinter.text_printer = print #Save original print function + builtins.print = latex_print #Redefine original print function GaLatexPrinter.latex_flg = True GaLatexPrinter.Basic__str__ = Basic.__str__ GaLatexPrinter.Matrix__str__ = Matrix.__str__ Basic.__str__ = lambda self: GaLatexPrinter().doprint(self) Matrix.__str__ = lambda self: GaLatexPrinter().doprint(self) - if GaLatexPrinter.ipy: - pass - else: - GaLatexPrinter.stdout = sys.stdout - sys.stdout = utils.StringIO() return @staticmethod def restore(): if GaLatexPrinter.latex_flg: - if not GaLatexPrinter.ipy: - GaLatexPrinter.latex_str += sys.stdout.getvalue() + builtins.print = GaLatexPrinter.text_printer #Redefine orginal print function GaLatexPrinter.latex_flg = False - if not GaLatexPrinter.ipy: - sys.stdout = GaLatexPrinter.stdout Basic.__str__ = GaLatexPrinter.Basic__str__ Matrix.__str__ = GaLatexPrinter.Matrix__str__ return @@ -964,6 +1000,44 @@ def latex(expr, **settings): def latex(expr, **settings): return GaLatexPrinter(settings).doprint(expr) +def latex_print(*s,**kws): + + s = list(s) + + GaLatexPrinter.fmt_dict = {'t':False, 'h':False} + + if utils.isstr(s[0]): + + if s[0] == 'h': + GaLatexPrinter.fmt_dict['h'] = True + s = s[1:] + + latex_str = '' + + for arg in s: + + if utils.isstr(arg): + if GaLatexPrinter.fmt_dict['t']: + latex_str += r'\text{' + arg + '} ' + else: + latex_str += arg + ' ' + else: + if isinstance(arg, tuple): + tmp = r'\lp ' + str(arg)[1:-1] + r'\rp ' + latex_str += tmp + ' ' + else: + latex_str += str(arg) + ' ' + + if GaLatexPrinter.fmt_dict['h']: + latex_str = r'\begin{array}{c}\hline ' + latex_str + r' \\ \hline \end{array} ' + + latex_str = latex_str.replace('$$', '') + + if isinteractive(): + return display(Latex('$$ ' + latex_str + ' $$')) + else: + GaLatexPrinter.latex_str += latex_str.strip() + '\n' + return def print_latex(expr, **settings): """Prints LaTeX representation of the given expression.""" @@ -999,6 +1073,9 @@ def Format(Fmode=True, Dmode=True, dop=1, inverse='full'): if isinteractive(): init_printing(use_latex= 'mathjax') + from IPython.core.interactiveshell import InteractiveShell + InteractiveShell.ast_node_interactivity = "all" + return display(Latex('$$ '+ip_cmds+' $$')) return @@ -1010,7 +1087,7 @@ def tex(paper=(14, 11), debug=False, prog=False, pt='10pt'): We assume that if tex() is called then Format() has been called at the beginning of the program. """ - latex_str = GaLatexPrinter.latex_str + sys.stdout.getvalue() + latex_str = GaLatexPrinter.latex_str # + sys.stdout.getvalue() GaLatexPrinter.latex_str = '' GaLatexPrinter.restore() r""" @@ -1408,7 +1485,6 @@ def parse_line(line): line = unparse_paren(level_lst) return line - def GAeval(s, pstr=False): """ GAeval converts a string to a multivector expression where the @@ -1425,14 +1501,6 @@ def GAeval(s, pstr=False): print(seval) return eval(seval, global_dict) -r""" -\begin{array}{c} -\left ( \begin{array}{c} F,\\ \end{array} \right . \\ -\begin{array}{c} F, \\ \end{array} \\ -\left .\begin{array}{c} F \\ \end{array} \right ) \\ -\end{array} -""" - def Fmt(obj,fmt=0): if isinstance(obj,(list,tuple,dict)): n = len(obj) @@ -1502,6 +1570,39 @@ def Fmt(obj,fmt=0): else: raise TypeError(str(type(obj)) + ' not allowed arg type in Fmt') +class Notes(object): + """ + Class for annotating LaTeX output. Only use with LaTeX + """ + def __init__(self, expr, notes, pos='L'): + if pos not in ('L','R','T','B'): + pos = 'L' + latex_str = r'\begin{array}' + if pos == 'L': + latex_str += r'{rl} ' + latex(notes) + r'\!\!\!\! & ' + latex(expr) + if pos == 'R': + latex_str += r'{rl} ' + latex(expr) + r' &\!\!!\!\! ' + latex(notes) + if pos == 'B': + latex_str += r'{c} ' + latex(expr) + r' \\ ' + latex(notes) + if pos == 'T': + latex_str += r'{c} ' + latex(notes) + r' \\ ' + latex(expr) + latex_str += r' \end{array} ' + self.latex_str = latex_str + + def __str__(self): + if GaLatexPrinter.latex_flg: + Printer = GaLatexPrinter + else: + Printer = GaPrinter + + return Printer().doprint(self) + + def __repr__(self): + return str(self) + + def Notes_latex_str(self, raw=False): + return self.latex_str + if __name__ == "__main__": From 8ecddcfd729ade54361caee1f2a45000d568de51 Mon Sep 17 00:00:00 2001 From: utensil Date: Mon, 7 Oct 2019 21:55:46 +0800 Subject: [PATCH 2/2] Fix tests for the new printer Co-authored-by: Alan Bromborsky --- examples/LaTeX/curvi_linear_latex.py | 6 + examples/ipython/LaTeX.ipynb | 134 ++-- examples/ipython/Old Format.ipynb | 165 ++--- examples/ipython/Smith Sphere.ipynb | 77 ++- .../ipython/colored_christoffel_symbols.ipynb | 77 ++- examples/ipython/dop.ipynb | 636 ++++++++++++++++-- examples/ipython/gr_metrics.ipynb | 77 ++- examples/ipython/inner_product.ipynb | 77 ++- examples/ipython/second_derivative.ipynb | 74 +- examples/ipython/simple_ga_test.ipynb | 75 ++- examples/ipython/st4.ipynb | 77 ++- examples/ipython/verify_doc_python.ipynb | 75 ++- 12 files changed, 1321 insertions(+), 229 deletions(-) diff --git a/examples/LaTeX/curvi_linear_latex.py b/examples/LaTeX/curvi_linear_latex.py index 7ab72c8a..ed255cbb 100755 --- a/examples/LaTeX/curvi_linear_latex.py +++ b/examples/LaTeX/curvi_linear_latex.py @@ -15,6 +15,8 @@ def derivatives_in_spherical_coordinates(): A = sp3d.mv('A','vector',f=True) B = sp3d.mv('B','bivector',f=True) + print('#Derivatives in Spherical Coordinates') + print('f =',f) print('A =',A) print('B =',B) @@ -69,6 +71,8 @@ def derivatives_in_elliptic_cylindrical_coordinates(): A = elip3d.mv('A','vector',f=True) B = elip3d.mv('B','bivector',f=True) + print('#Derivatives in Elliptic Cylindrical Coordinates') + print('f =',f) print('A =',A) print('B =',B) @@ -92,6 +96,8 @@ def derivatives_in_prolate_spheroidal_coordinates(): A = ps3d.mv('A','vector',f=True) B = ps3d.mv('B','bivector',f=True) + print('#Derivatives in Prolate Spheroidal Coordinates') + print('f =',f) print('A =',A) print('B =',B) diff --git a/examples/ipython/LaTeX.ipynb b/examples/ipython/LaTeX.ipynb index 2bc8dfe4..eb1bf486 100644 --- a/examples/ipython/LaTeX.ipynb +++ b/examples/ipython/LaTeX.ipynb @@ -161,6 +161,7 @@ "\\lstloadlanguages{Python}\r\n", "\r\n", "\\begin{document}\r\n", + "Derivatives in Spherical Coordinates\r\n", "\\begin{equation*} f = f \\end{equation*}\r\n", "\\begin{equation*} A = A^{r} \\boldsymbol{e}_{r} + A^{\\theta } \\boldsymbol{e}_{\\theta } + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", "\\begin{equation*} B = B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", @@ -176,10 +177,11 @@ "\\begin{equation*} \\boldsymbol{\\nabla} f = \\frac{\\partial_{u} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{u} + \\frac{\\partial_{v} f }{\\sqrt{u^{2} + v^{2}}} \\boldsymbol{e}_{v} + \\frac{\\partial_{\\phi } f }{u v} \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{u A^{u} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{v A^{v} }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} + \\frac{\\partial_{u} A^{u} }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{v} A^{v} }{\\sqrt{u^{2} + v^{2}}} + \\frac{A^{v} }{v \\sqrt{u^{2} + v^{2}}} + \\frac{A^{u} }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } A^{\\phi } }{u v} \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\frac{u B^{v\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{v B^{u\\phi } }{\\left(u^{2} + v^{2}\\right)^{\\frac{3}{2}}} - \\frac{\\partial_{v} B^{u\\phi } }{\\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{u} B^{v\\phi } }{\\sqrt{u^{2} + v^{2}}} - \\frac{B^{u\\phi } }{v \\sqrt{u^{2} + v^{2}}} + \\frac{B^{v\\phi } }{u \\sqrt{u^{2} + v^{2}}} + \\frac{\\partial_{\\phi } B^{uv} }{u v}\\right ) \\boldsymbol{e}_{u}\\wedge \\boldsymbol{e}_{v}\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", + "Derivatives in Prolate Spheroidal Coordinates\r\n", "\\begin{equation*} f = f \\end{equation*}\r\n", - " \\begin{align*} A = & A^{\\xi } \\boldsymbol{e}_{\\xi } \\\\ & + A^{\\eta } \\boldsymbol{e}_{\\eta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} B = & B^{\\xi \\eta } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\eta } \\\\ & + B^{\\xi \\phi } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\eta \\phi } \\boldsymbol{e}_{\\eta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} f = & \\frac{\\partial_{\\xi } f }{\\sqrt{{\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\xi } \\\\ & + \\frac{\\partial_{\\eta } f }{\\sqrt{{\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\eta } \\\\ & + \\frac{\\partial_{\\phi } f }{a \\sin{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )}} \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", + " \\begin{align*} A = & A^{\\xi } \\boldsymbol{e}_{\\xi } \\\\ & + A^{\\eta } \\boldsymbol{e}_{\\eta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} B = & B^{\\xi \\eta } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\eta } \\\\ & + B^{\\xi \\phi } \\boldsymbol{e}_{\\xi }\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\eta \\phi } \\boldsymbol{e}_{\\eta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} f = & \\frac{\\partial_{\\xi } f }{\\sqrt{{\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\xi } \\\\ & + \\frac{\\partial_{\\eta } f }{\\sqrt{{\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}} \\left|{a}\\right|} \\boldsymbol{e}_{\\eta } \\\\ & + \\frac{\\partial_{\\phi } f }{a \\sin{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )}} \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{a \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{3} \\partial_{\\phi } A^{\\phi } + \\frac{\\left(A^{\\eta } \\sin{\\left (2 \\eta \\right )} + A^{\\xi } \\sinh{\\left (2 \\xi \\right )}\\right) \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{\\frac{3}{2}} \\sin{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )} \\left|{a}\\right|}{2} + \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{\\frac{5}{2}} \\left(\\partial_{\\eta } A^{\\eta } + \\partial_{\\xi } A^{\\xi } \\right) \\sin{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )} \\left|{a}\\right| + \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{\\frac{5}{2}} A^{\\eta } \\cos{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )} \\left|{a}\\right| + \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{\\frac{5}{2}} A^{\\xi } \\sin{\\left (\\eta \\right )} \\cosh{\\left (\\xi \\right )} \\left|{a}\\right|}{a^{2} \\left({\\sin{\\left (\\eta \\right )}}^{2} + {\\sinh{\\left (\\xi \\right )}}^{2}\\right)^{3} \\sin{\\left (\\eta \\right )} \\sinh{\\left (\\xi \\right )}} \\end{equation*}\r\n", "\\end{document}\r\n" ] @@ -202,7 +204,6 @@ "cell_type": "code", "execution_count": 7, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -360,8 +361,7 @@ "\\begin{equation*} A = \\left \\{ \\begin{array}{ll} L \\left ( \\boldsymbol{e}_{a}\\right ) =& a c^{2} x \\boldsymbol{e}_{a} + a b c x^{2} \\boldsymbol{e}_{b} + a^{3} b^{5} x^{2} \\boldsymbol{e}_{c} \\\\ L \\left ( \\boldsymbol{e}_{b}\\right ) =& a^{2} b c x^{3} \\boldsymbol{e}_{a} + a b^{2} c^{5} x^{4} \\boldsymbol{e}_{b} + 5 a b^{2} c x^{4} \\boldsymbol{e}_{c} \\\\ L \\left ( \\boldsymbol{e}_{c}\\right ) =& a b^{2} c^{4} x^{4} \\boldsymbol{e}_{a} + 4 a b^{2} c^{2} x^{4} \\boldsymbol{e}_{b} + 4 a^{5} b^{2} c x^{4} \\boldsymbol{e}_{c} \\end{array} \\right \\} \\end{equation*}\r\n", "\\begin{equation*} v = a \\boldsymbol{e}_{a} + b \\boldsymbol{e}_{b} + c \\boldsymbol{e}_{c} \\end{equation*}\r\n", "\\begin{equation*} f = v\\cdot \\f{A}{v} = a c x \\left(4 a^{4} b^{2} c^{2} x^{3} + a^{3} b^{5} x + a^{2} b^{2} x^{2} + a^{2} c + a b^{2} c^{4} x^{3} + a b^{2} x + b^{4} c^{4} x^{3} + 4 b^{3} c^{2} x^{3} + 5 b^{3} c x^{3}\\right) \\end{equation*}\r\n", - " \\begin{align*} \\f{A}{v} = & a c x \\left(a b^{2} x^{2} + a c + b^{2} c^{4} x^{3}\\right) \\boldsymbol{e}_{a} \\\\ & + a b c x^{2} \\left(a + b^{2} c^{4} x^{2} + 4 b c^{2} x^{2}\\right) \\boldsymbol{e}_{b} \\\\ & + a b^{2} x^{2} \\left(4 a^{4} c^{2} x^{2} + a^{3} b^{3} + 5 b c x^{2}\\right) \\boldsymbol{e}_{c} \\end{align*} \r\n", - "\r\n", + " \\begin{align*} \\f{A}{v} = & a c x \\left(a b^{2} x^{2} + a c + b^{2} c^{4} x^{3}\\right) \\boldsymbol{e}_{a} \\\\ & + a b c x^{2} \\left(a + b^{2} c^{4} x^{2} + 4 b c^{2} x^{2}\\right) \\boldsymbol{e}_{b} \\\\ & + a b^{2} x^{2} \\left(4 a^{4} c^{2} x^{2} + a^{3} b^{3} + 5 b c x^{2}\\right) \\boldsymbol{e}_{c} \\end{align*}\r\n", "\\end{document}\r\n" ] } @@ -548,7 +548,6 @@ "cell_type": "code", "execution_count": 15, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -606,17 +605,17 @@ "\\begin{document}\r\n", "\\begin{equation*} \\text{Pseudo Scalar\\;\\;}I = \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\r\n", "\\begin{equation*} I_{xyz} = \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{equation*}\r\n", - " \\begin{align*} \\text{Electromagnetic Field Bi-Vector\\;\\;} F = & - E^{x} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", + " \\begin{align*} \\text{Electromagnetic Field Bi-Vector\\;\\;} F = & - E^{x} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "Geom Derivative of Electomagnetic Field Bi-Vector\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} F = 0 = & - i \\left(E^{x} k_{x} + E^{y} k_{y} + E^{z} k_{z}\\right) e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t} \\\\ & + i \\left(B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{x} \\\\ & + i \\left(- B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{y} \\\\ & + i \\left(B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{z} \\\\ & + i \\left(- B^{z} \\omega - E^{x} k_{y} + E^{y} k_{x}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + i \\left(B^{y} \\omega - E^{x} k_{z} + E^{z} k_{x}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + i \\left(- B^{x} \\omega - E^{y} k_{z} + E^{z} k_{y}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - i \\left(B^{x} k_{x} + B^{y} k_{y} + B^{z} k_{z}\\right) e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} \\lp\\bm{\\nabla}F\\rp /\\lp i e^{iK\\cdot X}\\rp = 0 = & \\left ( - E^{x} k_{x} - E^{y} k_{y} - E^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right ) \\boldsymbol{\\gamma }_{x} \\\\ & + \\left ( - B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right ) \\boldsymbol{\\gamma }_{y} \\\\ & + \\left ( B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right ) \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{z} \\omega - E^{x} k_{y} + E^{y} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\left ( B^{y} \\omega - E^{x} k_{z} + E^{z} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{x} \\omega - E^{y} k_{z} + E^{z} k_{y}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{x} k_{x} - B^{y} k_{y} - B^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} F = 0 = & - i \\left(E^{x} k_{x} + E^{y} k_{y} + E^{z} k_{z}\\right) e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{t} \\\\ & + i \\left(B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{x} \\\\ & + i \\left(- B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{y} \\\\ & + i \\left(B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{z} \\\\ & + i \\left(- B^{z} \\omega - E^{x} k_{y} + E^{y} k_{x}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + i \\left(B^{y} \\omega - E^{x} k_{z} + E^{z} k_{x}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + i \\left(- B^{x} \\omega - E^{y} k_{z} + E^{z} k_{y}\\right) e^{i \\left(\\omega t - k_{x} x - k_{y} y - k_{z} z\\right)} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - i \\left(B^{x} k_{x} + B^{y} k_{y} + B^{z} k_{z}\\right) e^{- i \\left(- \\omega t + k_{x} x + k_{y} y + k_{z} z\\right)} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} \\lp\\bm{\\nabla}F\\rp /\\lp i e^{iK\\cdot X}\\rp = 0 = & \\left ( - E^{x} k_{x} - E^{y} k_{y} - E^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( B^{y} k_{z} - B^{z} k_{y} - E^{x} \\omega \\right ) \\boldsymbol{\\gamma }_{x} \\\\ & + \\left ( - B^{x} k_{z} + B^{z} k_{x} - E^{y} \\omega \\right ) \\boldsymbol{\\gamma }_{y} \\\\ & + \\left ( B^{x} k_{y} - B^{y} k_{x} - E^{z} \\omega \\right ) \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{z} \\omega - E^{x} k_{y} + E^{y} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\left ( B^{y} \\omega - E^{x} k_{z} + E^{z} k_{x}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{x} \\omega - E^{y} k_{z} + E^{z} k_{y}\\right ) \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\left ( - B^{x} k_{x} - B^{y} k_{y} - B^{z} k_{z}\\right ) \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\begin{equation*} \\mbox{set } e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0\\mbox{ and } e_{E}\\cdot e_{E} = e_{B}\\cdot e_{B} = e_{k}\\cdot e_{k} = -e_{t}\\cdot e_{t} = 1 \\end{equation*}\r\n", "\\begin{equation*} g = \\left [ \\begin{array}{cccc} -1 & \\left ( e_{E}\\cdot e_{B}\\right ) & 0 & 0 \\\\ \\left ( e_{E}\\cdot e_{B}\\right ) & -1 & 0 & 0 \\\\ 0 & 0 & -1 & 0 \\\\ 0 & 0 & 0 & 1 \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} K\\cdot X = \\omega t - k x_{k} \\end{equation*}\r\n", - " \\begin{align*} F = & - \\frac{B e^{i \\left(\\omega t - k x_{k}\\right)}}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k} \\\\ & + E e^{i \\left(\\omega t - k x_{k}\\right)} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{t} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B e^{i \\left(\\omega t - k x_{k}\\right)}}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k} \\end{align*} \r\n", - " \\begin{align*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 = & \\left ( - \\frac{B k}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B k}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B} \\\\ & + \\left ( - \\frac{B \\omega }{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B \\omega }{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\end{align*} \r\n", + " \\begin{align*} F = & - \\frac{B e^{i \\left(\\omega t - k x_{k}\\right)}}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k} \\\\ & + E e^{i \\left(\\omega t - k x_{k}\\right)} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{t} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B e^{i \\left(\\omega t - k x_{k}\\right)}}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k} \\end{align*}\r\n", + " \\begin{align*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 = & \\left ( - \\frac{B k}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B k}{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B} \\\\ & + \\left ( - \\frac{B \\omega }{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\\\ & - \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B \\omega }{\\sqrt{- \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\end{align*}\r\n", "\\begin{equation*} \\mbox{Previous equation requires that: }e_{E}\\cdot e_{B} = 0\\mbox{ if }B\\ne 0\\mbox{ and }k\\ne 0 \\end{equation*}\r\n", - " \\begin{align*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 = & \\left ( - B k - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\ & + \\left ( - B \\omega - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\end{align*} \r\n", + " \\begin{align*} \\lp\\bm{\\nabla}F\\rp/\\lp ie^{iK\\cdot X} \\rp = 0 = & \\left ( - B k - E \\omega \\right ) \\boldsymbol{e}_{E} \\\\ & + \\left ( - B \\omega - E k\\right ) \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k}\\wedge \\boldsymbol{t} \\end{align*}\r\n", "\\begin{equation*} 0 = - B k - E \\omega \\end{equation*}\r\n", "\\begin{equation*} 0 = - B \\omega - E k \\end{equation*}\r\n", "\\begin{equation*} \\mbox{eq3 = eq1-eq2: }0 = - \\frac{E \\omega }{k} + \\frac{E k}{\\omega } \\end{equation*}\r\n", @@ -699,8 +698,8 @@ "\\begin{document}\r\n", "\\begin{equation*} \\begin{array}{c} \\left [ f , \\right. \\\\ F^{x} \\boldsymbol{e}_{x} + F^{y} \\boldsymbol{e}_{y} + F^{z} \\boldsymbol{e}_{z}, \\\\ \\left. B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}\\right ] \\\\ \\end{array} \\end{equation*}\r\n", "\\begin{equation*} \\left [ \\begin{array}{ccc} f , & F^{x} \\boldsymbol{e}_{x} + F^{y} \\boldsymbol{e}_{y} + F^{z} \\boldsymbol{e}_{z}, & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}\\\\ \\end{array} \\right ] \\end{equation*}\r\n", - " \\begin{align*} & F^{x} \\boldsymbol{e}_{x} \\\\ & + F^{y} \\boldsymbol{e}_{y} \\\\ & + F^{z} \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + "\\begin{align*} & F^{x} \\boldsymbol{e}_{x} \\\\ & + F^{y} \\boldsymbol{e}_{y} \\\\ & + F^{z} \\boldsymbol{e}_{z} \\end{align*}\r\n", + "\\begin{align*} & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\nabla^{2} = \\nabla\\cdot\\nabla = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}\r\n", "\\begin{equation*} \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} + \\boldsymbol{e}_{x} \\frac{\\partial}{\\partial x} + \\boldsymbol{e}_{y} \\frac{\\partial}{\\partial y} + \\boldsymbol{e}_{z} \\frac{\\partial}{\\partial z} \\end{equation*}\r\n", "\\end{document}\r\n" @@ -724,7 +723,6 @@ "cell_type": "code", "execution_count": 19, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -893,7 +891,6 @@ "cell_type": "code", "execution_count": 21, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -973,14 +970,14 @@ "\\end{lstlisting}\r\n", "Code Output:\r\n", "\\begin{equation*} A = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} A_{+} = A + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} A_{-} = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{x}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{z}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) & \\left ( e_{z}\\cdot e_{z}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} X Y = & \\left ( \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z}\\right ) \\\\ & + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} X Y = & \\left ( \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z}\\right ) \\\\ & + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} X\\W Y = \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} X\\cdot Y = \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z} \\end{equation*}\r\n", "\\begin{equation*} X\\times Y = \\frac{\\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{x} Y^{y} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{x} Y^{z} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{x} - \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{x} - \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{y} Y^{z} - \\left ( e_{y}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{y} - \\left ( e_{y}\\cdot e_{z}\\right ) ^{2} X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) ^{2} X^{z} Y^{y}}{\\sqrt{\\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) ^{2} - \\left ( e_{x}\\cdot e_{y}\\right ) ^{2} \\left ( e_{z}\\cdot e_{z}\\right ) + 2 \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{z}\\right ) ^{2} \\left ( e_{y}\\cdot e_{y}\\right ) }} \\boldsymbol{e}_{x} + \\frac{- \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{x} - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{y} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) X^{y} Y^{x} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{x}\\cdot e_{z}\\right ) ^{2} X^{x} Y^{z} - \\left ( e_{x}\\cdot e_{z}\\right ) ^{2} X^{z} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} - \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y}}{\\sqrt{\\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) ^{2} - \\left ( e_{x}\\cdot e_{y}\\right ) ^{2} \\left ( e_{z}\\cdot e_{z}\\right ) + 2 \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{z}\\right ) ^{2} \\left ( e_{y}\\cdot e_{y}\\right ) }} \\boldsymbol{e}_{y} + \\frac{\\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{x} Y^{y} - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{x} Y^{z} - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{x} - \\left ( e_{x}\\cdot e_{y}\\right ) ^{2} X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) ^{2} X^{y} Y^{x} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} - \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} - \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) X^{z} Y^{y}}{\\sqrt{\\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{y}\\right ) \\left ( e_{z}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{x}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) ^{2} - \\left ( e_{x}\\cdot e_{y}\\right ) ^{2} \\left ( e_{z}\\cdot e_{z}\\right ) + 2 \\left ( e_{x}\\cdot e_{y}\\right ) \\left ( e_{x}\\cdot e_{z}\\right ) \\left ( e_{y}\\cdot e_{z}\\right ) - \\left ( e_{x}\\cdot e_{z}\\right ) ^{2} \\left ( e_{y}\\cdot e_{y}\\right ) }} \\boldsymbol{e}_{z} \\end{equation*}\r\n", @@ -1067,7 +1064,7 @@ "\\begin{equation*} \\bm{(a\\W b)\\cdot (c\\W d)} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", "\\begin{equation*} \\bm{((a\\W b)\\cdot c)\\cdot d} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", "\\begin{equation*} \\bm{(a\\W b)\\times (c\\W d)} = - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c} + \\left ( b\\cdot c\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{d} + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{equation*}\r\n", - " \\begin{align*} \\bm{(a\\W b\\W c)(d\\W e)} = & \\left ( - \\left ( b\\cdot d\\right ) \\left ( c\\cdot e\\right ) + \\left ( b\\cdot e\\right ) \\left ( c\\cdot d\\right ) \\right ) \\boldsymbol{a} + \\left ( \\left ( a\\cdot d\\right ) \\left ( c\\cdot e\\right ) - \\left ( a\\cdot e\\right ) \\left ( c\\cdot d\\right ) \\right ) \\boldsymbol{b} + \\left ( - \\left ( a\\cdot d\\right ) \\left ( b\\cdot e\\right ) + \\left ( a\\cdot e\\right ) \\left ( b\\cdot d\\right ) \\right ) \\boldsymbol{c} \\\\ & - \\left ( c\\cdot e\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{d} + \\left ( c\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{e} + \\left ( b\\cdot e\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} - \\left ( a\\cdot e\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} \\\\ & + \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d}\\wedge \\boldsymbol{e} \\end{align*} \r\n", + " \\begin{align*} \\bm{(a\\W b\\W c)(d\\W e)} = & \\left ( - \\left ( b\\cdot d\\right ) \\left ( c\\cdot e\\right ) + \\left ( b\\cdot e\\right ) \\left ( c\\cdot d\\right ) \\right ) \\boldsymbol{a} + \\left ( \\left ( a\\cdot d\\right ) \\left ( c\\cdot e\\right ) - \\left ( a\\cdot e\\right ) \\left ( c\\cdot d\\right ) \\right ) \\boldsymbol{b} + \\left ( - \\left ( a\\cdot d\\right ) \\left ( b\\cdot e\\right ) + \\left ( a\\cdot e\\right ) \\left ( b\\cdot d\\right ) \\right ) \\boldsymbol{c} \\\\ & - \\left ( c\\cdot e\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{d} + \\left ( c\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{e} + \\left ( b\\cdot e\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} - \\left ( a\\cdot e\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{e} \\\\ & + \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d}\\wedge \\boldsymbol{e} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def rounding_numerical_components():\r\n", " Print_Function()\r\n", @@ -1084,8 +1081,8 @@ "Code Output:\r\n", "\\begin{equation*} X = 1 \\cdot 2 \\boldsymbol{e}_{x} + 2 \\cdot 34 \\boldsymbol{e}_{y} + 0 \\cdot 555 \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Nga(X,2) = 1 \\cdot 2 \\boldsymbol{e}_{x} + 2 \\cdot 3 \\boldsymbol{e}_{y} + 0 \\cdot 55 \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} X Y = & 12 \\cdot 7011 \\\\ & + 4 \\cdot 02078 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 175185 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 182 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} Nga(X Y,2) = & 13 \\cdot 0 \\\\ & + 4 \\cdot 0 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 2 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 0 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} X Y = & 12 \\cdot 7011 \\\\ & + 4 \\cdot 02078 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 175185 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 182 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} Nga(X Y,2) = & 13 \\cdot 0 \\\\ & + 4 \\cdot 0 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 2 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 0 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def derivatives_in_rectangular_coordinates():\r\n", " Print_Function()\r\n", @@ -1114,12 +1111,12 @@ "\\begin{equation*} f = f \\end{equation*}\r\n", "\\begin{equation*} A = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} B = B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} C = & C \\\\ & + C^{x} \\boldsymbol{e}_{x} + C^{y} \\boldsymbol{e}_{y} + C^{z} \\boldsymbol{e}_{z} \\\\ & + C^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + C^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + C^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + C^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} C = & C \\\\ & + C^{x} \\boldsymbol{e}_{x} + C^{y} \\boldsymbol{e}_{y} + C^{z} \\boldsymbol{e}_{z} \\\\ & + C^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + C^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + C^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + C^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} f = \\partial_{x} f \\boldsymbol{e}_{x} + \\partial_{y} f \\boldsymbol{e}_{y} + \\partial_{z} f \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} A = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} A = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W A) = \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} B = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} B = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot B = \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", @@ -1503,7 +1500,8 @@ " print('v.Fmt(3) =',v.Fmt(3))\r\n", " print('B.Fmt(3) =',B.Fmt(3))\r\n", " print('M.Fmt(2) =',M.Fmt(2))\r\n", - " print('M.Fmt(1) =',M.Fmt(1))\r\n", + " print('M.Fmt(1) =',M.Fmt(1))\r", + "\r\n", " print('#Global $Fmt = 1$')\r\n", " Fmt(1)\r\n", " print('v =',v)\r\n", @@ -1515,11 +1513,11 @@ "Global $Fmt = 2$\r\n", "\\begin{equation*} v = v^{1} \\boldsymbol{e}_{1} + v^{2} \\boldsymbol{e}_{2} + v^{3} \\boldsymbol{e}_{3} \\end{equation*}\r\n", "\\begin{equation*} B = B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\r\n", - " \\begin{align*} M = & M \\\\ & + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\ & + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\ & + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*} \r\n", + " \\begin{align*} M = & M \\\\ & + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\ & + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\ & + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*}\r\n", "Using $.Fmt()$ Function\r\n", - " \\begin{align*} v \\cdot Fmt(3) = & v^{1} \\boldsymbol{e}_{1} \\\\ & + v^{2} \\boldsymbol{e}_{2} \\\\ & + v^{3} \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} B \\cdot Fmt(3) = & B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} \\\\ & + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} \\\\ & + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} M \\cdot Fmt(2) = & M \\\\ & + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\ & + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\ & + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*} \r\n", + " \\begin{align*} v \\cdot Fmt(3) = & v^{1} \\boldsymbol{e}_{1} \\\\ & + v^{2} \\boldsymbol{e}_{2} \\\\ & + v^{3} \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} B \\cdot Fmt(3) = & B^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} \\\\ & + B^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} \\\\ & + B^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} M \\cdot Fmt(2) = & M \\\\ & + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} \\\\ & + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\\\ & + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{align*}\r\n", "\\begin{equation*} M \\cdot Fmt(1) = M + M^{1} \\boldsymbol{e}_{1} + M^{2} \\boldsymbol{e}_{2} + M^{3} \\boldsymbol{e}_{3} + M^{12} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2} + M^{13} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{3} + M^{23} \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} + M^{123} \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\r\n", "Global $Fmt = 1$\r\n", "\\begin{equation*} v = v^{1} \\boldsymbol{e}_{1} + v^{2} \\boldsymbol{e}_{2} + v^{3} \\boldsymbol{e}_{3} \\end{equation*}\r\n", @@ -1546,7 +1544,6 @@ "cell_type": "code", "execution_count": 23, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1742,8 +1739,8 @@ "\\begin{equation*} F = \\frac{\\left ( e_{B}\\cdot e_{k}\\right ) B e^{i \\left(\\left ( e_{B}\\cdot e_{k}\\right ) k x_{B} + \\left ( e_{E}\\cdot e_{k}\\right ) k x_{E} - \\omega t + k x_{k}\\right)}}{\\sqrt{- \\left ( e_{B}\\cdot e_{k}\\right ) ^{2} + 2 \\left ( e_{B}\\cdot e_{k}\\right ) \\left ( e_{E}\\cdot e_{B}\\right ) \\left ( e_{E}\\cdot e_{k}\\right ) - \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} - \\left ( e_{E}\\cdot e_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{B} - \\frac{B e^{i \\left(\\left ( e_{B}\\cdot e_{k}\\right ) k x_{B} + \\left ( e_{E}\\cdot e_{k}\\right ) k x_{E} - \\omega t + k x_{k}\\right)}}{\\sqrt{- \\left ( e_{B}\\cdot e_{k}\\right ) ^{2} + 2 \\left ( e_{B}\\cdot e_{k}\\right ) \\left ( e_{E}\\cdot e_{B}\\right ) \\left ( e_{E}\\cdot e_{k}\\right ) - \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} - \\left ( e_{E}\\cdot e_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{k} + E e^{i \\left(\\left ( e_{B}\\cdot e_{k}\\right ) k x_{B} + \\left ( e_{E}\\cdot e_{k}\\right ) k x_{E} - \\omega t + k x_{k}\\right)} \\boldsymbol{e}_{E}\\wedge \\boldsymbol{e}_{t} + \\frac{\\left ( e_{E}\\cdot e_{B}\\right ) B e^{i \\left(\\left ( e_{B}\\cdot e_{k}\\right ) k x_{B} + \\left ( e_{E}\\cdot e_{k}\\right ) k x_{E} - \\omega t + k x_{k}\\right)}}{\\sqrt{- \\left ( e_{B}\\cdot e_{k}\\right ) ^{2} + 2 \\left ( e_{B}\\cdot e_{k}\\right ) \\left ( e_{E}\\cdot e_{B}\\right ) \\left ( e_{E}\\cdot e_{k}\\right ) - \\left ( e_{E}\\cdot e_{B}\\right ) ^{2} - \\left ( e_{E}\\cdot e_{k}\\right ) ^{2} + 1}} \\boldsymbol{e}_{B}\\wedge \\boldsymbol{e}_{k} \\end{equation*}\r\n", "\\begin{equation*} \\mbox{Substituting }e_{E}\\cdot e_{B} = e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0 \\end{equation*}\r\n", "\\begin{equation*} g = \\left [ \\begin{array}{cccc} 1 & \\left ( e_{E}\\cdot e_{B}\\right ) & \\left ( e_{E}\\cdot e_{k}\\right ) & 0 \\\\ \\left ( e_{E}\\cdot e_{B}\\right ) & 1 & \\left ( e_{B}\\cdot e_{k}\\right ) & 0 \\\\ \\left ( e_{E}\\cdot e_{k}\\right ) & \\left ( e_{B}\\cdot e_{k}\\right ) & 1 & 0 \\\\ 0 & 0 & 0 & -1 \\end{array}\\right ] \\end{equation*}\r\n", - " \\begin{align*} X = & x_{E} \\boldsymbol{e}_{E} \\\\ & + x_{B} \\boldsymbol{e}_{B} \\\\ & + x_{k} \\boldsymbol{e}_{k} \\\\ & + t \\boldsymbol{e}_{t} \\end{align*} \r\n", - " \\begin{align*} K = & k \\boldsymbol{e}_{k} \\\\ & + \\omega \\boldsymbol{e}_{t} \\end{align*} \r\n", + " \\begin{align*} X = & x_{E} \\boldsymbol{e}_{E} \\\\ & + x_{B} \\boldsymbol{e}_{B} \\\\ & + x_{k} \\boldsymbol{e}_{k} \\\\ & + t \\boldsymbol{e}_{t} \\end{align*}\r\n", + " \\begin{align*} K = & k \\boldsymbol{e}_{k} \\\\ & + \\omega \\boldsymbol{e}_{t} \\end{align*}\r\n", "\\begin{equation*} K\\cdot X = \\left ( e_{B}\\cdot e_{k}\\right ) k x_{B} + \\left ( e_{E}\\cdot e_{k}\\right ) k x_{E} - \\omega t + k x_{k} \\end{equation*}\r\n", "\\begin{equation*} \\mbox{Substituting }e_{E}\\cdot e_{B} = e_{E}\\cdot e_{k} = e_{B}\\cdot e_{k} = 0 \\end{equation*}\r\n", "\\end{document}\r\n" @@ -2103,7 +2100,6 @@ "cell_type": "code", "execution_count": 35, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -2160,30 +2156,30 @@ "\r\n", "\\begin{document}\r\n", "\\begin{equation*} \\bm{A} = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\bm{A} = & A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{B} = & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{x} f \\boldsymbol{e}_{x} \\\\ & + \\partial_{y} f \\boldsymbol{e}_{y} \\\\ & + \\partial_{z} f \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\bm{A} = & A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{B} = & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{x} f \\boldsymbol{e}_{x} \\\\ & + \\partial_{y} f \\boldsymbol{e}_{y} \\\\ & + \\partial_{z} f \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot \\bm{A} = \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\bm{A} = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W \\bm{A}) = & \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\bm{A} = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W \\bm{A}) = & \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W \\bm{B} = \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\cdot \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\cdot \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{cccc} \\left ( a\\cdot a\\right ) & \\left ( a\\cdot b\\right ) & \\left ( a\\cdot c\\right ) & \\left ( a\\cdot d\\right ) \\\\ \\left ( a\\cdot b\\right ) & \\left ( b\\cdot b\\right ) & \\left ( b\\cdot c\\right ) & \\left ( b\\cdot d\\right ) \\\\ \\left ( a\\cdot c\\right ) & \\left ( b\\cdot c\\right ) & \\left ( c\\cdot c\\right ) & \\left ( c\\cdot d\\right ) \\\\ \\left ( a\\cdot d\\right ) & \\left ( b\\cdot d\\right ) & \\left ( c\\cdot d\\right ) & \\left ( d\\cdot d\\right ) \\end{array}\\right ] \\end{equation*}\r\n", - " \\begin{align*} \\bm{a\\cdot (b c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*} \r\n", - " \\begin{align*} \\bm{a\\cdot (b\\W c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*} \r\n", - " \\begin{align*} \\bm{a\\cdot (b\\W c\\W d)} = & \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{align*} \r\n", + " \\begin{align*} \\bm{a\\cdot (b c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*}\r\n", + " \\begin{align*} \\bm{a\\cdot (b\\W c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*}\r\n", + " \\begin{align*} \\bm{a\\cdot (b\\W c\\W d)} = & \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{align*}\r\n", "\\begin{equation*} \\bm{a\\cdot (b\\W c)+c\\cdot (a\\W b)+b\\cdot (c\\W a)} = 0 \\end{equation*}\r\n", "\\begin{equation*} \\bm{a (b\\W c)-b (a\\W c)+c (a\\W b)} = 3 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c} \\end{equation*}\r\n", "\\begin{equation*} \\bm{a (b\\W c\\W d)-b (a\\W c\\W d)+c (a\\W b\\W d)-d (a\\W b\\W c)} = 4 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\r\n", "\\begin{equation*} \\bm{(a\\W b)\\cdot (c\\W d)} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", "\\begin{equation*} \\bm{((a\\W b)\\cdot c)\\cdot d} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", - " \\begin{align*} \\bm{(a\\W b)\\times (c\\W d)} = & - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c} \\\\ & + \\left ( b\\cdot c\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{align*} \r\n", + " \\begin{align*} \\bm{(a\\W b)\\times (c\\W d)} = & - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c} \\\\ & + \\left ( b\\cdot c\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{align*}\r\n", "\\begin{equation*} E = \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\r\n", "\\begin{equation*} E^{2} = \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 2 \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} + \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1 \\end{equation*}\r\n", - " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", + " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", "\\begin{equation*} E1\\cdot e2 = 0 \\end{equation*}\r\n", "\\begin{equation*} E1\\cdot e3 = 0 \\end{equation*}\r\n", "\\begin{equation*} E2\\cdot e1 = 0 \\end{equation*}\r\n", @@ -2193,26 +2189,25 @@ "\\begin{equation*} (E1\\cdot e1)/E^{2} = 1 \\end{equation*}\r\n", "\\begin{equation*} (E2\\cdot e2)/E^{2} = 1 \\end{equation*}\r\n", "\\begin{equation*} (E3\\cdot e3)/E^{2} = 1 \\end{equation*}\r\n", - " \\begin{align*} A = & A^{r} \\boldsymbol{e}_{r} \\\\ & + A^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} B = & B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } \\\\ & + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{r} f \\boldsymbol{e}_{r} \\\\ & + \\frac{\\partial_{\\theta } f }{r} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{\\partial_{\\phi } f }{r \\sin{\\left (\\theta \\right )}} \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", + " \\begin{align*} A = & A^{r} \\boldsymbol{e}_{r} \\\\ & + A^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} B = & B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } \\\\ & + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{r} f \\boldsymbol{e}_{r} \\\\ & + \\frac{\\partial_{\\theta } f }{r} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{\\partial_{\\phi } f }{r \\sin{\\left (\\theta \\right )}} \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{r \\partial_{r} A^{r} + 2 A^{r} + \\frac{A^{\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } A^{\\theta } + \\frac{\\partial_{\\phi } A^{\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\end{equation*}\r\n", - " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W A) = & \\frac{\\frac{A^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } A^{\\phi } - \\frac{\\partial_{\\phi } A^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} \\\\ & + \\frac{- r \\partial_{r} A^{\\phi } - A^{\\phi } + \\frac{\\partial_{\\phi } A^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{r \\partial_{r} A^{\\theta } + A^{\\theta } - \\partial_{\\theta } A^{r} }{r} \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", + " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W A) = & \\frac{\\frac{A^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } A^{\\phi } - \\frac{\\partial_{\\phi } A^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} \\\\ & + \\frac{- r \\partial_{r} A^{\\phi } - A^{\\phi } + \\frac{\\partial_{\\phi } A^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{r \\partial_{r} A^{\\theta } + A^{\\theta } - \\partial_{\\theta } A^{r} }{r} \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\frac{r \\partial_{r} B^{\\theta \\phi } - \\frac{B^{r\\phi } }{\\tan{\\left (\\theta \\right )}} + 2 B^{\\theta \\phi } - \\partial_{\\theta } B^{r\\phi } + \\frac{\\partial_{\\phi } B^{r\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", - " \\begin{align*} B = \\bm{B\\gamma_{t}} = & - B^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - B^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} E = \\bm{E\\gamma_{t}} = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} F = E+IB = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} J = & J^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + J^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + J^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + J^{z} \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", + " \\begin{align*} B = \\bm{B\\gamma_{t}} = & - B^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - B^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} E = \\bm{E\\gamma_{t}} = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} F = E+IB = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} J = & J^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + J^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + J^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + J^{z} \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} F = J \\end{equation*}\r\n", - " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = t'\\bm{\\gamma'_{t}}+x'\\bm{\\gamma'_{x}} = R\\lp t'\\bm{\\gamma_{t}}+x'\\bm{\\gamma_{x}}\\rp R^{\\dagger} \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( t' \\cosh{\\left (\\alpha \\right )} - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + x' \\cosh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( t' \\cosh{\\left (\\alpha \\right )} - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + x' \\cosh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} \\f{\\sinh}{\\alpha} = \\gamma\\beta \\end{equation*}\r\n", "\\begin{equation*} \\f{\\cosh}{\\alpha} = \\gamma \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\gamma \\left(- \\beta x' + t'\\right) \\boldsymbol{\\gamma }_{t} \\\\ & + \\gamma \\left(- \\beta t' + x'\\right) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", - " \\begin{align*} \\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - "\r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\gamma \\left(- \\beta x' + t'\\right) \\boldsymbol{\\gamma }_{t} \\\\ & + \\gamma \\left(- \\beta t' + x'\\right) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", + " \\begin{align*} \\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\end{document}\r\n" ] } @@ -2234,7 +2229,6 @@ "cell_type": "code", "execution_count": 37, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -2529,13 +2523,13 @@ "\\begin{document}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{x}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{z}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) & \\left ( e_{z}\\cdot e_{z}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} A = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} A_{+} = A + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} A_{-} = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} X Y = & \\left ( \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z}\\right ) \\\\ & + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} X Y = & \\left ( \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z}\\right ) \\\\ & + \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} X\\W Y = \\left ( X^{x} Y^{y} - X^{y} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( X^{x} Y^{z} - X^{z} Y^{x}\\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( X^{y} Y^{z} - X^{z} Y^{y}\\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} X\\cdot Y = \\left ( e_{x}\\cdot e_{x}\\right ) X^{x} Y^{x} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{x} Y^{y} + \\left ( e_{x}\\cdot e_{y}\\right ) X^{y} Y^{x} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{x} Y^{z} + \\left ( e_{x}\\cdot e_{z}\\right ) X^{z} Y^{x} + \\left ( e_{y}\\cdot e_{y}\\right ) X^{y} Y^{y} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{y} Y^{z} + \\left ( e_{y}\\cdot e_{z}\\right ) X^{z} Y^{y} + \\left ( e_{z}\\cdot e_{z}\\right ) X^{z} Y^{z} \\end{equation*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{cc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", @@ -2668,7 +2662,9 @@ { "cell_type": "code", "execution_count": 43, - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [ { "name": "stdout", @@ -2787,7 +2783,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/Old Format.ipynb b/examples/ipython/Old Format.ipynb index f552ad18..d03f8fa7 100644 --- a/examples/ipython/Old Format.ipynb +++ b/examples/ipython/Old Format.ipynb @@ -41,26 +41,26 @@ "name": "stdout", "output_type": "stream", "text": [ - "Frame = (\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m,\u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m)\n", - "Reciprocal Frame = (\u001b[0;34mex\u001b[0m/2 + \u001b[0;34mey\u001b[0m/2,\u001b[0;34mex\u001b[0m/2 - \u001b[0;34mey\u001b[0m/2)\n", - "eu.eu_r = 1\n", - "eu.ev_r = -1/2 + 1/2\n", - "ev.eu_r = 0 \n", - "ev.ev_r = 1\n", - "Frame = (\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m,\u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m)\n", - "Reciprocal Frame = (\u001b[0;34mex\u001b[0m/3 + \u001b[0;34mey\u001b[0m/3 + \u001b[0;34mez\u001b[0m/3,\u001b[0;34mex\u001b[0m/2 - \u001b[0;34mey\u001b[0m/2)\n", - "eu.eu_r = 1\n", - "eu.ev_r = -1/2 + 1/2\n", - "ev.eu_r = 0 \n", - "ev.ev_r = 1\n", - "eu = \u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m\n", - "ev = \u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m\n", - "eu^ev|ex\n", - "(eu^(ev|ex))\n", - "\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m\n", - "eu^ev|ex*eu\n", - "((eu^(ev|ex))*eu)\n", - "3\n" + "Frame = (\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m,\u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m)\r\n", + "Reciprocal Frame = (\u001b[0;34mex\u001b[0m/2 + \u001b[0;34mey\u001b[0m/2,\u001b[0;34mex\u001b[0m/2 - \u001b[0;34mey\u001b[0m/2)\r\n", + "eu.eu_r = 1\r\n", + "eu.ev_r = -1/2 + 1/2\r\n", + "ev.eu_r = 0 \r\n", + "ev.ev_r = 1\r\n", + "Frame = (\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m,\u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m)\r\n", + "Reciprocal Frame = (\u001b[0;34mex\u001b[0m/3 + \u001b[0;34mey\u001b[0m/3 + \u001b[0;34mez\u001b[0m/3,\u001b[0;34mex\u001b[0m/2 - \u001b[0;34mey\u001b[0m/2)\r\n", + "eu.eu_r = 1\r\n", + "eu.ev_r = -1/2 + 1/2\r\n", + "ev.eu_r = 0 \r\n", + "ev.ev_r = 1\r\n", + "eu = \u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m\r\n", + "ev = \u001b[0;34mex\u001b[0m - \u001b[0;34mey\u001b[0m\r\n", + "eu^ev|ex\r\n", + "(eu^(ev|ex))\r\n", + "\u001b[0;34mex\u001b[0m + \u001b[0;34mey\u001b[0m + \u001b[0;34mez\u001b[0m\r\n", + "eu^ev|ex*eu\r\n", + "((eu^(ev|ex))*eu)\r\n", + "3\r\n" ] } ], @@ -101,7 +101,6 @@ "cell_type": "code", "execution_count": 6, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -179,8 +178,8 @@ "\\end{lstlisting}\r\n", "Code Output:\r\n", "\\begin{equation*} A = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{x}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{z}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) & \\left ( e_{z}\\cdot e_{z}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", @@ -267,8 +266,8 @@ "Code Output:\r\n", "\\begin{equation*} X = 1 \\cdot 2 \\boldsymbol{e}_{x} + 2 \\cdot 34 \\boldsymbol{e}_{y} + 0 \\cdot 555 \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Nga(X,2) = 1 \\cdot 2 \\boldsymbol{e}_{x} + 2 \\cdot 3 \\boldsymbol{e}_{y} + 0 \\cdot 55 \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} X Y = & 12 \\cdot 7011 \\\\ & + 4 \\cdot 02078 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 175185 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 182 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} Nga(X Y,2) = & 13 \\cdot 0 \\\\ & + 4 \\cdot 0 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 2 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 0 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} X Y = & 12 \\cdot 7011 \\\\ & + 4 \\cdot 02078 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 175185 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 182 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} Nga(X Y,2) = & 13 \\cdot 0 \\\\ & + 4 \\cdot 0 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + 6 \\cdot 2 \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + 10 \\cdot 0 \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def derivatives_in_rectangular_coordinates():\r\n", " Print_Function()\r\n", @@ -296,13 +295,13 @@ "\\begin{equation*} f = f \\end{equation*}\r\n", "\\begin{equation*} A = A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} B = B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} C = & C \\\\ & + C^{x} \\boldsymbol{e}_{x} + C^{y} \\boldsymbol{e}_{y} + C^{z} \\boldsymbol{e}_{z} \\\\ & + C^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + C^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + C^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + C^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} C = & C \\\\ & + C^{x} \\boldsymbol{e}_{x} + C^{y} \\boldsymbol{e}_{y} + C^{z} \\boldsymbol{e}_{z} \\\\ & + C^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + C^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + C^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + C^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} f = \\partial_{x} f \\boldsymbol{e}_{x} + \\partial_{y} f \\boldsymbol{e}_{y} + \\partial_{z} f \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} A = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} A = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} - \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} -I (\\boldsymbol{\\nabla} \\W A) = \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} B = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} B = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot B = \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", @@ -408,10 +407,10 @@ "Code Output:\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccccc} \\left ( p_{1}\\cdot p_{1}\\right ) & \\left ( p_{1}\\cdot p_{2}\\right ) & \\left ( p_{1}\\cdot p_{3}\\right ) & 0 & 0 \\\\ \\left ( p_{1}\\cdot p_{2}\\right ) & \\left ( p_{2}\\cdot p_{2}\\right ) & \\left ( p_{2}\\cdot p_{3}\\right ) & 0 & 0 \\\\ \\left ( p_{1}\\cdot p_{3}\\right ) & \\left ( p_{2}\\cdot p_{3}\\right ) & \\left ( p_{3}\\cdot p_{3}\\right ) & 0 & 0 \\\\ 0 & 0 & 0 & 0 & 2 \\\\ 0 & 0 & 0 & 2 & 0 \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} \\text{Extracting direction of line from }L = P1\\W P2\\W n \\end{equation*}\r\n", - " \\begin{align*} (L\\cdot n)\\cdot \\bar{n} = & 2 \\boldsymbol{p}_{1} \\\\ & -2 \\boldsymbol{p}_{2} \\end{align*} \r\n", + " \\begin{align*} (L\\cdot n)\\cdot \\bar{n} = & 2 \\boldsymbol{p}_{1} \\\\ & -2 \\boldsymbol{p}_{2} \\end{align*}\r\n", "\\begin{equation*} \\text{Extracting plane of circle from }C = P1\\W P2\\W P3 \\end{equation*}\r\n", - " \\begin{align*} ((C\\W n)\\cdot n)\\cdot \\bar{n}= & 2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} \\\\ & -2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} \\\\ & + 2 \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{align*} \r\n", - " \\begin{align*} (p2-p1)\\W (p3-p1)= & \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} \\\\ & - \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} \\\\ & + \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{align*} \r\n", + " \\begin{align*} ((C\\W n)\\cdot n)\\cdot \\bar{n}= & 2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} \\\\ & -2 \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} \\\\ & + 2 \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{align*}\r\n", + " \\begin{align*} (p2-p1)\\W (p3-p1)= & \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{2} \\\\ & - \\boldsymbol{p}_{1}\\wedge \\boldsymbol{p}_{3} \\\\ & + \\boldsymbol{p}_{2}\\wedge \\boldsymbol{p}_{3} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def extracting_vectors_from_conformal_2_blade():\r\n", " Print_Function()\r\n", @@ -440,12 +439,12 @@ "\\begin{equation*} B = P1\\W P2 \\end{equation*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} 0 & -1 & \\left ( P_{1}\\cdot a\\right ) \\\\ -1 & 0 & \\left ( P_{2}\\cdot a\\right ) \\\\ \\left ( P_{1}\\cdot a\\right ) & \\left ( P_{2}\\cdot a\\right ) & \\left ( a\\cdot a\\right ) \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} B^{2} = 1 \\end{equation*}\r\n", - " \\begin{align*} a' = a-(a\\W B) B = & - \\left ( P_{2}\\cdot a\\right ) \\boldsymbol{P}_{1} \\\\ & - \\left ( P_{1}\\cdot a\\right ) \\boldsymbol{P}_{2} \\end{align*} \r\n", + " \\begin{align*} a' = a-(a\\W B) B = & - \\left ( P_{2}\\cdot a\\right ) \\boldsymbol{P}_{1} \\\\ & - \\left ( P_{1}\\cdot a\\right ) \\boldsymbol{P}_{2} \\end{align*}\r\n", "\\begin{equation*} A+ = a'+a' B = - 2 \\left ( P_{2}\\cdot a\\right ) \\boldsymbol{P}_{1} \\end{equation*}\r\n", "\\begin{equation*} A- = a'-a' B = - 2 \\left ( P_{1}\\cdot a\\right ) \\boldsymbol{P}_{2} \\end{equation*}\r\n", "\\begin{equation*} (A+)^{2} = 0 \\end{equation*}\r\n", "\\begin{equation*} (A-)^{2} = 0 \\end{equation*}\r\n", - " \\begin{align*} a\\cdot B = & - \\left ( P_{2}\\cdot a\\right ) \\boldsymbol{P}_{1} \\\\ & + \\left ( P_{1}\\cdot a\\right ) \\boldsymbol{P}_{2} \\end{align*} \r\n", + " \\begin{align*} a\\cdot B = & - \\left ( P_{2}\\cdot a\\right ) \\boldsymbol{P}_{1} \\\\ & + \\left ( P_{1}\\cdot a\\right ) \\boldsymbol{P}_{2} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def reciprocal_frame_test():\r\n", " Print_Function()\r\n", @@ -499,9 +498,9 @@ "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} 1 & \\left ( e_{1}\\cdot e_{2}\\right ) & \\left ( e_{1}\\cdot e_{3}\\right ) \\\\ \\left ( e_{1}\\cdot e_{2}\\right ) & 1 & \\left ( e_{2}\\cdot e_{3}\\right ) \\\\ \\left ( e_{1}\\cdot e_{3}\\right ) & \\left ( e_{2}\\cdot e_{3}\\right ) & 1 \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} E = \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\r\n", "\\begin{equation*} E^{2} = \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 2 \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} + \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1 \\end{equation*}\r\n", - " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", + " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", "\\begin{equation*} E1\\cdot e2 = 0 \\end{equation*}\r\n", "\\begin{equation*} E1\\cdot e3 = 0 \\end{equation*}\r\n", "\\begin{equation*} E2\\cdot e1 = 0 \\end{equation*}\r\n", @@ -628,7 +627,6 @@ "cell_type": "code", "execution_count": 11, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -743,8 +741,8 @@ " return\r\n", "\\end{lstlisting}\r\n", "Code Output:\r\n", - " \\begin{align*} \\text{4-Vector Potential\\;\\;}\\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} \\text{8-component real spinor\\;\\;}\\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", + " \\begin{align*} \\text{4-Vector Potential\\;\\;}\\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} \\text{8-component real spinor\\;\\;}\\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\\\begin{lstlisting}[language=Python,showspaces=false,showstringspaces=false,backgroundcolor=\\color{gray},frame=single]\r\n", "def Lorentz_Tranformation_in_Geometric_Algebra():\r\n", " Print_Function()\r\n", @@ -768,13 +766,12 @@ " return\r\n", "\\end{lstlisting}\r\n", "Code Output:\r\n", - " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = t'\\bm{\\gamma'_{t}}+x'\\bm{\\gamma'_{x}} = R\\lp t'\\bm{\\gamma_{t}}+x'\\bm{\\gamma_{x}}\\rp R^{\\dagger} \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t' - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t' - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} \\f{\\sinh}{\\alpha} = \\gamma\\beta \\end{equation*}\r\n", "\\begin{equation*} \\f{\\cosh}{\\alpha} = \\gamma \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( - \\beta \\gamma x' + 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t'\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - \\beta \\gamma t' + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", - "\r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( - \\beta \\gamma x' + 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t'\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - \\beta \\gamma t' + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\end{document}\r\n" ] } @@ -796,7 +793,6 @@ "cell_type": "code", "execution_count": 13, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -853,32 +849,32 @@ "\r\n", "\\begin{document}\r\n", "\\begin{equation*} \\bm{A} = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\bm{A} = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{A} = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{A} = & A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{B} = & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{x} f \\boldsymbol{e}_{x} \\\\ & + \\partial_{y} f \\boldsymbol{e}_{y} \\\\ & + \\partial_{z} f \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\bm{A} = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{A} = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{A} = & A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{B} = & B^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + B^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + B^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{x} f \\boldsymbol{e}_{x} \\\\ & + \\partial_{y} f \\boldsymbol{e}_{y} \\\\ & + \\partial_{z} f \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot \\bm{A} = \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\bm{A} = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W \\bm{A}) = & \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\bm{A} = & \\left ( \\partial_{x} A^{x} + \\partial_{y} A^{y} + \\partial_{z} A^{z} \\right ) \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{z} A^{x} + \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W \\bm{A}) = & \\left ( - \\partial_{z} A^{y} + \\partial_{y} A^{z} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{z} A^{x} - \\partial_{x} A^{z} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( - \\partial_{y} A^{x} + \\partial_{x} A^{y} \\right ) \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\\\ & + \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W \\bm{B} = \\left ( \\partial_{z} B^{xy} - \\partial_{y} B^{xz} + \\partial_{x} B^{yz} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} \\boldsymbol{\\nabla} \\cdot \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} \\boldsymbol{\\nabla} \\cdot \\bm{B} = & \\left ( - \\partial_{y} B^{xy} - \\partial_{z} B^{xz} \\right ) \\boldsymbol{e}_{x} \\\\ & + \\left ( \\partial_{x} B^{xy} - \\partial_{z} B^{yz} \\right ) \\boldsymbol{e}_{y} \\\\ & + \\left ( \\partial_{x} B^{xz} + \\partial_{y} B^{yz} \\right ) \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{cccc} \\left ( a\\cdot a\\right ) & \\left ( a\\cdot b\\right ) & \\left ( a\\cdot c\\right ) & \\left ( a\\cdot d\\right ) \\\\ \\left ( a\\cdot b\\right ) & \\left ( b\\cdot b\\right ) & \\left ( b\\cdot c\\right ) & \\left ( b\\cdot d\\right ) \\\\ \\left ( a\\cdot c\\right ) & \\left ( b\\cdot c\\right ) & \\left ( c\\cdot c\\right ) & \\left ( c\\cdot d\\right ) \\\\ \\left ( a\\cdot d\\right ) & \\left ( b\\cdot d\\right ) & \\left ( c\\cdot d\\right ) & \\left ( d\\cdot d\\right ) \\end{array}\\right ] \\end{equation*}\r\n", - " \\begin{align*} \\bm{a\\cdot (b c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*} \r\n", - " \\begin{align*} \\bm{a\\cdot (b\\W c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*} \r\n", - " \\begin{align*} \\bm{a\\cdot (b\\W c\\W d)} = & \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{align*} \r\n", + " \\begin{align*} \\bm{a\\cdot (b c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*}\r\n", + " \\begin{align*} \\bm{a\\cdot (b\\W c)} = & - \\left ( a\\cdot c\\right ) \\boldsymbol{b} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c} \\end{align*}\r\n", + " \\begin{align*} \\bm{a\\cdot (b\\W c\\W d)} = & \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot b\\right ) \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{align*}\r\n", "\\begin{equation*} \\bm{a\\cdot (b\\W c)+c\\cdot (a\\W b)+b\\cdot (c\\W a)} = 0 \\end{equation*}\r\n", "\\begin{equation*} \\bm{a (b\\W c)-b (a\\W c)+c (a\\W b)} = 3 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c} \\end{equation*}\r\n", "\\begin{equation*} \\bm{a (b\\W c\\W d)-b (a\\W c\\W d)+c (a\\W b\\W d)-d (a\\W b\\W c)} = 4 \\boldsymbol{a}\\wedge \\boldsymbol{b}\\wedge \\boldsymbol{c}\\wedge \\boldsymbol{d} \\end{equation*}\r\n", "\\begin{equation*} \\bm{(a\\W b)\\cdot (c\\W d)} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", "\\begin{equation*} \\bm{((a\\W b)\\cdot c)\\cdot d} = - \\left ( a\\cdot c\\right ) \\left ( b\\cdot d\\right ) + \\left ( a\\cdot d\\right ) \\left ( b\\cdot c\\right ) \\end{equation*}\r\n", - " \\begin{align*} \\bm{(a\\W b)\\times (c\\W d)} = & - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c} \\\\ & + \\left ( b\\cdot c\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{align*} \r\n", + " \\begin{align*} \\bm{(a\\W b)\\times (c\\W d)} = & - \\left ( b\\cdot d\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{c} \\\\ & + \\left ( b\\cdot c\\right ) \\boldsymbol{a}\\wedge \\boldsymbol{d} \\\\ & + \\left ( a\\cdot d\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{c} \\\\ & - \\left ( a\\cdot c\\right ) \\boldsymbol{b}\\wedge \\boldsymbol{d} \\end{align*}\r\n", "\\begin{equation*} E = \\boldsymbol{e}_{1}\\wedge \\boldsymbol{e}_{2}\\wedge \\boldsymbol{e}_{3} \\end{equation*}\r\n", "\\begin{equation*} E^{2} = \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 2 \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} + \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1 \\end{equation*}\r\n", - " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", - " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*} \r\n", + " \\begin{align*} E1 = (e2\\W e3) E = & \\left ( \\left ( e_{2}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E2 =-(e1\\W e3) E = & \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) - \\left ( e_{1}\\cdot e_{3}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{3}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", + " \\begin{align*} E3 = (e1\\W e2) E = & \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{2}\\cdot e_{3}\\right ) + \\left ( e_{1}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{1} \\\\ & + \\left ( - \\left ( e_{1}\\cdot e_{2}\\right ) \\left ( e_{1}\\cdot e_{3}\\right ) + \\left ( e_{2}\\cdot e_{3}\\right ) \\right ) \\boldsymbol{e}_{2} \\\\ & + \\left ( \\left ( e_{1}\\cdot e_{2}\\right ) ^{2} - 1\\right ) \\boldsymbol{e}_{3} \\end{align*}\r\n", "\\begin{equation*} E1\\cdot e2 = 0 \\end{equation*}\r\n", "\\begin{equation*} E1\\cdot e3 = 0 \\end{equation*}\r\n", "\\begin{equation*} E2\\cdot e1 = 0 \\end{equation*}\r\n", @@ -888,26 +884,25 @@ "\\begin{equation*} (E1\\cdot e1)/E^{2} = 1 \\end{equation*}\r\n", "\\begin{equation*} (E2\\cdot e2)/E^{2} = 1 \\end{equation*}\r\n", "\\begin{equation*} (E3\\cdot e3)/E^{2} = 1 \\end{equation*}\r\n", - " \\begin{align*} A = & A^{r} \\boldsymbol{e}_{r} \\\\ & + A^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} B = & B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } \\\\ & + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", - " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{r} f \\boldsymbol{e}_{r} \\\\ & + \\frac{\\partial_{\\theta } f }{r^{2}} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{\\partial_{\\phi } f }{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", + " \\begin{align*} A = & A^{r} \\boldsymbol{e}_{r} \\\\ & + A^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + A^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} B = & B^{r\\theta } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } \\\\ & + B^{r\\phi } \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } \\\\ & + B^{\\theta \\phi } \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", + " \\begin{align*} \\boldsymbol{\\nabla} f = & \\partial_{r} f \\boldsymbol{e}_{r} \\\\ & + \\frac{\\partial_{\\theta } f }{r^{2}} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{\\partial_{\\phi } f }{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\cdot A = \\frac{A^{\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\phi } A^{\\phi } + \\partial_{r} A^{r} + \\partial_{\\theta } A^{\\theta } + \\frac{2 A^{r} }{r} \\end{equation*}\r\n", - " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W A) = & \\frac{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}} \\left(\\frac{2 A^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } A^{\\phi } - \\frac{\\partial_{\\phi } A^{\\theta } }{{\\sin{\\left (\\theta \\right )}}^{2}}\\right)}{r^{2}} \\boldsymbol{e}_{r} \\\\ & + \\frac{- r^{2} {\\sin{\\left (\\theta \\right )}}^{2} \\partial_{r} A^{\\phi } - 2 r A^{\\phi } {\\sin{\\left (\\theta \\right )}}^{2} + \\partial_{\\phi } A^{r} }{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}}} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{r^{2} \\partial_{r} A^{\\theta } + 2 r A^{\\theta } - \\partial_{\\theta } A^{r} }{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}}} \\boldsymbol{e}_{\\phi } \\end{align*} \r\n", + " \\begin{align*} -I (\\boldsymbol{\\nabla} \\W A) = & \\frac{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}} \\left(\\frac{2 A^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } A^{\\phi } - \\frac{\\partial_{\\phi } A^{\\theta } }{{\\sin{\\left (\\theta \\right )}}^{2}}\\right)}{r^{2}} \\boldsymbol{e}_{r} \\\\ & + \\frac{- r^{2} {\\sin{\\left (\\theta \\right )}}^{2} \\partial_{r} A^{\\phi } - 2 r A^{\\phi } {\\sin{\\left (\\theta \\right )}}^{2} + \\partial_{\\phi } A^{r} }{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}}} \\boldsymbol{e}_{\\theta } \\\\ & + \\frac{r^{2} \\partial_{r} A^{\\theta } + 2 r A^{\\theta } - \\partial_{\\theta } A^{r} }{\\sqrt{r^{4} {\\sin{\\left (\\theta \\right )}}^{2}}} \\boldsymbol{e}_{\\phi } \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} \\W B = \\frac{r^{2} \\partial_{r} B^{\\theta \\phi } + 4 r B^{\\theta \\phi } - \\frac{2 B^{r\\phi } }{\\tan{\\left (\\theta \\right )}} - \\partial_{\\theta } B^{r\\phi } + \\frac{\\partial_{\\phi } B^{r\\theta } }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}\r\n", - " \\begin{align*} B = \\bm{B\\gamma_{t}} = & - B^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - B^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} E = \\bm{E\\gamma_{t}} = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} F = E+IB = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} J = & J^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + J^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + J^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + J^{z} \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", + " \\begin{align*} B = \\bm{B\\gamma_{t}} = & - B^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - B^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} E = \\bm{E\\gamma_{t}} = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} F = E+IB = & - E^{x} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & - E^{y} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & - E^{z} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{z} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + B^{y} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & - B^{x} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} J = & J^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + J^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + J^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + J^{z} \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\begin{equation*} \\boldsymbol{\\nabla} F = J \\end{equation*}\r\n", - " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} R = & \\cosh{\\left (\\frac{\\alpha }{2} \\right )} \\\\ & + \\sinh{\\left (\\frac{\\alpha }{2} \\right )} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = t'\\bm{\\gamma'_{t}}+x'\\bm{\\gamma'_{x}} = R\\lp t'\\bm{\\gamma_{t}}+x'\\bm{\\gamma_{x}}\\rp R^{\\dagger} \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t' - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t' - x' \\sinh{\\left (\\alpha \\right )}\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - t' \\sinh{\\left (\\alpha \\right )} + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", "\\begin{equation*} \\f{\\sinh}{\\alpha} = \\gamma\\beta \\end{equation*}\r\n", "\\begin{equation*} \\f{\\cosh}{\\alpha} = \\gamma \\end{equation*}\r\n", - " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( - \\beta \\gamma x' + 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t'\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - \\beta \\gamma t' + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*} \r\n", - " \\begin{align*} \\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - " \\begin{align*} \\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*} \r\n", - "\r\n", + " \\begin{align*} t\\bm{\\gamma_{t}}+x\\bm{\\gamma_{x}} = & \\left ( - \\beta \\gamma x' + 2 t' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + t'\\right ) \\boldsymbol{\\gamma }_{t} \\\\ & + \\left ( - \\beta \\gamma t' + 2 x' {\\sinh{\\left (\\frac{\\alpha }{2} \\right )}}^{2} + x'\\right ) \\boldsymbol{\\gamma }_{x} \\end{align*}\r\n", + " \\begin{align*} \\bm{A} = & A^{t} \\boldsymbol{\\gamma }_{t} \\\\ & + A^{x} \\boldsymbol{\\gamma }_{x} \\\\ & + A^{y} \\boldsymbol{\\gamma }_{y} \\\\ & + A^{z} \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", + " \\begin{align*} \\bm{\\psi} = & \\psi \\\\ & + \\psi ^{tx} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x} \\\\ & + \\psi ^{ty} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{tz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{xy} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y} \\\\ & + \\psi ^{xz} \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{yz} \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\\\ & + \\psi ^{txyz} \\boldsymbol{\\gamma }_{t}\\wedge \\boldsymbol{\\gamma }_{x}\\wedge \\boldsymbol{\\gamma }_{y}\\wedge \\boldsymbol{\\gamma }_{z} \\end{align*}\r\n", "\\end{document}\r\n" ] } @@ -946,7 +941,6 @@ "cell_type": "code", "execution_count": 15, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1068,7 +1062,13 @@ "b>grad = \\boldsymbol{e}_{x}*(b^{xy} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial y} + b^{xz} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial z}) + \\boldsymbol{e}_{y}*(- b^{xy} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial x} + b^{yz} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial z}) + \\boldsymbol{e}_{z}*(- b^{xz} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial x} - b^{yz} {\\left (x,y,z \\right )} \\frac{\\partial}{\\partial y})\n", "b*s = b__xy*s*e_x^e_y + b__xz*s*e_x^e_z + b__yz*s*e_y^e_z\n", "b^s = b__xy*s*e_x^e_y + b__xz*s*e_x^e_z + b__yz*s*e_y^e_z\n", - "bs = b__xy*s*e_x^e_y + b__xz*s*e_x^e_z + b__yz*s*e_y^e_z\n", "b*v = (b__xy*v__y + b__xz*v__z)*e_x + (-b__xy*v__x + b__yz*v__z)*e_y + (-b__xz*v__x - b__yz*v__y)*e_z + (b__xy*v__z - b__xz*v__y + b__yz*v__x)*e_x^e_y^e_z\n", "b^v = (b__xy*v__z - b__xz*v__y + b__yz*v__x)*e_x^e_y^e_z\n", @@ -1288,8 +1288,8 @@ "\\begin{document}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{ccc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{x}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) \\\\ \\left ( e_{x}\\cdot e_{z}\\right ) & \\left ( e_{y}\\cdot e_{z}\\right ) & \\left ( e_{z}\\cdot e_{z}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", "\\begin{equation*} A = A + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}\r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", - " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*} \r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} + A^{y} \\boldsymbol{e}_{y} + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", + " \\begin{align*} A = & A \\\\ & + A^{x} \\boldsymbol{e}_{x} \\\\ & + A^{y} \\boldsymbol{e}_{y} \\\\ & + A^{z} \\boldsymbol{e}_{z} \\\\ & + A^{xy} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} \\\\ & + A^{xz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{yz} \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\\\ & + A^{xyz} \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{align*}\r\n", "\\begin{equation*} X = X^{x} \\boldsymbol{e}_{x} + X^{y} \\boldsymbol{e}_{y} + X^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} Y = Y^{x} \\boldsymbol{e}_{x} + Y^{y} \\boldsymbol{e}_{y} + Y^{z} \\boldsymbol{e}_{z} \\end{equation*}\r\n", "\\begin{equation*} g_{ij} = \\left [ \\begin{array}{cc} \\left ( e_{x}\\cdot e_{x}\\right ) & \\left ( e_{x}\\cdot e_{y}\\right ) \\\\ \\left ( e_{x}\\cdot e_{y}\\right ) & \\left ( e_{y}\\cdot e_{y}\\right ) \\end{array}\\right ] \\end{equation*}\r\n", @@ -1431,7 +1431,6 @@ "cell_type": "code", "execution_count": 23, "metadata": { - "collapsed": false, "scrolled": false }, "outputs": [ @@ -1509,7 +1508,13 @@ "A = \u001b[0;31mA__r\u001b[0m*\u001b[0;34me_r\u001b[0m + \u001b[0;31mA__theta\u001b[0m*\u001b[0;34me_theta\u001b[0m + \u001b[0;31mA__phi\u001b[0m*\u001b[0;34me_phi\u001b[0m\n", "B = \u001b[0;31mB__rtheta\u001b[0m*\u001b[0;34me_r\u001b[0m^\u001b[0;34me_theta\u001b[0m + \u001b[0;31mB__rphi\u001b[0m*\u001b[0;34me_r\u001b[0m^\u001b[0;34me_phi\u001b[0m + \u001b[0;31mB__thetaphi\u001b[0m*\u001b[0;34me_theta\u001b[0m^\u001b[0;34me_phi\u001b[0m\n", "grad*f = \u001b[0;36mD{r}\u001b[0;31mf\u001b[0m\u001b[0m*\u001b[0;34me_r\u001b[0m + \u001b[0;36mD{theta}\u001b[0;31mf\u001b[0m\u001b[0m*\u001b[0;34me_theta\u001b[0m/r**2 + \u001b[0;36mD{phi}\u001b[0;31mf\u001b[0m\u001b[0m*\u001b[0;34me_phi\u001b[0m/(r**2*sin(theta)**2)\n", - "grad|A = \u001b[0;31mA__theta\u001b[0m/tan(theta) + \u001b[0;36mD{phi}\u001b[0;31mA__phi\u001b[0m\u001b[0m + \u001b[0;36mD{r}\u001b[0;31mA__r\u001b[0m\u001b[0m + \u001b[0;36mD{theta}\u001b[0;31mA__theta\u001b[0m\u001b[0m + 2*\u001b[0;31mA__r\u001b[0m/r\n", + "grad|A = \u001b[0;31mA__theta\u001b[0m/tan(theta) + \u001b[0;36mD{phi}\u001b[0;31mA__phi\u001b[0m\u001b[0m + \u001b[0;36mD{r}\u001b[0;31mA__r\u001b[0m\u001b[0m + \u001b[0;36mD{theta}\u001b[0;31mA__theta\u001b[0m\u001b[0m + 2*\u001b[0;31mA__r\u001b[0m/r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "-I*(grad^A) = sqrt(r**4*sin(theta)**2)*(2*\u001b[0;31mA__phi\u001b[0m/tan(theta) + \u001b[0;36mD{theta}\u001b[0;31mA__phi\u001b[0m\u001b[0m - \u001b[0;36mD{phi}\u001b[0;31mA__theta\u001b[0m\u001b[0m/sin(theta)**2)*\u001b[0;34me_r\u001b[0m/r**2 + (-r**2*sin(theta)**2*\u001b[0;36mD{r}\u001b[0;31mA__phi\u001b[0m\u001b[0m - 2*r*\u001b[0;31mA__phi\u001b[0m*sin(theta)**2 + \u001b[0;36mD{phi}\u001b[0;31mA__r\u001b[0m\u001b[0m)*\u001b[0;34me_theta\u001b[0m/sqrt(r**4*sin(theta)**2) + (r**2*\u001b[0;36mD{r}\u001b[0;31mA__theta\u001b[0m\u001b[0m + 2*r*\u001b[0;31mA__theta\u001b[0m - \u001b[0;36mD{theta}\u001b[0;31mA__r\u001b[0m\u001b[0m)*\u001b[0;34me_phi\u001b[0m/sqrt(r**4*sin(theta)**2)\n", "grad^B = (r**2*\u001b[0;36mD{r}\u001b[0;31mB__thetaphi\u001b[0m\u001b[0m + 4*r*\u001b[0;31mB__thetaphi\u001b[0m - 2*\u001b[0;31mB__rphi\u001b[0m/tan(theta) - \u001b[0;36mD{theta}\u001b[0;31mB__rphi\u001b[0m\u001b[0m + \u001b[0;36mD{phi}\u001b[0;31mB__rtheta\u001b[0m\u001b[0m/sin(theta)**2)*\u001b[0;34me_r\u001b[0m^\u001b[0;34me_theta\u001b[0m^\u001b[0;34me_phi\u001b[0m/r**2\n", "X = 1.2*\u001b[0;34me_x\u001b[0m + 2.34*\u001b[0;34me_y\u001b[0m + 0.555*\u001b[0;34me_z\u001b[0m\n", diff --git a/examples/ipython/Smith Sphere.ipynb b/examples/ipython/Smith Sphere.ipynb index 2ce10f29..db75751d 100755 --- a/examples/ipython/Smith Sphere.ipynb +++ b/examples/ipython/Smith Sphere.ipynb @@ -31,7 +31,80 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from galgebra import ga\n", "from galgebra.ga import Ga\n", @@ -385,7 +458,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/colored_christoffel_symbols.ipynb b/examples/ipython/colored_christoffel_symbols.ipynb index 7dd4e74c..87039fde 100644 --- a/examples/ipython/colored_christoffel_symbols.ipynb +++ b/examples/ipython/colored_christoffel_symbols.ipynb @@ -34,7 +34,80 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from __future__ import print_function\n", "import sys\n", @@ -642,7 +715,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/dop.ipynb b/examples/ipython/dop.ipynb index c5054f5e..6bcec980 100755 --- a/examples/ipython/dop.ipynb +++ b/examples/ipython/dop.ipynb @@ -4,7 +4,80 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from sympy import symbols, sin, cos, Abs\n", "from galgebra.ga import Ga\n", @@ -42,6 +115,28 @@ "cell_type": "code", "execution_count": 3, "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ g = \\left [ \\begin{array}{ccc} 1 & 0 & 0 \\\\ 0 & 1 & 0 \\\\ 0 & 0 & 1 \\end{array}\\right ] $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print('g =',o3d.g)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, "outputs": [ { "data": { @@ -52,7 +147,7 @@ "f " ] }, - "execution_count": 3, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -64,19 +159,43 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla^{2} = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}" + "$$ f = f $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print('f =',f)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}" ], "text/plain": [ "\\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}}" ] }, - "execution_count": 4, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -84,35 +203,34 @@ "source": [ "F = o3d.mv('F', 'vector', f=True)\n", "lap = o3d.grad*o3d.grad\n", - "lap.Fmt(1,r'\\nabla^{2}')" + "lap" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla^{2} = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} \\end{equation*}" + "$$ \\nabla^{2} = \\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}} $$" ], "text/plain": [ - "\\frac{\\partial^{2}}{\\partial x^{2}} + \\frac{\\partial^{2}}{\\partial y^{2}} + \\frac{\\partial^{2}}{\\partial z^{2}}" + "" ] }, - "execution_count": 5, "metadata": {}, - "output_type": "execute_result" + "output_type": "display_data" } ], "source": [ - "lap.Fmt(1,r'\\nabla^{2}')" + "print(r'\\nabla^{2} = ',lap)" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -124,7 +242,7 @@ "\\partial^{2}_{y} f + \\partial^{2}_{z} f " ] }, - "execution_count": 6, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -136,79 +254,202 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla \\cdot (\\nabla f) = \\partial^{2}_{x} f + \\partial^{2}_{y} f + \\partial^{2}_{z} f \\end{equation*}" + "$$ \\nabla^{2}f = \\partial^{2}_{y} f + \\partial^{2}_{z} f $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla^{2}f = ',lapf)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\partial^{2}_{x} f + \\partial^{2}_{y} f + \\partial^{2}_{z} f \\end{equation*}" ], "text/plain": [ "\\partial^{2}_{x} f + \\partial^{2}_{y} f + \\partial^{2}_{z} f " ] }, - "execution_count": 7, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lapf = o3d.grad | (o3d.grad * f)\n", - "lapf.Fmt(1,r'\\nabla \\cdot (\\nabla f)')" + "lapf" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\nabla \\cdot (\\nabla f) = \\partial^{2}_{x} f + \\partial^{2}_{y} f + \\partial^{2}_{z} f $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla \\cdot (\\nabla f) =',lapf)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} x = = \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\end{equation*}" + "\\begin{equation*} \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\end{equation*}" ], "text/plain": [ "\\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} " ] }, - "execution_count": 8, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "divF = o3d.grad|F\n", - "divF.Fmt(1,'x =')" + "divF" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\nabla\\cdot F = \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla\\cdot F =',divF)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla F = \\left ( \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\right ) + \\left ( - \\partial_{y} F^{x} + \\partial_{x} F^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} F^{x} + \\partial_{x} F^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} F^{y} + \\partial_{y} F^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}" + "\\begin{equation*} \\left ( \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\right ) + \\left ( - \\partial_{y} F^{x} + \\partial_{x} F^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} F^{x} + \\partial_{x} F^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} F^{y} + \\partial_{y} F^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} \\end{equation*}" ], "text/plain": [ "\\left ( \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\right ) + \\left ( - \\partial_{y} F^{x} + \\partial_{x} F^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} F^{x} + \\partial_{x} F^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} F^{y} + \\partial_{y} F^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z}" ] }, - "execution_count": 9, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gradF = o3d.grad * F\n", - "gradF.Fmt(1,r'\\nabla F')" + "gradF" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\nabla F = \\left ( \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\right ) + \\left ( - \\partial_{y} F^{x} + \\partial_{x} F^{y} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{y} + \\left ( - \\partial_{z} F^{x} + \\partial_{x} F^{z} \\right ) \\boldsymbol{e}_{x}\\wedge \\boldsymbol{e}_{z} + \\left ( - \\partial_{z} F^{y} + \\partial_{y} F^{z} \\right ) \\boldsymbol{e}_{y}\\wedge \\boldsymbol{e}_{z} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla F =',gradF)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [], + "source": [ + "sph_coords = (r, th, phi) = symbols('r theta phi', real=True)\n", + "(sp3d, er, eth, ephi) = Ga.build('e', g=[1, r**2, r**2 * sin(th)**2], coords=sph_coords, norm=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$\\left[\\begin{matrix}1 & 0 & 0\\\\0 & 1 & 0\\\\0 & 0 & 1\\end{matrix}\\right]$$" + ], + "text/plain": [ + " \\left [ \\begin{array}{ccc} 1 & 0 & 0 \\\\ 0 & 1 & 0 \\\\ 0 & 0 & 1 \\end{array}\\right ] " + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sp3d.g" + ] + }, + { + "cell_type": "code", + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -220,55 +461,90 @@ " \\left [ \\begin{array}{ccc} 1 & 0 & 0 \\\\ 0 & r^{2} & 0 \\\\ 0 & 0 & r^{2} {\\sin{\\left (\\theta \\right )}}^{2} \\end{array}\\right ] " ] }, - "execution_count": 10, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "sph_coords = (r, th, phi) = symbols('r theta phi', real=True)\n", - "(sp3d, er, eth, ephi) = Ga.build('e', g=[1, r**2, r**2 * sin(th)**2], coords=sph_coords, norm=True)\n", "sp3d.g_raw" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla = \\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi } \\end{equation*}" + "\\begin{equation*} \\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi } \\end{equation*}" ], "text/plain": [ "\\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi }" ] }, - "execution_count": 11, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "sp3d.grad.Fmt(1,r'\\nabla')" + "sp3d.grad" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla^{2} = \\frac{2}{r} \\frac{\\partial}{\\partial r} + \\frac{1}{r^{2} \\tan{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\theta } + \\frac{\\partial^{2}}{\\partial r^{2}} + r^{-2} \\frac{\\partial^{2}}{\\partial \\theta ^{2}} + \\frac{1}{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\frac{\\partial^{2}}{\\partial \\phi ^{2}} \\end{equation*}" + "$$ g = \\left [ \\begin{array}{ccc} 1 & 0 & 0 \\\\ 0 & r^{2} & 0 \\\\ 0 & 0 & r^{2} {\\sin{\\left (\\theta \\right )}}^{2} \\end{array}\\right ] $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/latex": [ + "$$ \\nabla = \\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi } $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print('g =',sp3d.g_raw)\n", + "print(r'\\nabla =', sp3d.grad)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\frac{2}{r} \\frac{\\partial}{\\partial r} + \\frac{1}{r^{2} \\tan{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\theta } + \\frac{\\partial^{2}}{\\partial r^{2}} + r^{-2} \\frac{\\partial^{2}}{\\partial \\theta ^{2}} + \\frac{1}{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\frac{\\partial^{2}}{\\partial \\phi ^{2}} \\end{equation*}" ], "text/plain": [ "\\frac{2}{r} \\frac{\\partial}{\\partial r} + \\frac{1}{r^{2} \\tan{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\theta } + \\frac{\\partial^{2}}{\\partial r^{2}} + r^{-2} \\frac{\\partial^{2}}{\\partial \\theta ^{2}} + \\frac{1}{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\frac{\\partial^{2}}{\\partial \\phi ^{2}}" ] }, - "execution_count": 12, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -277,134 +553,283 @@ "f = sp3d.mv('f', 'scalar', f=True)\n", "F = sp3d.mv('F', 'vector', f=True)\n", "B = sp3d.mv('B', 'bivector', f=True)\n", - "sp3d.grad.Fmt(1,r'\\nabla')\n", "lap = sp3d.grad*sp3d.grad\n", - "lap.Fmt(1,r'\\nabla^{2} ')" + "lap" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla^{2} f = \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} \\end{equation*}" + "\\begin{equation*} \\nabla = \\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi } \\end{equation*}" + ], + "text/plain": [ + "\\boldsymbol{e}_{r} \\frac{\\partial}{\\partial r} + \\boldsymbol{e}_{\\theta } \\frac{1}{r} \\frac{\\partial}{\\partial \\theta } + \\boldsymbol{e}_{\\phi } \\frac{1}{r \\sin{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\phi }" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "text/latex": [ + "$$ \\nabla^{2} = \\frac{2}{r} \\frac{\\partial}{\\partial r} + \\frac{1}{r^{2} \\tan{\\left (\\theta \\right )}} \\frac{\\partial}{\\partial \\theta } + \\frac{\\partial^{2}}{\\partial r^{2}} + r^{-2} \\frac{\\partial^{2}}{\\partial \\theta ^{2}} + \\frac{1}{r^{2} {\\sin{\\left (\\theta \\right )}}^{2}} \\frac{\\partial^{2}}{\\partial \\phi ^{2}} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "sp3d.grad.Fmt(1,r'\\nabla')\n", + "print(r'\\nabla^{2} =',lap)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} \\end{equation*}" ], "text/plain": [ "\\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}}" ] }, - "execution_count": 13, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Lapf = lap*f\n", - "Lapf.Fmt(1,r'\\nabla^{2} f')" + "Lapf" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla \\cdot (\\nabla f) = \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} \\end{equation*}" + "$$ \\nabla^{2} f = \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla^{2} f =', Lapf)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} \\end{equation*}" ], "text/plain": [ "\\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}}" ] }, - "execution_count": 14, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lapf = sp3d.grad | (sp3d.grad * f)\n", - "lapf.Fmt(1,r'\\nabla \\cdot (\\nabla f)')" + "lapf" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla F = \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\end{equation*}" + "$$ \\nabla \\cdot (\\nabla f) = \\frac{r^{2} \\partial^{2}_{r} f + 2 r \\partial_{r} f + \\partial^{2}_{\\theta } f + \\frac{\\partial_{\\theta } f }{\\tan{\\left (\\theta \\right )}} + \\frac{\\partial^{2}_{\\phi } f }{{\\sin{\\left (\\theta \\right )}}^{2}}}{r^{2}} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla \\cdot (\\nabla f) =', lapf)" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} \\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} \\end{equation*}" ], "text/plain": [ "\\partial_{x} F^{x} + \\partial_{y} F^{y} + \\partial_{z} F^{z} " ] }, - "execution_count": 15, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dviF = sp3d.grad | F\n", - "divF.Fmt(1,r'\\nabla F')" + "divF" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\nabla F = \\frac{r \\partial_{r} F^{r} + 2 F^{r} + \\frac{F^{\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } F^{\\theta } + \\frac{\\partial_{\\phi } F^{\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla F =', dviF)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla \\wedge F = \\frac{r \\partial_{r} F^{\\theta } + F^{\\theta } - \\partial_{\\theta } F^{r} }{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} F^{\\phi } + F^{\\phi } - \\frac{\\partial_{\\phi } F^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + \\frac{\\frac{F^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } F^{\\phi } - \\frac{\\partial_{\\phi } F^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}" + "\\begin{equation*} \\frac{r \\partial_{r} F^{\\theta } + F^{\\theta } - \\partial_{\\theta } F^{r} }{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} F^{\\phi } + F^{\\phi } - \\frac{\\partial_{\\phi } F^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + \\frac{\\frac{F^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } F^{\\phi } - \\frac{\\partial_{\\phi } F^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } \\end{equation*}" ], "text/plain": [ "\\frac{r \\partial_{r} F^{\\theta } + F^{\\theta } - \\partial_{\\theta } F^{r} }{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} F^{\\phi } + F^{\\phi } - \\frac{\\partial_{\\phi } F^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + \\frac{\\frac{F^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } F^{\\phi } - \\frac{\\partial_{\\phi } F^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi }" ] }, - "execution_count": 16, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "curlF = sp3d.grad ^ F\n", - "curlF.Fmt(1,r'\\nabla \\wedge F')" + "curlF" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/latex": [ - "\\begin{equation*} \\nabla \\cdot B = - \\frac{\\frac{B^{r\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } B^{r\\theta } + \\frac{\\partial_{\\phi } B^{r\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{r \\partial_{r} B^{r\\theta } + B^{r\\theta } - \\frac{\\partial_{\\phi } B^{\\theta \\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} B^{r\\phi } + B^{r\\phi } + \\partial_{\\theta } B^{\\theta \\phi } }{r} \\boldsymbol{e}_{\\phi } \\end{equation*}" + "$$ \\nabla \\wedge F = \\frac{r \\partial_{r} F^{\\theta } + F^{\\theta } - \\partial_{\\theta } F^{r} }{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} F^{\\phi } + F^{\\phi } - \\frac{\\partial_{\\phi } F^{r} }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r}\\wedge \\boldsymbol{e}_{\\phi } + \\frac{\\frac{F^{\\phi } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } F^{\\phi } - \\frac{\\partial_{\\phi } F^{\\theta } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta }\\wedge \\boldsymbol{e}_{\\phi } $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla \\wedge F =',curlF)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "\\begin{equation*} - \\frac{\\frac{B^{r\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } B^{r\\theta } + \\frac{\\partial_{\\phi } B^{r\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{r \\partial_{r} B^{r\\theta } + B^{r\\theta } - \\frac{\\partial_{\\phi } B^{\\theta \\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} B^{r\\phi } + B^{r\\phi } + \\partial_{\\theta } B^{\\theta \\phi } }{r} \\boldsymbol{e}_{\\phi } \\end{equation*}" ], "text/plain": [ "- \\frac{\\frac{B^{r\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } B^{r\\theta } + \\frac{\\partial_{\\phi } B^{r\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{r \\partial_{r} B^{r\\theta } + B^{r\\theta } - \\frac{\\partial_{\\phi } B^{\\theta \\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} B^{r\\phi } + B^{r\\phi } + \\partial_{\\theta } B^{\\theta \\phi } }{r} \\boldsymbol{e}_{\\phi }" ] }, - "execution_count": 17, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "divB = sp3d.grad | B\n", - "divB.Fmt(1,r'\\nabla \\cdot B')" + "divB" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\nabla \\cdot B = - \\frac{\\frac{B^{r\\theta } }{\\tan{\\left (\\theta \\right )}} + \\partial_{\\theta } B^{r\\theta } + \\frac{\\partial_{\\phi } B^{r\\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{r} + \\frac{r \\partial_{r} B^{r\\theta } + B^{r\\theta } - \\frac{\\partial_{\\phi } B^{\\theta \\phi } }{\\sin{\\left (\\theta \\right )}}}{r} \\boldsymbol{e}_{\\theta } + \\frac{r \\partial_{r} B^{r\\phi } + B^{r\\phi } + \\partial_{\\theta } B^{\\theta \\phi } }{r} \\boldsymbol{e}_{\\phi } $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\nabla \\cdot B =', divB)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, "metadata": {}, "outputs": [ { @@ -416,7 +841,7 @@ "F^{r} \\boldsymbol{e}_{r} + F^{\\theta } \\boldsymbol{e}_{\\theta } + F^{\\phi } \\boldsymbol{e}_{\\phi }" ] }, - "execution_count": 18, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -427,7 +852,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 34, "metadata": {}, "outputs": [ { @@ -439,18 +864,66 @@ " \\begin{align*} & F^{r} \\boldsymbol{e}_{r} \\\\ & + F^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + F^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} " ] }, - "execution_count": 19, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "F.Fmt(3,'F')" + "F.Fmt(3)" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ F = \\begin{align*} & F^{r} \\boldsymbol{e}_{r} \\\\ & + F^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + F^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} \n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print('F =',F)" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ F = \\begin{align*} & F^{r} \\boldsymbol{e}_{r} \\\\ & + F^{\\theta } \\boldsymbol{e}_{\\theta } \\\\ & + F^{\\phi } \\boldsymbol{e}_{\\phi } \\end{align*} \n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print('F =',F.Fmt(3))" + ] + }, + { + "cell_type": "code", + "execution_count": 37, "metadata": {}, "outputs": [ { @@ -464,7 +937,7 @@ "╲╱ F__φ (r, θ, φ) + F__r (r, θ, φ) + F__θ (r, θ, φ) " ] }, - "execution_count": 20, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -472,6 +945,35 @@ "source": [ "F.norm()" ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \\abs{F} = \\sqrt{{F^{\\phi } }^{2} + {F^{r} }^{2} + {F^{\\theta } }^{2}} $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "print(r'\\abs{F} = ',F.norm())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -490,7 +992,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/gr_metrics.ipynb b/examples/ipython/gr_metrics.ipynb index bf827fe9..a430cf29 100644 --- a/examples/ipython/gr_metrics.ipynb +++ b/examples/ipython/gr_metrics.ipynb @@ -4,7 +4,80 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from sympy import *\n", "from galgebra.printer import Format, latex, Fmt, GaLatexPrinter\n", @@ -728,7 +801,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/inner_product.ipynb b/examples/ipython/inner_product.ipynb index ca90b981..8ebad7e8 100644 --- a/examples/ipython/inner_product.ipynb +++ b/examples/ipython/inner_product.ipynb @@ -4,7 +4,80 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "from __future__ import print_function\n", "from sympy import Symbol, symbols, sin, cos, Rational, expand, simplify, collect, S\n", @@ -494,7 +567,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.4.5" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/second_derivative.ipynb b/examples/ipython/second_derivative.ipynb index 3dc40e33..df64738b 100644 --- a/examples/ipython/second_derivative.ipynb +++ b/examples/ipython/second_derivative.ipynb @@ -5,6 +5,78 @@ "execution_count": 1, "metadata": {}, "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, { "data": { "text/latex": [ @@ -145,7 +217,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/simple_ga_test.ipynb b/examples/ipython/simple_ga_test.ipynb index ffd1b323..9129e9ab 100755 --- a/examples/ipython/simple_ga_test.ipynb +++ b/examples/ipython/simple_ga_test.ipynb @@ -15,7 +15,80 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "Format()" ] diff --git a/examples/ipython/st4.ipynb b/examples/ipython/st4.ipynb index 45f5cf31..4c7bec06 100644 --- a/examples/ipython/st4.ipynb +++ b/examples/ipython/st4.ipynb @@ -11,7 +11,80 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "import sys\n", "from galgebra.printer import Format, xpdf, Fmt\n", @@ -280,7 +353,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.7.1" } }, "nbformat": 4, diff --git a/examples/ipython/verify_doc_python.ipynb b/examples/ipython/verify_doc_python.ipynb index 22a539a6..92bae729 100644 --- a/examples/ipython/verify_doc_python.ipynb +++ b/examples/ipython/verify_doc_python.ipynb @@ -39,7 +39,80 @@ "cell_type": "code", "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/latex": [ + "$$ \n", + "\\DeclareMathOperator{\\Tr}{Tr}\n", + "\\DeclareMathOperator{\\Adj}{Adj}\n", + "\\newcommand{\\bfrac}[2]{\\displaystyle\\frac{#1}{#2}}\n", + "\\newcommand{\\lp}{\\left (}\n", + "\\newcommand{\\rp}{\\right )}\n", + "\\newcommand{\\paren}[1]{\\lp {#1} \\rp}\n", + "\\newcommand{\\half}{\\frac{1}{2}}\n", + "\\newcommand{\\llt}{\\left <}\n", + "\\newcommand{\\rgt}{\\right >}\n", + "\\newcommand{\\abs}[1]{\\left |{#1}\\right | }\n", + "\\newcommand{\\pdiff}[2]{\\bfrac{\\partial {#1}}{\\partial {#2}}}\n", + "\\newcommand{\\npdiff}[3]{\\bfrac{\\partial^{#3} {#1}}{\\partial {#2}^{#3}}}\n", + "\\newcommand{\\lbrc}{\\left \\{}\n", + "\\newcommand{\\rbrc}{\\right \\}}\n", + "\\newcommand{\\W}{\\wedge}\n", + "\\newcommand{\\prm}[1]{{#1}'}\n", + "\\newcommand{\\ddt}[1]{\\bfrac{d{#1}}{dt}}\n", + "\\newcommand{\\R}{\\dagger}\n", + "\\newcommand{\\deriv}[3]{\\bfrac{d^{#3}#1}{d{#2}^{#3}}}\n", + "\\newcommand{\\grd}[1]{\\left < {#1} \\right >}\n", + "\\newcommand{\\f}[2]{{#1}\\lp {#2} \\rp}\n", + "\\newcommand{\\eval}[2]{\\left . {#1} \\right |_{#2}}\n", + "\\newcommand{\\bs}[1]{\\boldsymbol{#1}}\n", + "\\newcommand{\\es}[1]{\\boldsymbol{e}_{#1}}\n", + "\\newcommand{\\eS}[1]{\\boldsymbol{e}^{#1}}\n", + "\\newcommand{\\grade}[2]{\\left < {#1} \\right >_{#2}}\n", + "\\newcommand{\\lc}{\\rfloor}\n", + "\\newcommand{\\rc}{\\lfloor}\n", + "\\newcommand{\\T}[1]{\\text{#1}}\n", + "\\newcommand{\\lop}[1]{\\overleftarrow{#1}}\n", + "\\newcommand{\\rop}[1]{\\overrightarrow{#1}}\n", + "\\newcommand{\\ldot}{\\lfloor}\n", + "\\newcommand{\\rdot}{\\rfloor}\n", + "\n", + "%MacDonald LaTeX macros\n", + "\n", + "\\newcommand {\\thalf} {\\textstyle \\frac{1}{2}}\n", + "\\newcommand {\\tthird} {\\textstyle \\frac{1}{3}}\n", + "\\newcommand {\\tquarter} {\\textstyle \\frac{1}{4}}\n", + "\\newcommand {\\tsixth} {\\textstyle \\frac{1}{6}}\n", + "\n", + "\\newcommand {\\RE} {\\mathbb{R}}\n", + "\\newcommand {\\GA} {\\mathbb{G}}\n", + "\\newcommand {\\inner} {\\mathbin{\\pmb{\\cdot}}}\n", + "\\renewcommand {\\outer} {\\mathbin{\\wedge}}\n", + "\\newcommand {\\cross} {\\mathbin{\\times}}\n", + "\\newcommand {\\meet} {\\mathbin{{\\,\\vee\\;}}}\n", + "\\renewcommand {\\iff} {\\Leftrightarrow}\n", + "\\renewcommand {\\impliedby}{\\Leftarrow}\n", + "\\renewcommand {\\implies} {\\Rightarrow}\n", + "\\newcommand {\\perpc} {\\perp} % Orthogonal complement\n", + "\\newcommand {\\perpm} {*} % Dual of multivector\n", + "\\newcommand {\\del} {\\mathbf{\\nabla}} %{\\boldsymbol\\nabla\\!}\n", + "\\newcommand {\\mpart}[2]{\\left\\langle\\, #1 \\,\\right\\rangle_{#2}} % AMS has a \\part\n", + "\\newcommand {\\spart}[1]{\\mpart{#1}{0}}\n", + "\\newcommand {\\ds} {\\displaystyle}\n", + "\\newcommand {\\os} {\\overset}\n", + "\\newcommand {\\galgebra} {\\mbox{$\\mathcal{G\\!A}$\\hspace{.01in}lgebra}}\n", + "\\newcommand {\\latex} {\\LaTeX}\n", + " $$" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "Format()" ]