Ask Your Question
0

Am I not inside the domain ?

asked 2014-11-11 08:33:58 +0100

jpapot gravatar image

updated 2014-11-12 07:07:39 +0100

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.

?**

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-11 09:49:22 +0100

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()
edit flag offensive delete link more

Comments

Thank you so much Danke sehr, ndomes Merci !

jpapot gravatar imagejpapot ( 2014-11-11 13:03:00 +0100 )edit

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 ( 2014-11-11 15:32:28 +0100 )edit

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: 2014-11-11 08:33:58 +0100

Seen: 319 times

Last updated: Nov 12 '14