Ask Your Question
0

Am I not inside the domain ?

asked 10 years ago

jpapot gravatar image

updated 10 years ago

slelievre gravatar image
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.

?**

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 10 years ago

ndomes gravatar image

Plotting a piecewise function is different to plotting 'normal' functions.

f = Piecewise([[(0,pi/2),-1],[(pi/2,pi),2]]) 
f.plot()
Preview: (hide)
link

Comments

Thank you so much Danke sehr, ndomes Merci !

jpapot gravatar imagejpapot ( 10 years ago )

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!

kcrisman gravatar imagekcrisman ( 10 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 10 years ago

Seen: 336 times

Last updated: Nov 12 '14