ConditionalExpression
ConditionalExpression[expr,cond]
is a symbolic construct that represents the expression expr when the condition cond is True.
Details
- ConditionalExpression[expr,True] evaluates to expr.
- ConditionalExpression[expr,False] evaluates to Undefined.
- ConditionalExpression is automatically propagated from the arguments of mathematical functions, equations and inequalities, and Boolean operators, i.e. h[ConditionalExpression[e1,c1],ConditionalExpression[e2,c2],…] is transformed to ConditionalExpression[h[e1,e2,…],c1&&c2&&⋯].
- If a function takes assumptions, then the conditional part of ConditionalExpression arguments gets added to the assumptions.
- Algebraic transformation functions applied to a conditional expression apply to the first argument.
Examples
open allclose allBasic Examples (2)
Scope (16)
Conditionally valid integration results:
Conditionally valid summation results:
Conditionally valid Fourier series:
ConditionalExpression with True or False conditions:
Mathematical functions with ConditionalExpression arguments:
Boolean combinations of equations and inequalities involving ConditionalExpression:
Inverse of a function with a restricted domain:
Simplify a conditional expression:
Find solutions of equations involving conditional expressions:
Plot a function with a restricted domain:
Piecewise function involving conditional expressions:
Properties & Relations (4)
ConditionalExpression with True condition evaluates to its first argument:
ConditionalExpression with False condition evaluates to Undefined:
ConditionalExpression is propagated from the arguments of mathematical functions:
ConditionalExpression is propagated from the arguments of equations and inequalities:
ConditionalExpression is propagated from the arguments of Boolean functions:
For functions taking the Assumptions option, argument conditions are used as assumptions:
Refine, Simplify, and FullSimplify use the conditions to transform the values:
Possible Issues (1)
For functions taking the Assumptions option, argument conditions are used as assumptions:
ConditionalExpression subexpressions that are not arguments are not used:
Text
Wolfram Research (2010), ConditionalExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/ConditionalExpression.html.
CMS
Wolfram Language. 2010. "ConditionalExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ConditionalExpression.html.
APA
Wolfram Language. (2010). ConditionalExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ConditionalExpression.html