Simplification

Simplifying expressions.

The Wolfram Language does not automatically simplify an algebraic expression like this:

(1-x)/(1-x^2)

(RefLink[Simplify, paclet:ref/Simplify]) performs the simplification:

Simplify[%]

(RefLink[Simplify, paclet:ref/Simplify]) performs standard algebraic and trigonometric simplifications:

Simplify[Sin[x]^2+Cos[x]^2]

It does not, however, do more sophisticated transformations that involve, for example, special functions:

Simplify[Gamma[1+n]/n]

(RefLink[FullSimplify, paclet:ref/FullSimplify]) does perform such transformations:

FullSimplify[%]

Controlling simplification.

Here is an expression involving trigonometric functions and square roots:

t=(1-Sin[x]^2) Sqrt[Expand[(1+Sqrt[2])^20]]

By default, (RefLink[FullSimplify, paclet:ref/FullSimplify]) will try to simplify everything:

FullSimplify[t]

This makes (RefLink[FullSimplify, paclet:ref/FullSimplify]) avoid simplifying the square roots:

FullSimplify[t,ExcludedForms->Sqrt[_]]

Further control of simplification.

In both (RefLink[Simplify, paclet:ref/Simplify]) and (RefLink[FullSimplify, paclet:ref/FullSimplify]) there is always an issue of what counts as the "simplest" form of an expression. You can use the option (RefLink[ComplexityFunction, paclet:ref/ComplexityFunction])->c to provide a function to determine this. The function will be applied to each candidate form of the expression, and the one that gives the smallest numerical value will be considered simplest.

With its default definition of simplicity, (RefLink[Simplify, paclet:ref/Simplify]) leaves this unchanged:

Simplify[4 Log[10]]

This now tries to minimize the number of elements in the expression:

Simplify[4 Log[10],ComplexityFunction->LeafCount]