Am I not inside the domain ?
x=var('x')
f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]])
plot(f(x),(x,0,pi))
**?
ValueError: Value not defined outside of domain.
?**
x=var('x')
f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]])
plot(f(x),(x,0,pi))
**?
ValueError: Value not defined outside of domain.
?**
Plotting a piecewise function is different to plotting 'normal' functions.
f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]])
f.plot()
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2014-11-11 08:33:58 +0100
Seen: 322 times
Last updated: Nov 12 '14
How do I define a piecewise function?
Piecewise, Sage VS Mathematica
Coercion problem while defining piecewise function
Contour Plot not working with pseudo-piecewise function
Plot picewise function + infinity, error message
Two piecewise defined functions in one plot
Plot every piece of a piecewise defined function in another color?