Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

refine function

Simplify an expression using an assumption.

How to write it

refine(expr, p)

expr
Any expression: a number, a formula, a list or a matrix. Takes an expression.
p
What to assume, such as x > 0. Takes a condition, true or false.

Examples

  • refine⁡(x2,x>0)=x\displaystyle \operatorname{refine}(\sqrt{x^{2}}, x > 0) = x
    refine(sqrt(x^2), x > 0)

    In the solver, refine(sqrt(x^2), x > 0) gives x.

    Open in the solver

Functions its examples use

  • sqrt

    Square root; sqrt(x) is the power x^(1/2).