You can use the Boolean command If (see command If) in order to create a conditional function.
Note: You can use derivatives and integrals of such functions and intersect them like “normal” functions.
Example:
f(x) = If[x < 3, sin(x), x^2] gives you a function that equals
· sin(x) for x < 3 and
· x2 for x ≥ 3.
Related Topics