# 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

.

Out[1]= | |

is equal to

for

, but not otherwise.

Out[2]= | |

This tells

Simplify to make the assumption

, so that simplification can proceed.

Out[3]= | |

No automatic simplification can be done on this expression.

Out[4]= | |

If

and

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[{x_{1},x_{2},...},dom] | state that all the are elements of the domain dom |

Reals | real numbers |

Integers | integers |

Primes | prime numbers |

Some domains used in assumptions.

This simplifies

assuming that

is a real number.

Out[7]= | |

This simplifies the sine assuming that

is an integer.

Out[8]= | |

With the assumptions given, Fermat's little theorem can be used.

Out[9]= | |

This uses the fact that

, but not

, is real when

is real.

Out[10]= | |