This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Simplifying with Assumptions

Simplify[expr,assum]simplify expr with assumptions

Simplifying with assumptions.

Mathematica does not automatically simplify this, since it is only true for some values of x.
In[1]:=
Click for copyable input
Out[1]=
is equal to x for x≥0, but not otherwise.
In[2]:=
Click for copyable input
Out[2]=
This tells Simplify to make the assumption x>0, so that simplification can proceed.
In[3]:=
Click for copyable input
Out[3]=
No automatic simplification can be done on this expression.
In[4]:=
Click for copyable input
Out[4]=
If a and b are assumed to be positive, the expression can however be simplified.
In[5]:=
Click for copyable input
Out[5]=
Here is a simple example involving trigonometric functions.
In[6]:=
Click for copyable input
Out[6]=
Element[x,dom]state that x is an element of the domain dom
Element[{x1,x2,...},dom]state that all the xi are elements of the domain dom
Realsreal numbers
Integersintegers
Primesprime numbers

Some domains used in assumptions.

This simplifies assuming that x is a real number.
In[7]:=
Click for copyable input
Out[7]=
This simplifies the sine assuming that n is an integer.
In[8]:=
Click for copyable input
Out[8]=
With the assumptions given, Fermat's Little Theorem can be used.
In[9]:=
Click for copyable input
Out[9]=
This uses the fact that sin (x), but not arcsin (x), is real when x is real.
In[10]:=
Click for copyable input
Out[10]=