Simplifying with Assumptions

Simplify[expr,assum]simplify expr with assumptions

Simplifying with assumptions.

The Wolfram Language does not automatically simplify this, since it is only true for some values of .
In[1]:=
Click for copyable input
Out[1]=
is equal to for , but not otherwise.
In[2]:=
Click for copyable input
Out[2]=
This tells Simplify to make the assumption , 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 and 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 are elements of the domain dom
Realsreal numbers
Integersintegers
Primesprime numbers

Some domains used in assumptions.

This simplifies assuming that is a real number.
In[7]:=
Click for copyable input
Out[7]=
This simplifies the sine assuming that 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 , but not , is real when is real.
In[10]:=
Click for copyable input
Out[10]=