Symbolic Computation

One of the important features of the Wolfram System is that it can do symbolic, as well as numerical calculations. This means that it can handle algebraic formulas as well as numbers.

Here is a typical numerical computation:

3+62-1

This is a symbolic computation:

3x-x+2

Numerical and symbolic computations.

You can type any algebraic expression into the Wolfram System:

-1+2x+x^3

The Wolfram System automatically carries out basic algebraic simplifications. Here it combines (x^2) and -4(x^2) to get -3(x^2):

x^2+x-4 x^2

You can type in any algebraic expression, using the operators listed in "Arithmetic". You can use spaces to denote multiplication. Be careful not to forget the space in xy. If you type in xy with no space, the Wolfram Language will interpret this as a single symbol, with the name xy, not as a product of the two symbols x and y.

The Wolfram System rearranges and combines terms using the standard rules of algebra:

x y+2 x^2 y+y^2 x^2-2 y x

Here is another algebraic expression:

(x+2y+1)(x-2)^2

The function (RefLink[Expand, paclet:ref/Expand]) multiplies out products and powers:

Expand[%]

(RefLink[Factor, paclet:ref/Factor]) does essentially the inverse of (RefLink[Expand, paclet:ref/Expand]):

Factor[%]

When you type in more complicated expressions, it is important that you put parentheses in the right places. Thus, for example, you have to give the expression (x^(4y)) in the form x^(4y). If you leave out the parentheses, you get (x^4)y instead. It never hurts to put in too many parentheses, but to find out exactly when you need to use parentheses, look at "Operator Input Forms".

Here is a more complicated formula, requiring several parentheses:

Sqrt[2]/9801 (4n)! (1103+26390 n)/(n!^4 396^(4n))

When you type in an expression, the Wolfram System automatically applies its large repertoire of rules for transforming expressions. These rules include the standard rules of algebra, such as x-x==0, together with much more sophisticated rules involving higher mathematical functions.

The Wolfram System uses standard rules of algebra to replace ((((Sqrt[1+x])))^4) by (((1+x))^2):

Sqrt[1+x]^4

The Wolfram System knows no rules for this expression, so it leaves the expression in the original form you gave:

Log[1+Cos[x]]

The notion of transformation rules is a very general one. In fact, you can think of the whole of the Wolfram System as simply a system for applying a collection of transformation rules to many different kinds of expressions.

The general principle that the Wolfram System follows is simple to state. It takes any expression you input, and gets results by applying a succession of transformation rules, stopping when it knows no more transformation rules that can be applied.

The fundamental principle of the Wolfram System.