WLJS LogoWLJS Notebook

ConditionalExpression

ConditionalExpression[expr, cond] is a symbolic construct that represents the expression expr when the condition cond is True.

Examples

Create a conditional expression:

ConditionalExpression[x^2, x > 0]

Solve an equation with conditions:

Solve[x^2 == 4, x]
(* {{x -> ConditionalExpression[-2, True]}, {x -> ConditionalExpression[2, True]}} *)

Please visit the official Wolfram Language Reference for more details.

On this page