(*^
::[ Information =
"This is a Mathematica Notebook file. It contains ASCII text, and can be
transferred by email, ftp, or other text-file transfer utility. It should
be read or edited using a copy of Mathematica or MathReader. If you
received this as email, use your mail application or copy/paste to save
everything from the line containing (*^ down to the line containing ^*)
into a plain text file. On some systems you may have to give the file a
name ending with ".ma" to allow Mathematica to recognize it as a Notebook.
The line below identifies what version of Mathematica created this file,
but it can be opened using any other version as well.";
FrontEndVersion = "X Window System Mathematica Notebook Front End Version 2.2";
X11StandardFontEncoding;
fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, fontName, "Times";
fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, fontName, "Times";
fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, fontName, "Times";
fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, fontName, "Times";
fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, fontName, "Times";
fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, fontName, "Times";
fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, fontName, "Times";
fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, fontName, "Courier";
fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, fontName, "Courier";
fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, fontName, "Courier";
fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, fontName, "Courier";
fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, fontName, "Courier";
fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, fontName, "Courier";
fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, fontName, "Geneva";
fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = leftheader, inactive, L2, 12, fontName, "Times";
fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, fontName, "Times";
fontset = leftfooter, inactive, L2, 12, fontName, "Times";
fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, fontName, "Times";
fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";
fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, fontName, "Times";paletteColors = 128; automaticGrouping; currentKernel;
]
:[font = title; inactive; preserveAspect; startGroup]
Functions Introduction and Examples
:[font = subsubtitle; inactive; preserveAspect]
Brett van de Sande
Match 18, 1992
:[font = text; inactive; preserveAspect]
Functions.m is a general purpose package centered around the function ipoly[f,x,a,b] which integrates f over an arbitrary polytope with finite volume. It includes routines for linear coordinate transforms, handling delta functions, moving the integration to the inside or outside of an expression and evaluating the integral for some or all of the coordinates. The polytope is described by the J inequalities a.x<=b where x is the n dimensional coordinate vector, a is a J by n matrix and b is a J-vector. The relevant commands are: ipoly, transform, translate, rotate, ipolyexpand, ipolyfactor, delta Big, showpoly, TestValue and convert. Help information is available for each command.
In the same manner, it defines the summation function sum[},which works like Sum[...]. It includes routines for handling Kronecker delta functions and moving the summation to the inside or outside of expressions and evaluating the summation for some or all of the coordinates. The relevant commands are: sum, sumexpand, sumfactor, delta, and convert.
The complex conjugate operator is extended to handle algebraic expressions and a normal ordering operator NormalOrder is defined. The relevant commands are: NormalOrder.
There are also rules for expanding expressions involving Dot and NonCommutativeMultiply. The trace of a matrix is defined. The relevant commands are: Dotexpand, timesexpand, trace, CnumberQ, ScalarQ.
:[font = text; inactive; preserveAspect]
I am a graduate student in the Ohio State University department of physics where I am specializing in Quantum Field theory. I wrote this package to help with some rather long algebraic calculations in Light Cone QCD. Although, this package provides a mathematical framework for defining the physical theory, none of the physics itself has been included.
I may be contacted by E-mail at vandesande@ohstpy.mps.ohio-state.edu.
:[font = input; preserveAspect]
<g[a+b];
:[font = text; inactive; preserveAspect]
When the rule is used, Mma tries to apply the rule to all occurances of Plus, taking a large amount of time for large expressions:
:[font = input; preserveAspect; startGroup]
tt=Sum[g[h[i]],{i,1,250}];
Timing[tt//.ruler;]
:[font = output; output; inactive; preserveAspect; endGroup]
{1.583333333333334*Second, Null}
;[o]
{1.58333 Second, Null}
:[font = text; inactive; preserveAspect]
Using the extension to ReplaceRepeated applies the rule only to expressions containing g as a subexpression, using much less time:
:[font = input; preserveAspect; startGroup]
Timing[tt//.Sequence[ruler,g];]
:[font = output; output; inactive; preserveAspect; endGroup]
{0.1166666666666662*Second, Null}
;[o]
{0.116667 Second, Null}
:[font = text; inactive; preserveAspect; endGroup]
An example where this is a real time saver is in the application of sumfactor or ipolyfactor to very large expressions.
:[font = section; inactive; Cclosed; preserveAspect; startGroup]
Extensions to inequalities and signs
:[font = text; inactive; preserveAspect]
Use TestValue do define a numerical value for various quantities.
:[font = input; preserveAspect]
f/:TestValue[f]=1;
g/:TestValue[g]=2;
h/:TestValue[h]=-3/2;
:[font = text; inactive; preserveAspect]
When an inequality or sign is evaluated, the TestValue of any symbols are used.
This includes <, >, <=, >=, Sign, Positive, Negative, NonNegative. This is defined
to work for any expression constructed from + (Plus), * (Times), and ^ (Power).
:[font = input; preserveAspect; startGroup]
f<=2-g
:[font = output; output; inactive; preserveAspect; endGroup]
False
;[o]
False
:[font = input; preserveAspect; startGroup]
f h