---
title: "Simplify"
language: "en"
type: "Symbol"
summary: "Simplify[expr] performs a sequence of algebraic and other transformations on expr and returns the simplest form it finds. Simplify[expr, assum] does simplification using assumptions."
keywords: 
- algebraic simplification
- artificial intelligence
- assertions
- assumptions
- cleaning up expressions
- combinatorial explosion
- compress expression
- concise form
- constraints
- efficiency
- expressions
- heuristics
- number theory
- predicates
- rearrange expression
- roots
- shortest form
- simplest forms
- simplification
- smallest form
- speed
- square roots
- squash expression
- transformations
- trigonometric simplification
- variables
- combine
- simplify
canonical_url: "https://reference.wolfram.com/language/ref/Simplify.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Formula Manipulation"
    link: "https://reference.wolfram.com/language/guide/FormulaManipulation.en.md"
  - 
    title: "Manipulating Equations"
    link: "https://reference.wolfram.com/language/guide/ManipulatingEquations.en.md"
  - 
    title: "Algebraic Transformations"
    link: "https://reference.wolfram.com/language/guide/AlgebraicTransformations.en.md"
  - 
    title: "Assumptions and Domains"
    link: "https://reference.wolfram.com/language/guide/AssumptionsAndDomains.en.md"
  - 
    title: "Finite Mathematics"
    link: "https://reference.wolfram.com/language/guide/FiniteMathematics.en.md"
related_functions: 
  - 
    title: "FullSimplify"
    link: "https://reference.wolfram.com/language/ref/FullSimplify.en.md"
  - 
    title: "Refine"
    link: "https://reference.wolfram.com/language/ref/Refine.en.md"
  - 
    title: "Factor"
    link: "https://reference.wolfram.com/language/ref/Factor.en.md"
  - 
    title: "Expand"
    link: "https://reference.wolfram.com/language/ref/Expand.en.md"
  - 
    title: "TrigExpand"
    link: "https://reference.wolfram.com/language/ref/TrigExpand.en.md"
  - 
    title: "PowerExpand"
    link: "https://reference.wolfram.com/language/ref/PowerExpand.en.md"
  - 
    title: "ComplexExpand"
    link: "https://reference.wolfram.com/language/ref/ComplexExpand.en.md"
  - 
    title: "PiecewiseExpand"
    link: "https://reference.wolfram.com/language/ref/PiecewiseExpand.en.md"
  - 
    title: "Element"
    link: "https://reference.wolfram.com/language/ref/Element.en.md"
  - 
    title: "FunctionExpand"
    link: "https://reference.wolfram.com/language/ref/FunctionExpand.en.md"
  - 
    title: "ArraySimplify"
    link: "https://reference.wolfram.com/language/ref/ArraySimplify.en.md"
  - 
    title: "ArrayExpand"
    link: "https://reference.wolfram.com/language/ref/ArrayExpand.en.md"
  - 
    title: "Reduce"
    link: "https://reference.wolfram.com/language/ref/Reduce.en.md"
  - 
    title: "Assuming"
    link: "https://reference.wolfram.com/language/ref/Assuming.en.md"
  - 
    title: "TrigReduce"
    link: "https://reference.wolfram.com/language/ref/TrigReduce.en.md"
  - 
    title: "TrigFactor"
    link: "https://reference.wolfram.com/language/ref/TrigFactor.en.md"
related_tutorials: 
  - 
    title: "Simplifying Algebraic Expressions"
    link: "https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#16626"
  - 
    title: "Simplifying with Assumptions"
    link: "https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#12157"
  - 
    title: "Simplification"
    link: "https://reference.wolfram.com/language/tutorial/AlgebraicManipulation.en.md#1259"
  - 
    title: "Putting Expressions into Different Forms"
    link: "https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#21991"
  - 
    title: "Using Assumptions"
    link: "https://reference.wolfram.com/language/tutorial/AlgebraicManipulation.en.md#31833"
  - 
    title: "Implementation notes: Algebra and Calculus"
    link: "https://reference.wolfram.com/language/tutorial/SomeNotesOnInternalImplementation.en.md#20945"
---
# Simplify

Simplify[expr] performs a sequence of algebraic and other transformations on expr and returns the simplest form it finds. 

Simplify[expr, assum] does simplification using assumptions.

## Details and Options

* ``Simplify`` tries expanding, factoring, and doing many other transformations on expressions, keeping track of the simplest form obtained.

* ``Simplify`` can be used on equations, inequalities, and domain specifications.

* Quantities that appear algebraically in inequalities are always assumed to be real.

* ``FullSimplify`` does more extensive simplification than ``Simplify``.

* You can specify default assumptions for ``Simplify`` using ``Assuming``.

* The following options can be given:

|                          |               |                                                                   |
| :----------------------- | :------------ | :---------------------------------------------------------------- |
| Assumptions              | \$Assumptions | default assumptions to append to assum                            |
| ComplexityFunction       | Automatic     | how to assess the complexity of each form generated               |
| TimeConstraint           | 300           | how many seconds to try doing any particular transformation       |
| TransformationFunctions  | Automatic     | functions to try in transforming the expression                   |
| Trig                     | True          | whether to do trigonometric as well as algebraic transformations  |

* Assumptions can consist of equations, inequalities, domain specifications such as ``x∈Integers``, and logical combinations of these.

* With the setting ``TimeConstraint -> {tloc, ttot}``, at most ``tloc`` seconds are spent for any particular transformation, and at most ``ttot`` seconds are spent for all transformations before the best result is returned.

* ``Simplify`` can be used with symbolic array expressions.

---

## Examples (27)

### Basic Examples (3)

```wl
In[1]:= D[Integrate[1 / (x ^ 3 + 1), x], x]

Out[1]= (1/3 (1 + x)) - (-1 + 2 x/6 (1 - x + x^2)) + (2/3 (1 + (1/3) (-1 + 2 x)^2))

In[2]:= Simplify[%]

Out[2]= (1/1 + x^3)
```

---

```wl
In[1]:= Simplify[Sin[x] ^ 2 + Cos[x] ^ 2]

Out[1]= 1
```

---

``Simplify`` can get further if assumptions are made about ``x`` :

```wl
In[1]:= Simplify[Sqrt[x ^ 2]]

Out[1]= Sqrt[x^2]

In[2]:= Simplify[Sqrt[x ^ 2], x > 0]

Out[2]= x

In[3]:= Simplify[Sqrt[x ^ 2], Element[x, Reals]]

Out[3]= Abs[x]
```

### Scope (5)

Simplify a polynomial:

```wl
In[1]:= Simplify[(x - 1)(x + 1)(x ^ 2 + 1) + 1]

Out[1]= x^4
```

Simplify a rational expression:

```wl
In[2]:= Simplify[3 / (x + 3) + x / (x + 3)]

Out[2]= 1
```

Simplify a trigonometric expression:

```wl
In[3]:= Simplify[2Tan[x] / (1 + Tan[x] ^ 2)]

Out[3]= Sin[2 x]
```

Simplify an exponential expression:

```wl
In[4]:= Simplify[(E ^ x - E ^ -x) / Sinh[x]]

Out[4]= 2
```

---

Simplify an equation:

```wl
In[1]:= Simplify[2x - 4y + 6z - 10 == -8]

Out[1]= x + 3 z == 1 + 2 y
```

---

Simplify expressions using assumptions:

```wl
In[1]:= Simplify[1 / Sqrt[x] - Sqrt[1 / x], x > 0]

Out[1]= 0

In[2]:= Simplify[Log[x ^ p], x > 0 && Element[p, Reals]]

Out[2]= p Log[x]

In[3]:= Simplify[Sin[n Pi], Element[n, Integers]]

Out[3]= 0
```

---

Use assumptions to prove inequalities:

```wl
In[1]:= Simplify[x ^ 2 > 3, x > 2]

Out[1]= True

In[2]:= Simplify[Abs[x] < 2, x ^ 2 + y ^ 2 < 4]

Out[2]= True
```

---

Simplify symbolic array expressions:

```wl
In[1]:= Simplify[a.b + 2a.c]

Out[1]= a.(b + 2 c)

In[2]:= Simplify[m.Inverse[m], Element[m, Matrices[{n, n}]]]

Out[2]= SymbolicIdentityArray[{n}]

In[3]:=
a = MatrixSymbol["a", {n, n}];
Simplify[Tr[Transpose[KroneckerProduct[Transpose[a], a]]]]

Out[3]= Tr[MatrixSymbol["a", {n, n}]]^2

In[4]:= Simplify[D[(VectorSymbol["v", n] + x).(VectorSymbol["v", n] + x), x], Element[x, Complexes]]

Out[4]= 2 Total[x + VectorSymbol["v", n]]
```

### Options (10)

#### Assumptions (3)

Assumptions can be given both as an argument and as an option value:

```wl
In[1]:= Simplify[Cos[k Pi] ^ m, Element[k, Integers], Assumptions -> Mod[m, 2] == 0]

Out[1]= 1
```

---

The default value of the ``Assumptions`` option is ``\$Assumptions`` :

```wl
In[1]:= Assuming[x > 0, Simplify[Sqrt[x ^ 2]]]

Out[1]= x

In[2]:= Simplify[Sqrt[x ^ 2]]

Out[2]= Sqrt[x^2]
```

---

When assumptions are given as an argument, ``\$Assumptions`` is used as well:

```wl
In[1]:= Assuming[x > 0, Simplify[Sqrt[x ^ 2 y ^ 2], y < 0]]

Out[1]= -x y
```

Specifying assumptions as an option value prevents ``Simplify`` from using ``\$Assumptions`` :

```wl
In[2]:= Assuming[x > 0, Simplify[Sqrt[x ^ 2 y ^ 2], Assumptions -> y < 0]]

Out[2]= -Sqrt[x^2] y
```

#### ComplexityFunction (2)

The default ``ComplexityFunction`` counts the subexpressions and digits of integers:

```wl
In[1]:= Simplify[100 Log[2]]

Out[1]= 100 Log[2]
```

``LeafCount`` counts only the number of subexpressions:

```wl
In[2]:= Simplify[100 Log[2], ComplexityFunction -> LeafCount]

Out[2]= Log[1267650600228229401496703205376]
```

---

With the default ``ComplexityFunction``, ``Abs[x]`` is simpler than the ``FullForm`` of ``-x`` :

```wl
In[1]:= Simplify[Abs[x], x < 0]

Out[1]= Abs[x]

In[2]:= Map[FullForm, {Abs[x], -x}]

Out[2]= {Abs[x], Times[-1, x]}
```

This complexity function makes ``Abs`` more expensive than ``Times`` :

```wl
In[3]:= f[e_] := 100Count[e, _Abs, {0, Infinity}] + LeafCount[e]

In[4]:= Simplify[Abs[x], x < 0, ComplexityFunction -> f]

Out[4]= -x
```

#### ExcludedForms (1)

This gives no simplification:

```wl
In[1]:= Simplify[(x - 1)(x + 1)(x ^ 2 + 1)(x - 2) ^ 10]

Out[1]= (-2 + x)^10 (-1 + x) (1 + x) (1 + x^2)
```

Excluding transformations of ``(x - 2) ^ 10`` allows ``Simplify`` to expand the remaining terms:

```wl
In[2]:= Simplify[(x - 1)(x + 1)(x ^ 2 + 1)(x - 2) ^ 10, ExcludedForms -> {(_Plus) ^ _}]

Out[2]= (-2 + x)^10 (-1 + x^4)
```

#### TimeConstraint (2)

This takes a long time, due to trigonometric expansion, but does not yield a simplification:

```wl
In[1]:= Simplify[2Sin[10x + 11y + 12z]Cos[10x + 10y + 10t]]//Timing

Out[1]= {32.218, 2 Cos[10 (t + x + y)] Sin[10 x + 11 y + 12 z]}
```

Use ``TimeConstraint`` to limit the time spent on any single transformation:

```wl
In[2]:= Simplify[2Sin[10x + 11y + 12z]Cos[10x + 10y + 10t], TimeConstraint -> 1]//Timing
```

Simplify::time: Time spent on a transformation exceeded 1 seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.

Simplify::time: Time spent on a transformation exceeded 1 seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.

```wl
Out[2]= {2.156, 2 Cos[10 (t + x + y)] Sin[10 x + 11 y + 12 z]}
```

---

A similar example, where the transformation yields a simplification:

```wl
In[1]:= Simplify[2Sin[10x + 11y + 12z]Cos[10x + 10y + 10z]]//Timing

Out[1]= {18.188, Sin[y + 2 z] + Sin[20 x + 21 y + 22 z]}
```

In this case, setting ``TimeConstraint`` prevents some simplification:

```wl
In[2]:= Simplify[2Sin[10x + 11y + 12z]Cos[10x + 10y + 10z], TimeConstraint -> 1]//Timing
```

Simplify::time: Time spent on a transformation exceeded 1 seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.

Simplify::time: Time spent on a transformation exceeded 1 seconds, and the transformation was aborted. Increasing the value of TimeConstraint option may improve the result of simplification.

```wl
Out[2]= {2.766, 2 Cos[10 (x + y + z)] Sin[10 x + 11 y + 12 z]}
```

#### TransformationFunctions (1)

Here ``Simplify`` uses ``t`` as the only transformation:

```wl
In[1]:= t[e_] := PolynomialReduce[e, {s ^ 2 + c ^ 2 - 1}, {c, s}][[2]]

In[2]:= Simplify[(c ^ 3 - s ^ 3) ^ 2 - (s ^ 3 + c ^ 3) ^ 2, TransformationFunctions -> {t}]

Out[2]= -4 c s^3 + 4 c s^5
```

Here ``Simplify`` uses both ``t`` and all built-in transformations:

```wl
In[3]:= Simplify[(c ^ 3 - s ^ 3) ^ 2 - (s ^ 3 + c ^ 3) ^ 2, TransformationFunctions -> {Automatic, t}]

Out[3]= 4 c s^3 (-1 + s^2)
```

#### Trig (1)

By default, ``Simplify`` uses trigonometric identities:

```wl
In[1]:= Simplify[4Sin[x] ^ 2Cos[x] ^ 2 + 4Sin[x]Cos[x] + 1]

Out[1]= (Cos[x] + Sin[x])^4
```

With ``Trig -> False``, ``Simplify`` does not use trigonometric identities:

```wl
In[2]:= Simplify[4Sin[x] ^ 2Cos[x] ^ 2 + 4Sin[x]Cos[x] + 1, Trig -> False]

Out[2]= (1 + 2 Cos[x] Sin[x])^2
```

### Applications (4)

Prove that a solution satisfies its equations:

```wl
In[1]:= Solve[x ^ 2 + x + 1 == 0, x]

Out[1]= {{x -> -(-1)^1 / 3}, {x -> (-1)^2 / 3}}

In[2]:= x ^ 2 + x + 1 == 0 /. %//Simplify

Out[2]= {True, True}

In[3]:= DSolve[y''[x] + y[x] == Exp[x], y, x]

Out[3]= {{y -> Function[{x}, C[1] Cos[x] + C[2] Sin[x] + (1/2) E^x (Cos[x]^2 + Sin[x]^2)]}}

In[4]:= y''[x] + y[x] == Exp[x] /. First[%]//Simplify

Out[4]= True

In[5]:= RSolve[y[k + 2] + y[k] == 2 ^ k, y, k]

Out[5]= {{y -> Function[{k}, (2^k/5) + I^k C[1] + (-I)^k C[2]]}}

In[6]:= y[k + 2] + y[k] == 2 ^ k /. First[%]//Simplify

Out[6]= True
```

---

Show that the arithmetic mean is larger than the geometric one:

```wl
In[1]:= Simplify[(x + y) / 2 >= Sqrt[x y], x >= 0 && y >= 0]

Out[1]= True
```

---

This applies Fermat's little theorem:

```wl
In[1]:= Simplify[Mod[a ^ p, p], a∈Integers && p∈Primes]

Out[1]= Mod[a, p]
```

---

Prove commutativity from Wolfram's minimal axiom for Boolean algebra:

```wl
In[1]:= Simplify[f[a, b] == f[b, a], ForAll[{p, q, r}, f[f[f[p, q], r], f[p, f[f[p, r], p]]] == r]]

Out[1]= True
```

### Properties & Relations (3)

Use ``Assuming`` to propagate assumptions:

```wl
In[1]:= Assuming[x > 0, Simplify[Sqrt[x ^ 2]]]

Out[1]= x
```

---

Use ``FullSimplify`` to simplify expressions involving special functions:

```wl
In[1]:= Simplify[Gamma[x] Gamma[1 - x]]

Out[1]= Gamma[1 - x] Gamma[x]

In[2]:= FullSimplify[%]

Out[2]= π Csc[π x]
```

---

``ArraySimplify`` performs only array transformations:

```wl
In[1]:= v = VectorSymbol["v", n / 2 + m / 2];

In[2]:= ArraySimplify[v - Transpose[v]]

Out[2]= SymbolicZerosArray[{(m/2) + (n/2)}]
```

``Simplify`` performs other transformations as well:

```wl
In[3]:= Simplify[v - Transpose[v]]

Out[3]= SymbolicZerosArray[{(m + n/2)}]
```

### Possible Issues (2)

The Wolfram Language evaluates zero times a symbolic expression to zero:

```wl
In[1]:= 0 symbolic

Out[1]= 0
```

This happens even if the symbolic expression is always infinite:

```wl
In[2]:= hiddenzero = x ^ 2 + 2x + 1 - (x + 1) ^ 2;

In[3]:= 0 / hiddenzero

Out[3]= 0
```

Because of this, results of simplification of expressions with singularities are uncertain:

```wl
In[4]:= anotherhiddenzero = Sin[x] ^ 2 + Cos[x] ^ 2 - 1;

In[5]:= betterhiddenzero = Gamma[x + 1] - x Gamma[x];

In[6]:= Map[Simplify, {hiddenzero / anotherhiddenzero, anotherhiddenzero / hiddenzero, hiddenzero / betterhiddenzero, betterhiddenzero / hiddenzero}]
```

Simplify::infd: Expression (-1+Cos[x]^2+Sin[x]^2)/(1+2 x+x^2-(1+x)^2) simplified to Indeterminate.

Simplify::infd: Expression (-x Gamma[x]+Gamma[1+x])/(1+2 x+x^2-(1+x)^2) simplified to ComplexInfinity.

```wl
Out[6]= {0, Indeterminate, 0, ComplexInfinity}
```

In this case, ``FullSimplify`` recognizes the zero:

```wl
In[7]:= FullSimplify[betterhiddenzero]

Out[7]= 0
```

---

Results of simplification may depend on the names of symbols:

```wl
In[1]:= Simplify[(1 - a ^ 2) / b ^ 2, a ^ 2 + b ^ 2 == 1]

Out[1]= 1

In[2]:= Simplify[(1 - c ^ 2) / b ^ 2, c ^ 2 + b ^ 2 == 1]

Out[2]= (1 - c^2/b^2)
```

## See Also

* [`FullSimplify`](https://reference.wolfram.com/language/ref/FullSimplify.en.md)
* [`Refine`](https://reference.wolfram.com/language/ref/Refine.en.md)
* [`Factor`](https://reference.wolfram.com/language/ref/Factor.en.md)
* [`Expand`](https://reference.wolfram.com/language/ref/Expand.en.md)
* [`TrigExpand`](https://reference.wolfram.com/language/ref/TrigExpand.en.md)
* [`PowerExpand`](https://reference.wolfram.com/language/ref/PowerExpand.en.md)
* [`ComplexExpand`](https://reference.wolfram.com/language/ref/ComplexExpand.en.md)
* [`PiecewiseExpand`](https://reference.wolfram.com/language/ref/PiecewiseExpand.en.md)
* [`Element`](https://reference.wolfram.com/language/ref/Element.en.md)
* [`FunctionExpand`](https://reference.wolfram.com/language/ref/FunctionExpand.en.md)
* [`ArraySimplify`](https://reference.wolfram.com/language/ref/ArraySimplify.en.md)
* [`ArrayExpand`](https://reference.wolfram.com/language/ref/ArrayExpand.en.md)
* [`Reduce`](https://reference.wolfram.com/language/ref/Reduce.en.md)
* [`Assuming`](https://reference.wolfram.com/language/ref/Assuming.en.md)
* [`TrigReduce`](https://reference.wolfram.com/language/ref/TrigReduce.en.md)
* [`TrigFactor`](https://reference.wolfram.com/language/ref/TrigFactor.en.md)

## Tech Notes

* [Simplifying Algebraic Expressions](https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#16626)
* [Simplifying with Assumptions](https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#12157)
* [Simplification](https://reference.wolfram.com/language/tutorial/AlgebraicManipulation.en.md#1259)
* [Putting Expressions into Different Forms](https://reference.wolfram.com/language/tutorial/AlgebraicCalculations.en.md#21991)
* [Using Assumptions](https://reference.wolfram.com/language/tutorial/AlgebraicManipulation.en.md#31833)
* [Implementation notes: Algebra and Calculus](https://reference.wolfram.com/language/tutorial/SomeNotesOnInternalImplementation.en.md#20945)

## Related Guides

* [Formula Manipulation](https://reference.wolfram.com/language/guide/FormulaManipulation.en.md)
* [Manipulating Equations](https://reference.wolfram.com/language/guide/ManipulatingEquations.en.md)
* [Algebraic Transformations](https://reference.wolfram.com/language/guide/AlgebraicTransformations.en.md)
* [Assumptions and Domains](https://reference.wolfram.com/language/guide/AssumptionsAndDomains.en.md)
* [Finite Mathematics](https://reference.wolfram.com/language/guide/FiniteMathematics.en.md)

## Related Links

* [NKS\|Online](http://www.wolframscience.com/nks/search/?q=Simplify)
* [A New Kind of Science](http://www.wolframscience.com/nks/)

## History

* Introduced in 1988 (1.0) \| Updated in 1996 (3.0) ▪ 1999 (4.0) ▪ 2000 (4.1) ▪ 2002 (4.2) ▪ 2003 (5.0) ▪ [2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100.en.md) ▪ [2025 (14.2)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn142.en.md)