The Mathematica Journal
Departments
Feature Articles
Columns
New Products
New Publications
Classifieds
Calendar
News Bulletins
Mailbox
Letters
Write Us
About the Journal
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues
Home
Download this Issue

Symbolics

In symbolic or algebraic computing we also focus on performance, but the overriding concern is frequently to get an algorithm in the first place; that is, there are many problems with no known algorithmic solution. So in many cases increasing the scope (or range) of problems that Mathematica can handle is very much at the top of the agenda.

Simplification

The default assumption in Mathematica is that every variable can be an arbitrary complex number. Well, there are many results that depend on the fact that you can assume certain constraints on variables and thus get simpler, but more specialized, results. A typical example is the following.

[Graphics:../Images/index_gr_83.gif]
[Graphics:../Images/index_gr_84.gif]

It cannot simplify to [Graphics:../Images/index_gr_85.gif] or [Graphics:../Images/index_gr_86.gif] under the assumption that [Graphics:../Images/index_gr_87.gif] can be an arbitrary complex number as the following evaluations show.

[Graphics:../Images/index_gr_88.gif]
[Graphics:../Images/index_gr_89.gif]

For [Graphics:../Images/index_gr_90.gif] however it can simplify further.

[Graphics:../Images/index_gr_91.gif]
[Graphics:../Images/index_gr_92.gif]

For [Graphics:../Images/index_gr_93.gif], which implicitly also assumes [Graphics:../Images/index_gr_94.gif], we get an even simpler form.

[Graphics:../Images/index_gr_95.gif]
[Graphics:../Images/index_gr_96.gif]

In general, you can use any logical combination of equations, inequalities, and domain equations. Domain equations are of the form [Graphics:../Images/index_gr_97.gif] or [Graphics:../Images/index_gr_98.gif], and they behave very much like regular equations. If they can evaluate immediately they do so; otherwise they stay unevaluated.

This is an example where the domain equation and an equational analog can immediately evaluate to True.

[Graphics:../Images/index_gr_99.gif]
[Graphics:../Images/index_gr_100.gif]

These are some more examples that evaluate immediately.

[Graphics:../Images/index_gr_101.gif]
[Graphics:../Images/index_gr_102.gif]

Here, however, is a case where it is not known in mathematics whether the statement is true or not.

[Graphics:../Images/index_gr_103.gif]
[Graphics:../Images/index_gr_104.gif]

If you use a variable, then the domain equation remains unevaluated, just as is the case for regular equations.

[Graphics:../Images/index_gr_105.gif]
[Graphics:../Images/index_gr_106.gif]

The current set of domains is given below.

[Graphics:../Images/index_gr_107.gif]
[Graphics:../Images/index_gr_108.gif]

With the addition of domain equations one can express a wide variety of constraints or assumptions. These are oriented towards number theory, the first one being Fermat's little theorem.

[Graphics:../Images/index_gr_109.gif]
[Graphics:../Images/index_gr_110.gif]

Or this is a structural property of a number theoretic function.

[Graphics:../Images/index_gr_111.gif]
[Graphics:../Images/index_gr_112.gif]

Or one can express properties of functions.

[Graphics:../Images/index_gr_113.gif]
[Graphics:../Images/index_gr_114.gif]
[Graphics:../Images/index_gr_115.gif]
[Graphics:../Images/index_gr_116.gif]

The last example demonstrates another feature, which is being able to simplify equations and inequalities. When there are algebraic (including polynomial) equations and inequalities, and the domains are real or complex, then the methods involved are also decision procedures based on Gröbner basis and cylindrical algebraic decomposition respectively. This is, for example, the well-known inequality between geometric and arithmetic means.

[Graphics:../Images/index_gr_117.gif]
[Graphics:../Images/index_gr_118.gif]

This is a slightly harder example that was posed to a news group.

[Graphics:../Images/index_gr_119.gif]
[Graphics:../Images/index_gr_120.gif]

Inequalities

One of the technologies needed to build a rigorous assumptions mechanism was the ability to manipulate inequalities. In particular we have implemented cylindrical algebraic decomposition (CAD). It computes a triangular or nested structure of the set of inequalities. This is an example of an Experimental` context feature. These are features that represent previews of future functionality, but whose interface may change in future versions of Mathematica.

[Graphics:../Images/index_gr_121.gif]

The result is a union (Or) of cells that have a triangular or cylindric structure of the form:

[Graphics:../Images/index_gr_122.gif]

This is essentially the analog of Gaussian elimination for polynomial inequalities. And just as almost any problem in linear algebra can ultimately be solved using Gaussian elimination (sometimes as part of other algorithms) one can also solve almost any problem in real polynomial algebra using CAD or variants thereof.

One of the simplest examples is the CAD of a disk, as seen below.

[Graphics:../Images/index_gr_123.gif]
[Graphics:../Images/index_gr_124.gif]

CAD is used in a number of the simplification functions, but it is also the underpinning of another class of solvers. For instance, solving systems of algebraic inequalities.

[Graphics:../Images/index_gr_125.gif]
[Graphics:../Images/index_gr_126.gif]
[Graphics:../Images/index_gr_127.gif]

Or exact minimization over regions defined by systems of algebraic inequalities.

[Graphics:../Images/index_gr_128.gif]
[Graphics:../Images/index_gr_129.gif]

Or quantifier elimination. This gives the conditions on the coefficients in a polynomial for it to be positive.

[Graphics:../Images/index_gr_130.gif]
[Graphics:../Images/index_gr_131.gif]

There are also future enhancements in the works that are ultimately based on the CAD algorithm.

Transforms

A number of integral and sum transforms have also been reimplemented and moved into the kernel. These transforms are frequently very useful when solving differential and difference equations. They also have direct interpretations in many disciplines such as signal and image processing, control, and physics.

This is, for instance, the one-sided Laplace transform.

[Graphics:../Images/index_gr_132.gif]
[Graphics:../Images/index_gr_133.gif]
[Graphics:../Images/index_gr_134.gif]
[Graphics:../Images/index_gr_135.gif]

Similarly, the sum transform version of the Laplace transform is the Z transform.

[Graphics:../Images/index_gr_136.gif]
[Graphics:../Images/index_gr_137.gif]
[Graphics:../Images/index_gr_138.gif]
[Graphics:../Images/index_gr_139.gif]

A variant of the Z transform is also called a generating function which is often used in combinatorics.

[Graphics:../Images/index_gr_140.gif]
[Graphics:../Images/index_gr_141.gif]
[Graphics:../Images/index_gr_142.gif]

Similarly, a simple variant of the inverse Z transform gets the sequence back.

[Graphics:../Images/index_gr_143.gif]
[Graphics:../Images/index_gr_144.gif]
[Graphics:../Images/index_gr_145.gif]

Similarly, FourierTransform, FourierSinTransform, and FourierCosTransform have been reimplemented, and along with that support has been added for generalized functions such as DiracDelta and UnitStep. This is a typical example resulting in a Dirac delta function in the output.

[Graphics:../Images/index_gr_146.gif]
[Graphics:../Images/index_gr_147.gif]
[Graphics:../Images/index_gr_148.gif]
[Graphics:../Images/index_gr_149.gif]

Functions

We have also been adding to the already vast knowledge base of special functions in Mathematica 4. Below you will find a sampling of some of these additions.

The fundamental reason we add special functions is that they are useful containers of specialized knowledge about functions. The knowledge of special functions built into Mathematica encompasses a lot more than numerical evaluation across the complex plane (which in itself can be a challenge). In particular this typically includes special symbolic values, derivatives and series expansions, and also how they can be used in integration and solution of differential equations. Mathematica represents a live and usable version of the vast knowledge of special functions. We have also been busy working on a vast web encyclopedia of special functions and their properties; see functions.wolfram.com for a preview.

In Mathematica 4 we have been adding to all aspects of the special functions knowledge base. There are new special functions (e.g., harmonic numbers, bivariate hypergeometric), generalized functions (e.g., Dirac delta, UnitStep) as well as number theoretic functions (e.g., the Carmichael lambda function).

The harmonic numbers are the discrete or sequence version of a logarithm, and frequently come up in summation problems.

[Graphics:../Images/index_gr_150.gif]
[Graphics:../Images/index_gr_151.gif]

These are the harmonic numbers of order [Graphics:../Images/index_gr_152.gif].

[Graphics:../Images/index_gr_153.gif]
[Graphics:../Images/index_gr_154.gif]

Appell's F1 function is an example of a bivariate hypergeometric function.

[Graphics:../Images/index_gr_155.gif]
[Graphics:../Images/index_gr_156.gif]

Some additional special functions include Nielsen's generalized polylogarithm and Struve functions. In many cases there is more knowledge built into Mathematica about the existing functions, for instance, additional simplifiers for Bessel, Fibonacci, gamma, harmonic number, hypergeometric, polygamma, polylogarithms, and zeta functions. A simple example is the following.

[Graphics:../Images/index_gr_157.gif]
[Graphics:../Images/index_gr_158.gif]

This is a conversion from trigonometric to radical expressions.

[Graphics:../Images/index_gr_159.gif]
[Graphics:../Images/index_gr_160.gif]

A new class of functions is the generalized functions such as Dirac's delta function and the unit step or Heaviside function, as well as sequence versions of these such as Kronecker's delta and the discrete delta function.

A Dirac delta function essentially samples a function at a point.

[Graphics:../Images/index_gr_161.gif]
[Graphics:../Images/index_gr_162.gif]

In this case the function that is being sampled is equal to 1 everywhere, and the integral will sample this function at every point where the argument to DiracDelta is zero. So in effect we count the number of zeros of [Graphics:../Images/index_gr_163.gif] in the interval [Graphics:../Images/index_gr_164.gif].

[Graphics:../Images/index_gr_165.gif]
[Graphics:../Images/index_gr_166.gif]

A function related to the Dirac delta function is the unit step or Heaviside function.

[Graphics:../Images/index_gr_167.gif]
[Graphics:../Images/index_gr_168.gif]

This uses the unit step function to produce a square wave.

[Graphics:../Images/index_gr_169.gif]

[Graphics:../Images/index_gr_170.gif]

There are also new number theoretic functions such as the Carmichael lambda function and the multiplicative order function.


Converted by Mathematica      June 4, 2000

[Article Index] [Prev Page][Next Page]