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`

.

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2010-09-25 15:04:52 +0200 **

Seen: **616 times**

Last updated: **Sep 25 '10**

plot issue with a self-defined piecewise function

Defining a function and forcing max or min value

automatic substitution within functions?

Numerical integration in a function

How does sage deal with choosing branches? Examples?

Using matrix elements as arguments

How to limit the number digits of constants in displayed real numbers?

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.