{ "cells" : [ { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Coordinate to~}r.\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property PartialDerivative to~}\\partial{\\#}.\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\text{Attached property Depends to~}A.\\end{dmath*}" } ], "source" : "r::Coordinate;\n\\partial{#}::PartialDerivative;\nA::Depends(r);" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}{\\left(\\partial_{r}{{\\left(\\sin{A}\\right)}^{2}}\\right)}^{2}+{\\left(\\partial_{r}{{A}^{2}}\\right)}^{2}+{\\left(\\partial_{r}{{r}^{2}}\\right)}^{2}\\end{dmath*}" } ], "source" : "ex:= \\partial_{r}{\\sin{A}**2}**2 +\\partial_{r}{A**2}**2 + \\partial_{r}{ r**2 }**2;" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}4{r}^{2}+\\frac{1}{2}\\left(-\\cos{4A}+1\\right) {\\left(\\partial_{r}{A}\\right)}^{2}+4{A}^{2} {\\left(\\partial_{r}{A}\\right)}^{2}\\end{dmath*}" } ], "source" : "map_sympy(ex,\"simplify\");" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}\\partial_{r}{{r}^{2}}\\end{dmath*}" } ], "source" : "ex2:= \\partial_{r}{r**2};" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}2r\\end{dmath*}" } ], "source" : "ex3=map_sympy(ex2, \"simplify\");" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}4 r^{2} + \\left(- \\frac{1}{2} \\cos{\\left (4 A{\\left (r \\right )} \\right )} + \\frac{1}{2}\\right) \\frac{d}{d r} A{\\left (r \\right )}^{2} + 4 A^{2}{\\left (r \\right )} \\frac{d}{d r} A{\\left (r \\right )}^{2}\\end{dmath*}" }, { "cell_origin" : "server", "cell_type" : "output", "source" : "\\begin{verbatim}\n\\end{verbatim}" } ], "source" : "s = ex._sympy_();\nprint(type(s))" }, { "cell_origin" : "client", "cell_type" : "input", "cells" : [ { "cell_origin" : "server", "cell_type" : "latex_view", "source" : "\\begin{dmath*}{}4{r}^{2}+\\frac{1}{2}\\left(-\\cos{4A}+1\\right) {\\left(\\partial_{r}{A}\\right)}^{2}+4{A}^{2} {\\left(\\partial_{r}{A}\\right)}^{2}\\end{dmath*}" } ], "source" : "ex;" }, { "cell_origin" : "client", "cell_type" : "input", "source" : "" } ], "description" : "Cadabra JSON notebook format", "version" : 1 }