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.
| Out[1]= |  |
|
 is equal to x for x≥0, but not otherwise.
| Out[2]= |  |
|
This tells Simplify to make the assumption x>0, so that simplification can proceed.
| Out[3]= |  |
|
No automatic simplification can be done on this expression.
| Out[4]= |  |
|
If a and b are assumed to be positive, the expression can however be simplified.
| Out[5]= |  |
|
Here is a simple example involving trigonometric functions.
| 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 |
| Reals | real numbers |
| Integers | integers |
| Primes | prime numbers |
Some domains used in assumptions.
This simplifies  assuming that x is a real number.
| Out[7]= |  |
|
This simplifies the sine assuming that n is an integer.
| Out[8]= |  |
|
With the assumptions given, Fermat's Little Theorem can be used.
| Out[9]= |  |
|
This uses the fact that sin (x), but not arcsin (x), is real when x is real.
| Out[10]= |  |
|