Wykresy funkcji

1355 days ago by abc12345

def f(x,y): if y != 0 or x != 0: return (x^2+y^2)*sin(1/(x^2+y^2)) else: return 0 
       
P = plot3d(f,(-1,1),(-1,1), adaptive=True, color=rainbow(60, 'rgbtuple'), max_bend=.1, max_depth=15) P.show() 
       
p1 = plot(lambda x: f(x,0.1),x,-1,1, color='blue') p2 = plot(lambda x: f(x,0.5),x,-1,1, color='green') p3 = plot(lambda x: f(x,5),x,-1,1, color='orange') p4 = plot(lambda x: f(x,0),x,-1,1, color='red') p5 = plot(lambda x: f(x,1),x,-1,1, color='black') p1+p2+p3+p4+p5# 
       
g(x,y)=diff(f(x,y),x); p8 = plot(lambda x: g(x,0.005),x,-1,1, color='red',thickness=2) p9 = plot(lambda x: g(x,0.01),x,-1,1, color='blue',thickness=1) p8+p9# 
       
g(x,y)=diff(f(x,y),x); p10 = plot(lambda x: g(x,0.5),x,-1,1, color='red') p11 = plot(lambda x: g(x,1),x,-1,1, color='blue') p12 = plot(lambda x: g(x,1.1),x,-1,1,color='green') p10+p11+p12#