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()
Thank you so much Danke sehr, ndomes Merci !
If that was the correct answer, then please click the little check mark near it so that people coming to this question can find it easily. Thanks!
Asked: 10 years ago
Seen: 336 times
Last updated: Nov 12 '14