(*^ ::[ 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 = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; keywords = "Round, Floor, Ceiling, Sign, Abs, Max, Min, Re, Im, Conjugate, Arg, Random, SeedRandom, Mod, Quotient, GCD, LCM, IntegerDigits, FactorInteger, Divisors, Prime, PrimePi, PrimeQ, GaussianIntegers, PowerMod, EulerPhi, MoebiusMu, DivisorSigma, JacobiSymbol, ExtendedGCD, Factorial, Binomial, Multinomial, BernoulliB, EulerE, StirlingS1, StirlingS2, Partitions, PartitionsQ, Signature, ClebschGordan, ThreeJSymbol, SixJSymbol, Exp, Log, Sin, Cos, Tan, Csc, Sec, Cot, ArcSin, ArcCos, ArcTan, ArcCsc, ArcSec, ArcCot, Sinh, Cosh, Tanh, Csch, Sech, Coth, ArcSinh, ArcCosh, ArcTanh, ArcCsch, ArcSech, ArcCoth, Pi, E, Degree, I, Infinity, GoldenRatio, EulerGamma, Catalan, LegendreP, SphericalHarmonicY, GegenbauerC, ChebyshevT, ChebyshevU, HermiteH, LaguerreL, JacobiP, AiryAi, AiryBi, AiryAiPrime, AiryBiPrime, BesselJ, BesselK, BesselI, BesselY, Beta, CosIntegral, Erf, Erfc, ExpIntegralE, ExpIntegralEi, Gamma, Hypergeometric0F1, Hypergeometric1F1, HypergeometricU, Hypergeometric2F1, LerchPhi, LogIntegral, Pochhammer, PolyGamma, PolyLog, ReimannSiegelTheta, ReimannSiegelZ, SinIntegral, Zeta, EllipticK, EllipticF, EllipticE, JacobiZeta, EllipticPi, JacobiAmplitude, JacobiSN, InverseJacobiSN, EllipticTheta, EllipticLog, EllipticExp, ArithmeticGeometricMean, Numbers`complex, Factorial`double"; fontset = title, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, M7, bold, e8, 24, "Helvetica"; fontset = subtitle, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, M7, bold, italic, e6, 24, "Helvetica"; fontset = subsubtitle, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeTitle, M7, italic, e50, 24, "Helvetica"; fontset = section, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, blackBox, M22, bold, a20, 18, "Helvetica"; fontset = subsection, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, grayBox, M19, bold, a15, 14, "Helvetica"; fontset = subsubsection, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakBelow, nohscroll, noKeepOnOnePage, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Helvetica"; fontset = text, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M17, 14, "Times"; fontset = smalltext, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M61, 14, "Times"; fontset = input, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, N23, bold, B65535, 12, "Courier"; fontset = output, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, N23, R17381, G28866, B53247, L-5, 12, "Courier"; fontset = message, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, 12, "Courier"; fontset = print, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, 12, "Courier"; fontset = info, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, evaluateAsCurrentKernel, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l37, w282, h287, 12, "Courier"; fontset = name, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; fontset = header, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, right, M7, 12, "Palatino"; fontset = leftheader, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, nohscroll, L2, 12, "Palatino"; fontset = footer, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, center, M7, 12, "Palatino"; fontset = leftfooter, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, center, L2, 12, "Palatino"; fontset = help, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Geneva"; fontset = clipboard, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "New York"; fontset = completions, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Courier"; fontset = special1, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, grayDot, M19, N7, bold, 12, "Helvetica"; fontset = special2, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, bold, 12, "Courier"; fontset = special3, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M18, bold, 12, "Helvetica"; fontset = special4, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Palatino"; fontset = special5, Text, formatAsCurrentKernel, evaluateAsCurrentKernel, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Palatino"; paletteColors = 128; automaticGrouping; ] :[font = title; inactive; preserveAspect; startGroup] Built-in Mathematical Functions :[font = section; inactive; Cclosed; preserveAspect; startGroup] Index :[font = text; inactive; dontPreserveAspect] This index gives a list of keywords that are associated with various cells in this Notebook. If you Command-Double-click one of the keywords below, Mathematica will find the cell associated with that keyword, select it, and display it in the center of your window. ;[s] 3:0,0;149,1;160,0;268,-1; 2:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] Abs AiryAi AiryAiPrime AiryBi AiryBiPrime ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinh ArcTan ArcTanh Arg ArithmeticGeometricMean BernoulliB BesselI BesselJ BesselK BesselY Beta Binomial Catalan Ceiling ChebyshevT ChebyshevU ClebschGordan Conjugate Cos Cosh CosIntegral Cot Coth Csc Csch Degree Divisors DivisorSigma E EllipticE EllipticExp EllipticF EllipticK EllipticLog EllipticPi EllipticTheta Erf Erfc EulerE EulerGamma EulerPhi Exp ExpIntegralE ExpIntegralEi ExtendedGCD Factorial Factorial`double FactorInteger Floor Gamma GaussianIntegers GCD GegenbauerC GoldenRatio HermiteH Hypergeometric0F1 Hypergeometric1F1 Hypergeometric2F1 HypergeometricU I Im Infinity IntegerDigits InverseJacobiSN JacobiAmplitude JacobiP JacobiSN JacobiSymbol JacobiZeta LaguerreL LCM LegendreP LerchPhi Log LogIntegral Max Min Mod MoebiusMu Multinomial Numbers`complex Partitions PartitionsQ Pi Pochhammer PolyGamma PolyLog PowerMod Prime PrimePi PrimeQ Quotient Random Re ReimannSiegelTheta ReimannSiegelZ Round Sec Sech SeedRandom Sign Signature Sin Sinh SinIntegral SixJSymbol SphericalHarmonicY StirlingS1 StirlingS2 Tan Tanh ThreeJSymbol Zeta :[font = section; inactive; Cclosed; preserveAspect; startGroup] Naming Conventions :[font = input; preserveAspect] :[font = text; inactive; preserveAspect] Mathematical functions in Mathematica are given names according to definite rules. As with most Mathematica functions, the names are usually complete English words, fully spelled out. For a few very common functions, Mathematica uses the traditional abbreviations. Thus the modulo function, for example, is Mod, not Modulo. ;[s] 9:0,0;26,1;37,0;98,1;109,0;221,1;232,0;313,2;316,0;330,-1; 3:5,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect] Mathematical functions that are usually referred to by a person's name have names in Mathematica of the form PersonSymbol . Thus, for example, the Legendre polynomials are denoted LegendreP[n, x ]. Although this convention does lead to longer function names, it avoids any ambiguity or confusion. ;[s] 11:0,0;85,1;96,0;110,1;126,0;182,2;192,1;193,2;194,1;197,2;198,0;300,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup] When the standard notation for a mathematical function involves both subscripts and superscripts, the subscripts are given before the superscripts in the Mathematica form. Thus, for example, the associated Legendre polynomials are denoted LegendreP[n, m, x ]. ;[s] 14:0,0;123,1;129,2;130,0;154,1;165,0;241,3;251,1;252,3;253,1;255,3;256,1;259,3;260,0;263,-1; 4:4,16,12,Times,0,14,0,0,0;5,16,12,Times,2,14,0,0,0;1,16,12,Times,1,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = section; inactive; Cclosed; preserveAspect; startGroup] Numerical Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 550) :[font = input; preserveAspect; keywords = "Round"] Round ;[s] 1:0,1;7,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Round[x ] gives the integer closest to x . ;[s] 5:0,2;6,1;8,2;9,0;39,1;43,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Floor"] Floor ;[s] 1:0,1;6,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Floor[x ] gives the greatest integer not larger than x. . ;[s] 6:0,2;6,1;8,2;9,0;53,1;54,0;58,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = special2; inactive; preserveAspect; keywords = "Ceiling"] Ceiling :[font = smalltext; inactive; preserveAspect] Ceiling[x ] gives the least integer not smaller than x.. ;[s] 6:0,2;8,1;10,2;11,0;53,1;54,0;57,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Sign"] Sign ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Sign[x ] gives 1 for x > 0, -1 for x < 0 and 0 for x = 0. ;[s] 10:0,2;5,1;7,2;8,0;21,1;22,0;35,1;36,0;51,1;53,0;58,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Abs"] Abs ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Abs[x ] gives the absolute value |x | of x.. ;[s] 8:0,2;4,1;6,2;7,0;34,1;36,0;41,1;42,0;45,-1; 3:3,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Max"] Max ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Max[x1 , x2 , ... ] or Max[{x1 , x2 , ... }, ... ] gives the maximum of x1 , x2 , ... ;[s] 23:0,2;4,1;7,2;8,1;12,2;13,1;17,0;18,2;19,0;23,2;28,1;31,2;32,1;36,2;37,0;42,2;44,0;49,2;50,0;72,1;75,0;76,1;80,0;86,-1; 3:7,16,12,Times,0,14,0,0,0;7,16,12,Times,2,14,0,0,0;9,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Min"] Min ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Min[x1 , x2 , ... ] or Min[{x1 , x2 ... }, ... ] gives the minimum of x1 , x2 , ... ;[s] 22:0,2;4,1;7,2;8,1;12,2;13,1;17,0;18,2;19,0;22,2;28,1;31,2;32,1;35,0;40,2;41,0;47,2;48,0;71,1;74,0;75,1;79,0;85,-1; 3:7,16,12,Times,0,14,0,0,0;7,16,12,Times,2,14,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = special2; inactive; preserveAspect; keywords = "Numbers`complex"] Complex Numbers ;[s] 1:0,1;16,-1; 2:0,13,10,Courier,1,12,0,0,0;1,14,10,Helvetica,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] x + I y gives the complex number x +iy . ;[s] 9:0,1;3,0;5,2;6,0;7,1;8,0;35,1;37,0;39,1;44,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = special2; inactive; preserveAspect; keywords = "Re"] Re :[font = smalltext; inactive; preserveAspect] Re[z ] gives the real part. ;[s] 4:0,2;3,1;5,2;6,0;28,-1; 3:1,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Im"] Im ;[s] 1:0,1;3,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Im[z ] gives the imaginary part. ;[s] 5:0,2;3,1;4,0;5,2;6,0;33,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Conjugate"] Conjugate ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Conjugate[z ] gives the complex conjugate. ;[s] 5:0,2;10,1;11,0;12,2;13,0;43,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Abs"] Abs ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Abs[z ] gives the absolute value |z |. ;[s] 6:0,2;4,1;6,2;7,0;34,1;35,0;39,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Arg"] Arg ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] Arg[z ] gives the argument phi such that z = Abs[z ] Exp[phi ]. ;[s] 19:0,2;4,1;5,0;6,2;7,0;27,1;30,0;43,1;45,0;47,2;51,1;52,0;53,2;54,0;55,2;59,1;62,0;63,2;64,0;67,-1; 3:8,16,12,Times,0,14,0,0,0;5,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Round, Floor and Ceiling ;[s] 6:0,1;5,0;7,1;12,0;17,1;24,0;25,-1; 2:3,14,10,Helvetica,1,12,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Round[2.5] :[font = output; output; inactive; preserveAspect; endGroup] 2 ;[o] 2 :[font = input; Cclosed; preserveAspect; startGroup] Floor[2.5] :[font = output; output; inactive; preserveAspect; endGroup] 2 ;[o] 2 :[font = input; Cclosed; preserveAspect; startGroup] Ceiling[2.5] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 3 ;[o] 3 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Real and Imaginary Parts :[font = input; Cclosed; preserveAspect; startGroup] Re[ 3.2 + 2.3 I] :[font = output; output; inactive; preserveAspect; endGroup] 3.2 ;[o] 3.2 :[font = input; Cclosed; preserveAspect; startGroup] Im[ 3.2 + 2.3 I] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 2.3 ;[o] 2.3 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Conjugate ;[s] 2:0,1;9,0;10,-1; 2:1,14,10,Helvetica,1,12,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Conjugate[ 3.2 + 2.3 I] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 3.2 - 2.3*I ;[o] 3.2 - 2.3 I :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Argument and Absolute Value :[font = input; Cclosed; preserveAspect; startGroup] Abs[ 3.2 + 2.3 I] :[font = output; output; inactive; preserveAspect; endGroup] 3.940812099047606 ;[o] 3.94081 :[font = input; Cclosed; preserveAspect; startGroup] Arg[ 3.2 + 2.3 I] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] 0.6231993299340659 ;[o] 0.623199 :[font = section; inactive; Cclosed; preserveAspect; startGroup] Pseudorandom Numbers :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 552) :[font = special2; inactive; preserveAspect; keywords = "Random"] Random :[font = smalltext; inactive; preserveAspect] Random[ ] gives a pseudorandom real between 0 and 1. ;[s] 4:0,1;7,0;8,1;9,0;53,-1; 2:2,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Real, xmax ] gives a pseudorandom real between 0 and xmax.. ;[s] 6:0,2;12,1;18,2;19,0;60,1;64,0;67,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Real, {xmin , xmax }] gives a pseudorandom real between xmin and xmax.. ;[s] 13:0,2;12,0;13,2;14,1;19,2;20,1;25,0;26,2;28,0;62,1;68,0;72,1;77,0;80,-1; 3:5,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Complex] gives a pseudorandom complex number in the unit square. ;[s] 2:0,1;15,0;72,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Complex, {zmin , zmax }] gives a pseudorandom complex number in the rectangle defined by zmin and zmax.. ;[s] 12:0,2;15,0;16,2;17,1;22,2;23,1;29,2;31,0;96,1;102,0;105,1;110,0;113,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[type , range , n ] gives a pseudorandom number with n-digit precision. ;[s] 11:0,2;7,1;12,2;13,1;20,2;21,1;23,0;24,2;25,0;59,1;60,0;78,-1; 3:3,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Integer] gives a 0 or 1 with probability 1/2. ;[s] 2:0,1;15,0;53,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Random[Integer, {imin , imax }] gives a pseudorandom integer between imin and imax , inclusive. ;[s] 13:0,2;15,0;16,2;17,1;22,2;23,1;28,0;29,2;31,0;69,1;75,0;79,1;84,0;97,-1; 3:5,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "SeedRandom"] SeedRandom ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] SeedRandom[ ] reseeds the pseudorandom generator with the time of day. ;[s] 2:0,1;14,0;71,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] SeedRandom[s ] reseeds with the integer s . ;[s] 7:0,2;11,1;12,0;13,2;14,0;40,1;42,0;45,-1; 3:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] List of Pseudorandom Numbers :[font = input; Cclosed; preserveAspect; startGroup] Table[Random[ ], {3}] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] {0.3831999277222062, 0.3225095686782999, 0.6061831349751908} ;[o] {0.3832, 0.32251, 0.606183} :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Pseudorandom Number in a Restricted Range :[font = input; Cclosed; preserveAspect; startGroup] Random[Real, {-1, 1}] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.02119691406075597 ;[o] 0.0211969 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Arbitrary-Precision Pseudorandom Number :[font = input; Cclosed; preserveAspect; startGroup] Random[Real, {0, 1}, 30] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.709121814975330165532797552258 ;[o] 0.709121814975330165532797552258 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Note on Pseudorandom Numbers :[font = text; inactive; preserveAspect] Random is unlike almost every other Mathematica function in that every time you call it, you potentially get a different result. If you use Random in a calculation, therefore, you may get different answers on different occasions. The pseudorandom numbers that Mathematica generates are always uniformly distributed over the range you specify. (For information on how to generate pseudorandom numbers with specified distributions, see page 588.) ;[s] 8:0,2;6,0;36,1;47,0;141,2;147,0;261,1;272,0;448,-1; 3:4,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup] The sequences you get from Random[ ] are not in most senses "truly random", although they should be "random enough" for practical purposes. The sequences are in fact produced by applying a definite mathematical algorithm, starting from a particular "seed". If you give the same seed, then you get the same sequence. This is illustrated in the next example. ;[s] 3:0,0;27,1;36,0;357,-1; 2:2,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Reseeding the Pseudorandom Number Generator :[font = text; inactive; preserveAspect] Note that the same seed produces the same sequence. :[font = input; preserveAspect] SeedRandom[ 122 ] :[font = input; Cclosed; preserveAspect; startGroup] Table[Random[ ], {3}] :[font = output; output; inactive; preserveAspect; endGroup] {0.904004162202961, 0.6107074142914099, 0.538897763559457} ;[o] {0.904004, 0.610707, 0.538898} :[font = input; preserveAspect] SeedRandom[ 100 ] :[font = input; Cclosed; preserveAspect; startGroup] Table[Random[ ], {3}] :[font = output; output; inactive; preserveAspect; endGroup] {0.1858983977062325, 0.2428482725405003, 0.2033103666330259} ;[o] {0.185898, 0.242848, 0.20331} :[font = input; preserveAspect] SeedRandom[ 122 ] :[font = input; Cclosed; preserveAspect; startGroup] Table[Random[ ], {3}] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] {0.904004162202961, 0.6107074142914099, 0.538897763559457} ;[o] {0.904004, 0.610707, 0.538898} :[font = section; inactive; Cclosed; preserveAspect; startGroup] Integer and Number-Theoretical Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 553) :[font = input; preserveAspect; keywords = "Mod"] Mod ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Mod[k , n ] gives k modulo n (remainder from dividing k by n). ;[s] 15:0,2;4,1;6,2;7,1;9,0;10,3;11,0;17,1;20,0;28,1;29,0;56,1;57,0;62,1;63,0;66,-1; 4:6,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "Quotient"] Quotient ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Quotient[m , n ] gives the quotient of m and n (integer part of m ^ n ). ;[s] 15:0,2;9,1;11,2;12,1;14,0;15,3;16,0;38,1;41,0;46,1;49,0;66,1;69,0;70,1;72,0;76,-1; 4:6,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "GCD"] GCD ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] GCD[n1 , n2 , ... ] gives the greatest common divisor of n1, n2, ... ;[s] 12:0,2;4,1;7,2;8,1;12,2;13,0;18,3;19,0;57,1;59,0;61,1;63,0;70,-1; 4:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "LCM"] LCM ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LCM[n1 , n2 , ... ] gives the least common multiple of n1, n2, ... ;[s] 12:0,2;4,1;7,2;8,1;12,2;13,0;18,3;19,0;55,1;57,0;58,1;61,0;68,-1; 4:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "IntegerDigits"] IntegerDigits ;[s] 1:0,1;15,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] IntegerDigits[n , b ] gives the digits of n in base b . ;[s] 11:0,2;14,1;16,2;17,1;19,0;20,3;21,0;42,1;44,0;53,1;55,0;57,-1; 4:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "FactorInteger"] FactorInteger ;[s] 1:0,1;15,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] FactorInteger[n ] gives a list of the prime factors of n , and their exponents. ;[s] 7:0,2;14,1;15,0;16,3;17,0;55,1;57,0;80,-1; 4:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "Divisors"] Divisors ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Divisors[n ] gives a list of the integers that divide n . ;[s] 7:0,2;9,1;10,0;11,3;12,0;54,1;57,0;59,-1; 4:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "Prime"] Prime ;[s] 1:0,1;7,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Prime[k ] gives the k th prime number. ;[s] 8:0,2;6,1;8,3;9,0;20,1;22,0;25,1;26,0;40,-1; 4:3,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "PrimePi"] PrimePi ;[s] 1:0,1;9,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PrimePi[x ] gives the number of primes less than x . ;[s] 4:0,2;8,1;9,0;49,1;53,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "PrimeQ"] PrimeQ ;[s] 1:0,1;8,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Prime[n ] gives True if n is a prime, and False otherwise. ;[s] 11:0,2;6,1;7,0;8,3;9,0;16,2;20,0;24,1;25,0;43,2;48,0;60,-1; 4:5,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = special3; inactive; preserveAspect] Factors of Gaussian Integers :[font = smalltext; inactive; preserveAspect; keywords = "FactorInteger, GaussianIntegers"] FactorInteger[n , GaussianIntegers->True] gives a list of the Gaussian prime factors of the Gaussian integer n , and their exponents. ;[s] 9:0,2;14,1;16,2;17,0;18,2;40,3;41,0;109,1;111,0;134,-1; 4:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "PowerMod"] PowerMod ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PowerMod[a , b , n ] gives the power a^ b to modulo n.. ;[s] 13:0,2;9,1;11,2;12,1;15,2;16,1;18,0;19,3;20,0;37,1;43,0;53,1;54,0;57,-1; 4:4,16,12,Times,0,14,0,0,0;5,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "EulerPhi"] EulerPhi ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EulerPhi[n ] gives the Euler totient function. ;[s] 5:0,2;9,1;10,0;11,3;12,0;47,-1; 4:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "MoebiusMu"] MoebiusMu ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] MoebiusMu[n ] gives the Mobius function. ;[s] 5:0,2;10,1;11,0;12,3;13,0;41,-1; 4:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "DivisorSigma"] DivisorSigma ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] DivisorSigma[k , n ] gives the divisor function. ;[s] 6:0,2;13,1;15,2;16,1;19,3;20,0;49,-1; 4:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "JacobiSymbol"] JacobiSymbol ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] JacobiSymbol[n , m ] gives the Jacobi symbol. ;[s] 7:0,2;13,1;15,2;16,1;18,0;19,3;20,0;46,-1; 4:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = input; preserveAspect; keywords = "ExtendedGCD"] ExtendedGCD ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] ExtendedGCD[m , n ] gives the extended greatest common divisor of m and n.. ;[s] 11:0,2;12,1;14,2;15,1;17,0;18,3;19,0;66,1;67,0;72,1;74,0;78,-1; 4:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0;1,12,9,Courier,1,10,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Using Mod and Quotient ;[s] 4:0,0;6,1;9,0;15,1;24,-1; 2:2,14,10,Helvetica,1,12,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Mod[17, 3] :[font = output; output; inactive; preserveAspect; endGroup] 2 ;[o] 2 :[font = input; Cclosed; preserveAspect; startGroup] Quotient[17, 3] :[font = output; output; inactive; preserveAspect; endGroup] 5 ;[o] 5 :[font = input; Cclosed; preserveAspect; startGroup] 3 % + %% :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 17 ;[o] 17 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Mod and Quotient with Real Numbers ;[s] 5:0,0;1,1;4,0;10,1;18,0;37,-1; 2:3,14,10,Helvetica,1,12,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Mod[5.6, 1.2] :[font = output; output; inactive; preserveAspect; endGroup] 0.7999999999999999 ;[o] 0.8 :[font = input; Cclosed; preserveAspect; startGroup] Quotient[5.6, 1.2] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 4 ;[o] 4 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Greatest Common Divisor :[font = input; Cclosed; preserveAspect; startGroup] GCD[24, 15] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 3 ;[o] 3 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Least Common Multiple :[font = input; Cclosed; preserveAspect; startGroup] LCM[24, 15, 9] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 360 ;[o] 360 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Factoring Integers :[font = input; Cclosed; preserveAspect; startGroup] FactorInteger[24] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] {{2, 3}, {3, 1}} ;[o] {{2, 3}, {3, 1}} :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] A Note on Integer Factoring :[font = text; inactive; preserveAspect] According to current mathematical thinking, integer factoring is a fundamentally difficult computational problem. As a result, you can easily type in an integer that Mathematica will not be able to factor in anything short of an astronomical length of time. As long as the integers you give are less than about 20 digits long, FactorInteger should have no trouble. ;[s] 5:0,0;166,1;177,0;328,2;341,0;366,-1; 3:3,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect; endGroup] Although Mathematica may not be able to factor a large integer, it can often still test whether or not the integer is prime. In addition, Mathematica has a fast way of finding the k th prime number. ;[s] 7:0,0;9,1;21,0;139,1;150,0;182,1;183,0;201,-1; 2:4,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Testing Whether an Integer Is Prime :[font = input; Cclosed; preserveAspect; startGroup] PrimeQ[234242423] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] False ;[o] False :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Millionth Prime :[font = input; Cclosed; preserveAspect; startGroup] Prime[ 10^6 ] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 15485863 ;[o] 15485863 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Number of Primes Less than a Billion :[font = input; Cclosed; preserveAspect; startGroup] PrimePi[10^9] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 50847534 ;[o] 50847534 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Factoring in Terms of Gaussian Integers :[font = input; Cclosed; preserveAspect; startGroup] FactorInteger[ 111 + 78 I, GaussianIntegers -> True] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] {{2 + I, 1}, {3, 1}, {20 + 3*I, 1}} ;[o] {{2 + I, 1}, {3, 1}, {20 + 3 I, 1}} :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Using PowerMod ;[s] 3:0,0;6,1;14,0;15,-1; 2:2,14,10,Helvetica,1,12,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = text; inactive; preserveAspect] This gives 2^13421 modulo 3. Note that PowerMod is equivalent to taking a power and then using Mod, but it is much more efficient. ;[s] 5:0,0;40,1;48,0;96,1;99,0;132,-1; 2:3,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] PowerMod[2, 13421, 3] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 2 ;[o] 2 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Modular Inverse :[font = text; inactive; preserveAspect] This gives the modular inverse of 3 modulo 7. :[font = input; Cclosed; preserveAspect; startGroup] PowerMod[3, -1, 7] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 5 ;[o] 5 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Euler Phi Function :[font = text; inactive; preserveAspect] This gives the number of integers less than 60 that are relatively prime to 60. :[font = input; Cclosed; preserveAspect; startGroup] EulerPhi[60] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 16 ;[o] 16 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Divisors :[font = text; inactive; preserveAspect] This gives a list of the divisors of 24 and then the number of such divisors. :[font = input; Cclosed; preserveAspect; startGroup] Divisors[24] :[font = output; output; inactive; preserveAspect; endGroup] {1, 2, 3, 4, 6, 8, 12, 24} ;[o] {1, 2, 3, 4, 6, 8, 12, 24} :[font = input; Cclosed; preserveAspect; startGroup] DivisorSigma[0, 24] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 8 ;[o] 8 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Extended Greatest Common Divisor :[font = text; inactive; preserveAspect] The second line shows the property that the extended greatest common divisor satisfies. :[font = input; Cclosed; preserveAspect; startGroup] {g, {r, s}} = ExtendedGCD[105, 196] :[font = output; output; inactive; preserveAspect; endGroup] {7, {-13, 7}} ;[o] {7, {-13, 7}} :[font = input; Cclosed; preserveAspect; startGroup] r 105 + s 196 == g :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] True ;[o] True :[font = section; inactive; Cclosed; preserveAspect; startGroup] Combinatorial Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 558) :[font = special2; inactive; preserveAspect; keywords = "Factorial"] Factorial ;[s] 2:0,1;9,0;10,-1; 2:1,13,10,Courier,1,12,0,0,0;1,13,10,Courier,0,12,0,0,0; :[font = smalltext; inactive; preserveAspect] n ! is the factorial n (n - 1)(n - 2) x ... x 1. ;[s] 14:0,1;1,0;2,2;3,0;21,1;22,0;24,1;26,0;31,1;33,0;38,1;39,0;44,1;45,0;49,-1; 3:7,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = special2; inactive; preserveAspect; keywords = "Factorial`double"] Double Factorial ;[s] 2:0,1;16,0;17,-1; 2:1,13,10,Courier,1,12,0,0,0;1,13,10,Courier,0,12,0,0,0; :[font = smalltext; inactive; preserveAspect] n !! is the double factorial n (n - 2)(n - 4) x ... ;[s] 12:0,1;1,0;2,2;4,0;29,1;30,0;32,1;34,0;39,1;40,0;46,1;47,0;52,-1; 3:6,16,12,Times,0,14,0,0,0;5,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Binomial"] Binomial ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Binomial[n , m ] is a binomial coefficient . ;[s] 7:0,2;9,1;11,2;12,1;14,0;15,2;16,0;45,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Multinomial"] Multinomial ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Multinomial[n1 , n2 , ... ] gives multinomial coefficient . ;[s] 9:0,2;12,1;15,2;16,1;20,2;21,1;22,0;26,2;27,0;60,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "BernoulliB"] BernoulliB ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] BernoulliB[n ] gives the n th Bernoulli number. ;[s] 7:0,2;11,1;12,0;13,2;14,0;24,1;27,0;48,-1; 3:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] BernoulliB[n , x ] gives the n th Bernoulli polynomial. ;[s] 9:0,2;11,1;13,2;14,1;16,0;17,2;18,0;28,1;31,0;56,-1; 3:3,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EulerE"] EulerE ;[s] 1:0,1;8,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EulerE[n ] gives the n th Euler number. ;[s] 6:0,2;7,1;9,2;10,0;20,1;23,0;40,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EulerE[n , x ] gives the n th Euler polynomial. ;[s] 8:0,2;7,1;9,2;10,1;13,2;14,0;25,1;27,0;48,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "StirlingS1"] StirlingS1 ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] StirlingS1[n , m ] gives a Stirling number of the first kind. ;[s] 7:0,2;11,1;13,2;14,1;16,0;17,2;18,0;68,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "StirlingS2"] StirlingS2 ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] StirlingS2[n , m ] gives a Stirling number of the second kind. ;[s] 7:0,2;11,1;13,2;14,1;16,0;17,2;18,0;63,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Partitions"] Partitions ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Partitions[n ] gives the number of unrestricted partitions of the integer n.. ;[s] 7:0,2;11,1;12,0;13,2;14,0;74,1;75,0;78,-1; 3:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "PartitionsQ"] PartitionsQ ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PartitionsQ[n ] gives the number of partitions of n into distinct parts. ;[s] 5:0,2;12,1;13,0;14,2;15,0;74,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Signature"] Signature ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Signature[{i1 , i2 , ... }] gives the signature of a permutation. ;[s] 8:0,2;11,1;14,2;15,1;19,2;20,0;25,2;27,0;67,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ClebschGordan"] ClebschGordan ;[s] 1:0,1;15,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ClebschGordan[{j1 , m1 }, {j2 , m2 }, {j , m }] gives a Clebsch-Gordan coefficient. ;[s] 21:0,2;15,1;18,2;19,1;22,0;23,2;25,0;26,2;27,1;30,2;31,1;34,0;35,2;37,0;38,2;39,1;41,2;42,1;44,0;45,2;47,0;84,-1; 3:6,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;9,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ThreeJSymbol"] ThreeJSymbol ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ThreeJSymbol[{j1 , m1 }, {j2 , m2 }, {j3 , m3 }] gives a Wigner 3-j symbol. ;[s] 21:0,2;14,1;17,2;18,1;21,0;22,2;24,0;25,2;26,1;29,2;30,1;33,0;34,2;36,0;37,2;38,1;41,2;42,1;45,0;46,2;48,0;77,-1; 3:6,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;9,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "SixJSymbol"] SixJSymbol ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] SixJSymbol[{j1 , j2 , j3 }, {j4 , j5 , j6 }] gives a Racah 6-j symbol. ;[s] 18:0,2;12,1;15,2;16,1;20,2;21,1;24,0;25,2;27,0;28,2;29,1;32,2;33,1;37,2;38,1;41,0;42,2;44,0;71,-1; 3:4,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Factorial :[font = text; inactive; preserveAspect] For non-integers, Mathematica evaluates factorials using the gamma function. ;[s] 3:0,0;18,1;31,0;78,-1; 2:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] 30! :[font = output; output; inactive; preserveAspect; endGroup] 265252859812191058636308480000000 ;[o] 265252859812191058636308480000000 :[font = input; Cclosed; preserveAspect; startGroup] 3.6! :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 13.38128587093244 ;[o] 13.3813 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Binomial Coefficient :[font = input; Cclosed; preserveAspect; startGroup] Binomial[ 11, 6] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 462 ;[o] 462 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Symbolic Binomial Coefficient :[font = input; Cclosed; preserveAspect; startGroup] Binomial[ n, 2] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] ((-1 + n)*n)/2 ;[o] (-1 + n) n ---------- 2 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Multinomial Coefficient :[font = input; Cclosed; preserveAspect; startGroup] Multinomial[ 3, 6, 5] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 168168 ;[o] 168168 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Bernoulli Polynomial :[font = text; inactive; preserveAspect] This gives the second Bernoulli polynomial. :[font = input; Cclosed; preserveAspect; startGroup] BernoulliB[2, x] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 1/6 - x + x^2 ;[o] 1 2 - - x + x 6 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Bernoulli Number :[font = text; inactive; preserveAspect] This gives the 20th Bernoulli number as an exact rational number and as an approximate real number. :[font = input; Cclosed; preserveAspect; startGroup] BernoulliB[20] :[font = output; output; inactive; preserveAspect; endGroup] -174611/330 ;[o] 174611 -(------) 330 :[font = input; Cclosed; preserveAspect; startGroup] NBernoulliB[20] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] -529.1242424242444 ;[o] -529.124 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Symbolic 3-j Symbol :[font = input; Cclosed; preserveAspect; startGroup] ThreeJSymbol[{j, m}, {j + 1/2, -m-1/2}, {1/2. 1/2}] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] ThreeJSymbol[{j, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, {1/2 + j, {{-3/2, -1/2, -1/2}, {-1/2, -3/2, -1/2}, {-1/2, -1/2, -3/2}}}, {0.25}] ;[o] ThreeJSymbol[{j, {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, 1 3 1 1 1 3 1 {- + j, {{-(-), -(-), -(-)}, {-(-), -(-), -(-)}, 2 2 2 2 2 2 2 1 1 3 {-(-), -(-), -(-)}}}, {0.25}] 2 2 2 :[font = section; inactive; Cclosed; preserveAspect; startGroup] Elementary Transcendental Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 562) :[font = input; preserveAspect; keywords = "Exp"] Exp ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Exp[x ] gives the exponential of x . ;[s] 7:0,1;4,2;5,0;6,1;7,0;33,2;34,0;37,-1; 3:3,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0;2,16,12,Times,2,14,0,0,0; :[font = input; preserveAspect; keywords = "Log"] Log ;[s] 1:0,1;5,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Log[x ] gives the natural logarithm of x . ;[s] 7:0,1;4,2;5,0;6,1;7,0;39,2;40,0;43,-1; 3:3,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0;2,16,12,Times,2,14,0,0,0; :[font = smalltext; inactive; preserveAspect] Log[b , x ] gives the logarithm base b of x . ;[s] 13:0,1;4,2;5,0;6,1;7,0;8,2;9,0;10,1;11,0;37,2;38,0;43,2;44,0;47,-1; 3:6,16,12,Times,0,14,0,0,0;3,13,10,Courier,1,12,0,0,0;4,16,12,Times,2,14,0,0,0; :[font = special3; inactive; preserveAspect] Trigonometric Functions :[font = smalltext; inactive; preserveAspect; keywords = "Sin, Cos, Tan, Csc, Sec, Cot"] Sin[x ], Cos[x ], Tan[x ], Csc[x ], Sec[x ] and Cot[x ] give the value of the trigonometric functions at x radians. ;[s] 32:0,1;4,2;5,0;6,1;7,0;9,1;13,2;14,0;15,1;16,0;18,1;22,2;23,0;24,1;25,0;27,1;31,2;32,0;33,1;34,0;36,1;40,2;41,0;42,1;43,0;48,1;52,2;53,0;54,1;55,0;105,2;106,0;117,-1; 3:13,16,12,Times,0,14,0,0,0;12,13,10,Courier,1,12,0,0,0;7,16,12,Times,2,14,0,0,0; :[font = special3; inactive; preserveAspect] Inverse Trigonometric Functions :[font = smalltext; inactive; preserveAspect; keywords = "ArcSin, ArcCos, ArcTan, ArcCsc, ArcSec, ArcCot"] ArcSin[x ], ArcCos[x ], ArcTan[x ], ArcCsc[x ], ArcSec[x ] and ArcCot[x ] give the value of the inverse trigonometric functions at x . ;[s] 31:0,1;7,2;8,0;9,1;10,0;12,1;19,2;20,0;21,1;22,0;24,1;31,2;32,0;33,1;34,0;36,1;43,2;44,0;45,1;46,0;48,1;55,2;57,1;59,0;63,1;70,2;71,0;72,1;73,0;131,2;132,0;135,-1; 3:12,16,12,Times,0,14,0,0,0;12,13,10,Courier,1,12,0,0,0;7,16,12,Times,2,14,0,0,0; :[font = special3; inactive; preserveAspect] Hyperbolic Functions :[font = smalltext; inactive; preserveAspect; keywords = "Sinh, Cosh, Tanh, Csch, Sech, Coth"] Sinh[x ], Cosh[x ], Tanh[x ], Csch[x ], Sech[x ] and Coth[x ] give the value of the hyperbolic functions at x . ;[s] 32:0,1;5,2;6,0;7,1;8,0;10,1;15,2;16,0;17,1;18,0;20,1;25,2;26,0;27,1;28,0;30,1;35,2;36,0;37,1;38,0;40,1;45,2;46,0;47,1;48,0;54,1;59,2;60,0;61,1;62,0;110,2;111,0;114,-1; 3:13,16,12,Times,0,14,0,0,0;12,13,10,Courier,1,12,0,0,0;7,16,12,Times,2,14,0,0,0; :[font = special3; inactive; preserveAspect] Inverse Hyperbolic Functions :[font = smalltext; inactive; preserveAspect; endGroup; keywords = "ArcSinh, ArcCosh, ArcTanh, ArcCsch, ArcSech, ArcCoth"] ArcSinh[x ], ArcCosh[x ], ArcTanh[x ], ArcCsch[x ], ArcSech[x ] and ArcCoth[x ] give the value of the hyperbolic functions at x . ;[s] 32:0,1;8,2;9,0;10,1;11,0;13,1;21,2;22,0;23,1;24,0;26,1;34,2;35,0;36,1;37,0;39,1;47,2;48,0;49,1;50,0;52,1;60,2;61,0;62,1;63,0;68,1;76,2;77,0;78,1;79,0;127,2;128,0;131,-1; 3:13,16,12,Times,0,14,0,0,0;12,13,10,Courier,1,12,0,0,0;7,16,12,Times,2,14,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Trigonometric Function with Exact Result :[font = text; inactive; preserveAspect] Note that the arguments to trigonometric functions are always in radians. :[font = input; Cclosed; preserveAspect; startGroup] Sin[Pi/3] :[font = output; output; inactive; preserveAspect; endGroup] 3^(1/2)/2 ;[o] Sqrt[3] ------- 2 :[font = input; Cclosed; preserveAspect; startGroup] N[%] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.866025403784439 ;[o] 0.866025 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Trigonometric Function with Approximate Result :[font = text; inactive; preserveAspect] Note the explicit use of the decimal point. :[font = input; Cclosed; preserveAspect; startGroup] Tan[2.] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] -2.185039863261519 ;[o] -2.18504 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] A Note on Exact and Approximate Results :[font = text; inactive; preserveAspect; endGroup] Mathematica tries to give exact values for mathematical functions when you give it exact input. Thus Sin[Pi] gives 1 but Sin[3] is returned unevaluated. To get an approximate numerical result you can use N or else include an explicit decimal point. ;[s] 12:0,1;11,0;102,2;106,3;108,2;109,0;122,2;126,3;127,2;128,0;205,2;206,0;251,-1; 4:4,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0;2,13,9,Times,0,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Trigonometric Function Using Degrees :[font = text; inactive; preserveAspect] Multiplying by the constant Degree converts the argument to radians. ;[s] 3:0,0;28,1;34,0;70,-1; 2:2,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Tan[2 Degree] //N :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.03492076949174772 ;[o] 0.0349208 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Inverse Trigonometric Functions :[font = input; Cclosed; preserveAspect; startGroup] ArcCsc[1] :[font = output; output; inactive; preserveAspect; endGroup] Pi/2 ;[o] Pi -- 2 :[font = input; Cclosed; preserveAspect; startGroup] ArcTan[.12] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.1194289260183384 ;[o] 0.119429 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] A Note on Inverse Functions :[font = text; inactive; preserveAspect; endGroup] An inverse function is the solution to an equation. For example, the inverse or arc sine function gives a solution to the equation y==Sin[x]. However, there are many such solutions. Thus in defining an inverse function one must make a choice of a "principle value". For the inverse trigonometric and hyperbolic functions there are standard choices made in mathematics. These same choices are used by Mathematica . For example, the values of ArcSin are always in the range -Pi/2 to Pi/2. For information on a specific inverse function, see its reference guide entry in The Mathematica Book. ;[s] 16:0,0;139,3;140,2;146,3;147,2;148,0;408,1;420,0;450,2;456,0;481,2;486,0;490,2;494,0;583,1;594,0;602,-1; 4:7,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0;2,15,11,Courier,1,14,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Hyperbolic Functions :[font = input; Cclosed; preserveAspect; startGroup] Tanh[.12] :[font = output; output; inactive; preserveAspect; endGroup] 0.1194272985343859 ;[o] 0.119427 :[font = input; Cclosed; preserveAspect; startGroup] ArcCsch[3.2] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.3076250673886192 ;[o] 0.307625 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Exponential :[font = input; Cclosed; preserveAspect; startGroup] Exp[2.3] :[font = output; output; inactive; preserveAspect; endGroup] 9.97418245481472 ;[o] 9.97418 :[font = input; Cclosed; preserveAspect; startGroup] E^2.3 :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 9.97418245481472 ;[o] 9.97418 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Natural Logarithm :[font = text; inactive; preserveAspect] Recall that the natural log is a logarithm base E. :[font = input; Cclosed; preserveAspect; startGroup] Log[5.654] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 1.732363259271399 ;[o] 1.73236 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Common Logarithm :[font = text; inactive; preserveAspect] Recall that the common log is a logarithm base 10. :[font = input; Cclosed; preserveAspect; startGroup] Log[10, 100] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 2 ;[o] 2 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Logarithm Base Two :[font = input; Cclosed; preserveAspect; startGroup] Log[2, 256] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 8 ;[o] 8 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Factorial :[font = input; Cclosed; preserveAspect; startGroup] 10! :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] 3628800 ;[o] 3628800 :[font = section; inactive; Cclosed; preserveAspect; startGroup] Mathematical Constants :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 566) :[font = input; preserveAspect; keywords = "Pi"] Pi ;[s] 1:0,1;4,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Pi is the ratio of the perimeter of a circle to its diameter. It is approximately equal to 3.14159. ;[s] 2:0,1;2,0;100,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "E"] E ;[s] 1:0,1;3,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] E is the base of the natuaral logarithm. It is approximately equal to 2.71828. ;[s] 2:0,1;1,0;79,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Degree"] Degree ;[s] 1:0,1;8,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Degree is the degrees-to-radians conversion factor. It is equal to Pi/180. ;[s] 4:0,1;6,0;67,1;73,0;75,-1; 2:2,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "I"] I ;[s] 1:0,1;3,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] I is the square root of minus 1. ;[s] 2:0,1;1,0;33,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Infinity"] Infinity ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Infinity represents a positive infinite quantity. ;[s] 2:0,1;8,0;50,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "GoldenRatio"] GoldenRatio ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] GoldenRatio is equal to (1 + Sqrt[5])/2. ;[s] 4:0,1;11,0;24,1;39,0;41,-1; 2:2,16,12,Times,0,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EulerGamma"] EulerGamma ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EulerGamma is Euler's constant ;[s] 2:0,1;10,0;31,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Catalan"] Catalan ;[s] 1:0,1;9,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] Catalan is Catalan's constant. ;[s] 2:0,1;7,0;31,-1; 2:1,16,12,Times,0,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Arbitrary-Precision Value of a Constant :[font = text; inactive; preserveAspect] Note that mathematical constants are exact quantities in Mathematica so you must use N to get an approximate numerical value. ;[s] 5:0,0;58,1;69,0;87,2;88,0;130,-1; 3:3,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] N[E, 50] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] 2.7182818284590452353602874713526624977572470937000 ;[o] 2.7182818284590452353602874713526624977572470937 :[font = section; inactive; Cclosed; preserveAspect; startGroup] Orthogonal Polynomials :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 566) :[font = input; preserveAspect; keywords = "LegendreP"] LegendreP ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LegendreP[n , x ] gives a Legendre polynomial. ;[s] 7:0,2;10,1;12,2;13,1;15,0;16,2;17,0;47,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LegendreP[n , m , x ] gives an associated Legendre polynomial. ;[s] 9:0,2;10,1;12,2;13,1;16,2;17,1;19,0;20,2;21,0;63,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "SphericalHarmonicY"] SphericalHarmonicY ;[s] 1:0,1;20,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] SphericalHarmonicY[ l, m , theta , phi ] gives a spherical harmonic. ;[s] 10:0,2;19,0;21,2;22,1;25,2;26,1;33,2;34,1;39,2;40,0;69,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "GegenbauerC"] GegenbauerC ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] GegenbauerC[n , m , x ] gives a Gegenbauer polynomial. ;[s] 9:0,2;12,1;14,2;15,1;18,2;19,1;21,0;22,2;23,0;55,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ChebyshevT, ChebyshevU"] ChebyshevT and ChebyshevU ;[s] 3:0,1;11,2;14,1;27,-1; 3:0,13,10,Courier,1,12,0,0,65535;2,13,10,Courier,1,12,0,0,0;1,14,10,Helvetica,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ChebyshevT[n , x ], ChebyshevU[n , x ] give Chebyshev polynomials of the first and second kinds. ;[s] 13:0,2;11,1;13,2;14,1;16,0;17,2;18,0;20,2;31,1;33,2;34,1;37,2;38,0;98,-1; 3:3,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "HermiteH"] HermiteH ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] HermiteH[n , x ] gives a Hermite polynomial. ;[s] 6:0,2;9,1;11,2;12,1;15,2;16,0;45,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "LaguerreL"] LaguerreL ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LaguerreL[n , x ] gives a Laguerre polynomial. ;[s] 6:0,2;10,1;12,2;13,1;16,2;17,0;47,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LaguerreL[n ,a ,x ] gives a generalized Laguerre polynomial. ;[s] 8:0,2;10,1;12,2;13,1;15,2;16,1;18,2;19,0;61,-1; 3:1,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "JacobiP"] JacobiP ;[s] 1:0,1;9,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] JacobiP[n , a , b , x ] gives a Jacobi polynomial. ;[s] 11:0,2;8,1;10,2;11,1;14,2;15,1;18,2;19,1;21,0;22,2;23,0;51,-1; 3:2,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Legendre Polynomial :[font = text; inactive; preserveAspect] This gives the sixth Legendre polynomial. :[font = input; Cclosed; preserveAspect; startGroup] LegendreP[6, x] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] (-5 + 105*x^2 - 315*x^4 + 231*x^6)/16 ;[o] 2 4 6 -5 + 105 x - 315 x + 231 x ----------------------------- 16 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Associated Legendre Polynomial :[font = input; Cclosed; preserveAspect; startGroup] LegendreP[6, 3, x] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] (315*(1 - x^2)^(1/2)*(-1 + x^2)*(-3*x + 11*x^3))/2 ;[o] 2 2 3 315 Sqrt[1 - x ] (-1 + x ) (-3 x + 11 x ) ----------------------------------------- 2 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Generalized Laguerre Polynomial :[font = input; Cclosed; preserveAspect; startGroup] LaguerreL[2, a, x] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] (2 + 3*a + a^2 - 4*x - 2*a*x + x^2)/2 ;[o] 2 2 2 + 3 a + a - 4 x - 2 a x + x ------------------------------- 2 :[font = section; inactive; Cclosed; preserveAspect; startGroup] Special Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 570) :[font = input; preserveAspect; keywords = "AiryAi, AiryBi"] AiryAi and AiryBi ;[s] 3:0,1;7,2;10,1;19,-1; 3:0,13,10,Courier,1,12,0,0,65535;2,13,10,Courier,1,12,0,0,0;1,13,10,Courier,0,12,0,0,0; :[font = smalltext; inactive; preserveAspect] AiryAi[z ] and AiryBi[z ] give Airy functions. ;[s] 9:0,2;7,1;9,2;10,0;15,2;22,1;23,0;24,2;25,0;47,-1; 3:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "AiryAiPrime, AiryBiPrime"] AiryAiPrime and AiryBiPrime ;[s] 3:0,1;12,0;15,1;29,-1; 2:1,13,10,Courier,0,12,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] AiryAiPrime[z ] and AiryBiPrime[z ] give derivatives of Airy functions. ;[s] 10:0,2;12,1;13,0;14,2;15,0;20,2;32,1;33,0;34,2;35,0;72,-1; 3:4,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = special3; inactive; preserveAspect] Bessel Functions :[font = smalltext; inactive; preserveAspect; keywords = "BesselJ, BesselK, BesselI, BesselY"] BesselJ[n , z ] and BesselY[n , z ] give Bessel functions. ;[s] 14:0,2;8,1;10,2;11,1;13,0;14,2;15,0;20,2;28,1;30,2;31,1;33,0;34,2;35,0;59,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] BesselI[n , z ] and BesselK[n , z ] give modified Bessel functions. ;[s] 14:0,2;8,1;10,2;11,1;13,0;14,2;15,0;20,2;28,1;30,2;31,1;33,0;34,2;35,0;68,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Beta"] Beta ;[s] 1:0,1;6,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Beta[a , b ] gives a Euler beta function. ;[s] 7:0,2;5,1;7,2;8,1;10,0;11,2;12,0;42,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Beta[z , a , b ] gives an incomplete beta function. ;[s] 9:0,2;5,1;7,2;8,1;11,2;12,1;14,0;15,2;16,0;52,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "CosIntegral"] CosIntegral ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] CosIntegral[z ] gives a cosine integral function ;[s] 5:0,2;12,1;13,0;14,2;15,0;49,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Erf, Erfc"] Erf and Erfc ;[s] 3:0,1;4,0;7,1;14,-1; 2:1,13,10,Courier,0,12,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Erf[z ] and Erfc[z ] give the error function and the complementary error function. ;[s] 10:0,2;4,1;6,2;7,1;9,0;13,2;18,1;19,0;20,2;21,0;84,-1; 3:3,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Erf[z0 , z1 ] gives the generalized error function erf(z1 ) - erf(z0 ). ;[s] 11:0,2;4,1;7,2;8,1;11,0;12,2;13,0;55,1;57,0;66,1;68,0;72,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ExpIntegralE"] ExpIntegralE ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ExpIntegralE[n , z ] gives the exponential integral function. ;[s] 7:0,2;13,1;15,2;16,1;18,0;19,2;20,0;62,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ExpIntegralEi"] ExpIntegralEi ;[s] 1:0,1;15,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ExpIntegralEi[z ] gives the exponential integral function. ;[s] 5:0,2;14,1;15,0;16,2;17,0;59,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Gamma"] Gamma ;[s] 1:0,1;7,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Gamma[z ] gives the Euler gamma function. ;[s] 5:0,2;6,1;7,0;8,2;9,0;42,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Gamma[a , z ] gives the incomplete gamma function. ;[s] 7:0,2;6,1;8,2;9,1;11,0;12,2;13,0;51,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Gamma[a , z0 , z1 ] gives the generalized incomplete gamma function. ;[s] 9:0,2;6,1;8,2;9,1;13,2;14,1;17,0;18,2;19,0;69,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Hypergeometric0F1"] Hypergeometric0F1 ;[s] 1:0,1;19,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Hypergeometric0F1[a , z ] gives the hypergeometric function. ;[s] 6:0,2;18,1;20,2;21,1;24,2;25,0;61,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Hypergeometric1F1"] Hypergeometric1F1 ;[s] 1:0,1;19,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Hypergeometric1F1[a , b , z ] gives the Kummer confluent hypergeometric function. ;[s] 9:0,2;18,1;20,2;21,1;24,2;25,1;27,0;28,2;29,0;82,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = special2; inactive; preserveAspect; keywords = "HypergeometricU"] HypergeometricU :[font = smalltext; inactive; preserveAspect] HypergeometricU[a , b , z ] gives the confluent hypergeometric function. ;[s] 9:0,2;16,1;18,2;19,1;22,2;23,1;25,0;26,2;27,0;73,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Hypergeometric2F1"] Hypergeometric2F1 ;[s] 1:0,1;19,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Hypergeometric2F1[a , b , c , z ] gives the hypergeometric function. ;[s] 11:0,2;18,1;20,2;21,1;24,2;25,1;28,2;29,1;31,0;32,2;33,0;69,-1; 3:2,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "LegendreP"] LegendreP ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LegendreP[n , z ], LegendreQ[n , z ] gives the Legendre functions of the first and second kinds. ;[s] 16:0,2;10,1;12,2;13,1;15,0;16,2;17,0;19,2;29,1;30,0;31,2;32,0;33,1;34,0;35,2;36,0;97,-1; 3:6,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LegendreP[n , m , z ], LegendreQ[n , m , z ] gives the associated Legendre functions. ;[s] 18:0,2;10,1;12,2;13,1;16,2;17,1;19,0;20,2;21,0;23,2;33,1;35,2;36,1;39,2;40,1;42,0;43,2;44,0;86,-1; 3:4,16,12,Times,0,14,0,0,0;6,16,12,Times,2,14,0,0,0;8,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "LerchPhi"] LerchPhi ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LerchPhi[z , s , z ]]gives the Lerch's transcendent. ;[s] 9:0,2;9,1;11,2;12,1;15,2;16,1;19,0;20,2;21,0;53,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "LogIntegral"] LogIntegral ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] LogIntegral[z ] gives the logarithmic integral. ;[s] 5:0,2;12,1;13,0;14,2;15,0;48,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Pochhammer"] Pochhammer ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Pochhammer[a , n ] gives the Pochhammer symbol. ;[s] 7:0,2;11,1;13,2;14,1;16,0;17,2;18,0;48,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "PolyGamma"] PolyGamma ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PolyGamma[z ] gives the digamma function. ;[s] 3:0,2;10,1;11,0;42,-1; 3:1,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PolyGamma[n , z ] gives the nth derivative of the digamma function. ;[s] 7:0,2;10,1;12,2;13,1;15,0;16,2;17,0;68,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "PolyLog"] PolyLog ;[s] 1:0,1;9,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] PolyLog[n , z ] gives the polylogarithm function. ;[s] 7:0,2;8,1;10,2;11,1;13,0;14,2;15,0;50,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ReimannSiegelTheta, ReimannSiegelZ"] ReimannSiegelTheta ;[s] 1:0,1;20,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] ReimannSiegelTheta[t ] and ReimannSiegelZ[t ] give the Reimann-Siegel functions. ;[s] 9:0,2;19,1;21,2;22,0;27,2;42,1;43,0;44,2;45,0;82,-1; 3:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "SinIntegral"] SinIntegral ;[s] 1:0,1;13,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] SinIntegral[z ] gives the sine integral function. ;[s] 5:0,2;12,1;13,0;14,2;15,0;50,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "Zeta"] Zeta ;[s] 1:0,1;6,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] Zeta[s ] gives the Riemann zeta function. ;[s] 5:0,2;5,1;6,0;7,2;8,0;42,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] Zeta[s , a ] gives the generalized Riemann zeta function. ;[s] 7:0,2;5,1;7,2;8,1;10,0;11,2;12,0;58,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] A Note on Special Functions :[font = text; inactive; preserveAspect; endGroup] Mathematica includes all the common special functions of mathematical physics. There are often several conflicting definitions of any particular special function in the literature. When you use a special function in Mathematica , you should look at the definition given on page 571 -579 of The Mathematica Book. ;[s] 6:0,1;11,0;217,1;228,0;295,1;306,0;314,-1; 2:3,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Exact Result :[font = text; inactive; preserveAspect] Mathematica gives exact results for some values of special functions. When the argument is exact and no exact result is known, the input is returned unevaluated. ;[s] 2:0,1;11,0;163,-1; 2:1,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] Gamma[15/2] :[font = output; output; inactive; preserveAspect; endGroup] (135135*Pi^(1/2))/128 ;[o] 135135 Sqrt[Pi] --------------- 128 :[font = input; Cclosed; preserveAspect; startGroup] Gamma[15/7] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] Gamma[15/7] ;[o] 15 Gamma[--] 7 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Arbitrary-Precision Result :[font = text; inactive; preserveAspect] Even if no exact result is known, you can get a numerical result to arbitrary precision. This example gives a result computed to 40 decimal places. :[font = input; Cclosed; preserveAspect; startGroup] Gamma[15/7] :[font = output; output; inactive; preserveAspect; endGroup] Gamma[15/7] ;[o] 15 Gamma[--] 7 :[font = input; Cclosed; preserveAspect; startGroup] N[%, 40] :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 1.0690715004486243979941376897026932673667 ;[o] 1.0690715004486243979941376897026932673667 :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Complex Argument :[font = input; Cclosed; preserveAspect; startGroup] Gamma[ 3 + 4I] //N :[font = output; output; inactive; preserveAspect; endGroup; endGroup] 0.005225538471369098 - 0.1725470792943001*I ;[o] 0.00522554 - 0.172547 I :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Analytic Derivative :[font = text; inactive; preserveAspect] Mathematica knows some analytical properties of special functions , such as derivatives. ;[s] 2:0,1;11,0;89,-1; 2:1,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0; :[font = input; Cclosed; preserveAspect; startGroup] D[Gamma[x], {x, 2}] :[font = output; output; inactive; preserveAspect; endGroup; endGroup; endGroup] Gamma[x]*PolyGamma[0, x]^2 + Gamma[x]*PolyGamma[1, x] ;[o] 2 Gamma[x] PolyGamma[0, x] + Gamma[x] PolyGamma[1, x] :[font = section; inactive; Cclosed; preserveAspect; startGroup] Elliptic Integrals and Elliptic Functions :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] Syntax (see page 580) :[font = input; preserveAspect; keywords = "EllipticK"] EllipticK ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticK[m ] gives the complete elliptic integral of the first kind. ;[s] 5:0,2;10,1;11,0;12,2;13,0;70,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticF"] EllipticF ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticF[phi, m ] gives the elliptic integral of the first kind. ;[s] 7:0,2;10,1;13,2;14,1;16,0;17,2;18,0;66,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticE"] EllipticE ;[s] 1:0,1;10,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticE[m ] gives the complete elliptic integral of the second kind. ;[s] 5:0,2;10,1;11,0;12,2;13,0;71,-1; 3:2,16,12,Times,0,14,0,0,0;1,16,12,Times,2,14,0,0,0;2,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticE[phi, m ] gives the elliptic integral of the second kind. ;[s] 7:0,2;10,1;13,2;14,1;16,0;17,2;18,0;67,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "JacobiZeta"] JacobiZeta ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] JacobiZeta[phi, m ] gives the Jacobi zeta function. ;[s] 7:0,2;11,1;14,2;15,1;17,0;18,2;19,0;52,-1; 3:2,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticPi"] EllipticPi ;[s] 1:0,1;11,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticPi[n, phi, m ] gives the elliptic integral of the third kind. ;[s] 9:0,2;11,1;12,2;13,1;17,2;18,1;20,0;21,2;22,0;70,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "JacobiAmplitude"] JacobiAmplitude ;[s] 1:0,1;16,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] JacobiAmplitude[u, m ] gives the amplitude functions. ;[s] 6:0,2;16,1;17,2;18,1;21,2;22,0;54,-1; 3:1,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "JacobiSN"] JacobiSN ;[s] 1:0,1;9,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] JacobiSN[u, m ], JacobiCN[u, m ], etc. give the Jacobi elliptic functions. ;[s] 14:0,2;9,1;10,2;11,1;13,0;14,2;15,0;17,2;26,1;27,2;28,1;30,0;31,2;32,0;75,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "InverseJacobiSN"] InverseJacobiSN ;[s] 1:0,1;16,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] InverseJacobiSN[v, m ], InverseJacobiCN[v, m ], etc. give the inverse Jacobi elliptic functions. ;[s] 14:0,2;16,1;17,2;18,1;20,0;21,2;22,0;24,2;40,1;41,2;42,1;44,0;45,2;46,0;97,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;6,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticTheta"] EllipticTheta ;[s] 1:0,1;14,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticTheta[a, u, q ] gives the elliptic theta functions. ;[s] 9:0,2;14,1;15,2;16,1;18,2;19,1;21,0;22,2;23,0;60,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;4,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticLog"] EllipticLog ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticLog[{x, y },{a, b }] gives the generalized logarithm associated with the elliptic curve y^2 = x^3+a x^2 - bx. ;[s] 11:0,2;13,1;14,2;15,1;18,2;21,1;22,2;23,1;25,0;26,2;28,0;118,-1; 3:2,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "EllipticExp"] EllipticExp ;[s] 1:0,1;12,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect] EllipticExp[u, {a, b }] gives the generalized exponential associated with the elliptic curve y^2 = x^3+a x^2 - bx. ;[s] 10:0,2;12,1;13,2;14,0;15,2;16,1;17,2;18,1;21,2;23,0;115,-1; 3:2,16,12,Times,0,14,0,0,0;3,16,12,Times,2,14,0,0,0;5,13,10,Courier,1,12,0,0,0; :[font = input; preserveAspect; keywords = "ArithmeticGeometricMean"] ArithmeticGeometricMean ;[s] 1:0,1;24,-1; 2:0,13,10,Courier,1,12,0,0,65535;1,13,10,Courier,1,12,0,0,0; :[font = smalltext; inactive; preserveAspect; endGroup] ArithmeticGeometricMean[a, b ] gives the arithmetic-geometric mean of a andb. ;[s] 11:0,2;24,1;25,2;26,1;28,0;29,2;30,0;70,1;71,0;76,1;77,0;79,-1; 3:4,16,12,Times,0,14,0,0,0;4,16,12,Times,2,14,0,0,0;3,13,10,Courier,1,12,0,0,0; :[font = subsubsection; inactive; Cclosed; preserveAspect; startGroup] A Note on Elliptic Integrals and Elliptic Functions :[font = text; inactive; preserveAspect] You should be very careful about the arguments you give to elliptic functions in Mathematica . There are several incompatible conventions in common mathematical use. You will often have to convert from a particular convention to the one that Mathematica uses. ;[s] 5:0,0;81,1;93,0;244,1;255,0;263,-1; 2:3,16,12,Times,0,14,0,0,0;2,16,12,Times,2,14,0,0,0; :[font = text; inactive; preserveAspect; endGroup; endGroup; endGroup] In mathematical usage, the different argument conventions are sometimes distinguished by the use of separators other than commas between the arguments. Often, however, there is no clue about which notation is used, other than perhaps the specific names given to the arguments. In addition, in many cases, some arguments are not explicitly given. ^*)