How do I define a piecewise function?

add a comment

1

Okay, this is actually well documented, though the actual behavior of Piecewise functions leaves a lot to be desired (as the original implementor, David Joyner, would be the first to admit) - nonetheless you can do a fair amount with them, though sometimes not with the same syntax as the rest of Sage.

Try

`sage: sage.functions.piecewise??`

as well as the documentation for `Piecewise`

and `PiecewisePolynomial`

.

Asked: **
2010-09-25 08:04:52 -0500
**

Seen: **366 times**

Last updated: **Sep 25 '10**

defining multivariate piecewise function

Piecewise Symbolic Function with Conditional Statement

Defining a function and forcing max or min value

How to dynamically substitute a variable in a callable function?

expand hyperbolic trig functions

How to make a function return a value

Function value at parametric path

How to declare variable for a function with other variable?

How to make a function of 'fname' that produce a file named 'fname'

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.