ConditionalExpression
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)Summary of the most common use cases
Scope (16)Survey of the scope of standard use cases

https://wolfram.com/xid/0dqugjdgcya-b1hzuw


https://wolfram.com/xid/0dqugjdgcya-euq3ht

Conditionally valid integration results:

https://wolfram.com/xid/0dqugjdgcya-c75eqh

Conditionally valid summation results:

https://wolfram.com/xid/0dqugjdgcya-i37g60

Conditionally valid Fourier series:

https://wolfram.com/xid/0dqugjdgcya-fw1ucc

ConditionalExpression with True or False conditions:

https://wolfram.com/xid/0dqugjdgcya-jxjhh1


https://wolfram.com/xid/0dqugjdgcya-7utty

Mathematical functions with ConditionalExpression arguments:

https://wolfram.com/xid/0dqugjdgcya-bq6v1r

Boolean combinations of equations and inequalities involving ConditionalExpression:

https://wolfram.com/xid/0dqugjdgcya-dqtz25


https://wolfram.com/xid/0dqugjdgcya-cl6fn8

Inverse of a function with a restricted domain:

https://wolfram.com/xid/0dqugjdgcya-q8k1h

Simplify a conditional expression:

https://wolfram.com/xid/0dqugjdgcya-51bl

Find solutions of equations involving conditional expressions:

https://wolfram.com/xid/0dqugjdgcya-k7rt3

Plot a function with a restricted domain:

https://wolfram.com/xid/0dqugjdgcya-6s6h

Piecewise function involving conditional expressions:

https://wolfram.com/xid/0dqugjdgcya-bbvbvc

Transform a conditionally valid expression:

https://wolfram.com/xid/0dqugjdgcya-ghxxhi


https://wolfram.com/xid/0dqugjdgcya-hd720v

Conditionally valid expressions in calculus functions:

https://wolfram.com/xid/0dqugjdgcya-b3vivj


https://wolfram.com/xid/0dqugjdgcya-conu17


https://wolfram.com/xid/0dqugjdgcya-beqx6k

Properties & Relations (4)Properties of the function, and connections to other functions
ConditionalExpression with True condition evaluates to its first argument:

https://wolfram.com/xid/0dqugjdgcya-bgzdqf

ConditionalExpression with False condition evaluates to Undefined:

https://wolfram.com/xid/0dqugjdgcya-fulb

ConditionalExpression is propagated from the arguments of mathematical functions:

https://wolfram.com/xid/0dqugjdgcya-i3161

ConditionalExpression is propagated from the arguments of equations and inequalities:

https://wolfram.com/xid/0dqugjdgcya-ch4zak

ConditionalExpression is propagated from the arguments of Boolean functions:

https://wolfram.com/xid/0dqugjdgcya-dkivbn

For functions taking the Assumptions option, argument conditions are used as assumptions:

https://wolfram.com/xid/0dqugjdgcya-8rl8m

Refine, Simplify, and FullSimplify use the conditions to transform the values:

https://wolfram.com/xid/0dqugjdgcya-n6fh55

Possible Issues (1)Common pitfalls and unexpected behavior
For functions taking the Assumptions option, argument conditions are used as assumptions:

https://wolfram.com/xid/0dqugjdgcya-cvj1h4

ConditionalExpression subexpressions that are not arguments are not used:

https://wolfram.com/xid/0dqugjdgcya-uw5r5

Wolfram Research (2010), ConditionalExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/ConditionalExpression.html.
Text
Wolfram Research (2010), ConditionalExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/ConditionalExpression.html.
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.
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
Wolfram Language. (2010). ConditionalExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ConditionalExpression.html
BibTeX
@misc{reference.wolfram_2025_conditionalexpression, author="Wolfram Research", title="{ConditionalExpression}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/ConditionalExpression.html}", note=[Accessed: 14-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_conditionalexpression, organization={Wolfram Research}, title={ConditionalExpression}, year={2010}, url={https://reference.wolfram.com/language/ref/ConditionalExpression.html}, note=[Accessed: 14-May-2025
]}