Simplify an expression (simplify)
Simplify an expression, optionally under assumptions.
With this function, the solver shows the steps whenever it finds them.
How to write it
simplify(expr)
Simplify the expression.
- expr
- Any expression: a number, a formula, a list or a matrix. Takes an expression.
simplify(expr, assuming = value)
Simplify under an assumption about the variables.
- expr
- Any expression: a number, a formula, a list or a matrix. Takes an expression.
- assuming = value
- What to assume about the variables, such as x > 0. Takes a condition, true or false.
Examples
simplify(sin(x)^2 + cos(x)^2)In the solver,
Open in the solversimplify(sin(x)^2 + cos(x)^2)gives1.simplify((x^2 - 1)/(x - 1))In the solver,
Open in the solversimplify((x^2 - 1)/(x - 1))givesx + 1.simplify(sqrt(x^2), assuming = x > 0)In the solver,
Open in the solversimplify(sqrt(x^2), assuming = x > 0)givesx.
Functions its examples use
Related functions
- full_simplify
Search harder than simplify for a simpler form, under assumptions.
- subs
Substitute a rule, or a list of rules, in an expression.
- resultant
Resultant of two polynomials in a variable.
- to_radicals
Write algebraic numbers, given as roots of polynomials, with radicals.
- power_expand
Expand powers and logarithms of products and powers.
- together
Combine fractions into one over a common denominator.