zadanie 3

1481 days ago by jr345431

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),x,-1,1, color='blue') p2 = plot(lambda x: f(x,0.1),x,-1,1, color='green') p3 = plot(lambda x: f(x,0.5),x,-1,1, color='red') p4 = plot(lambda x: f(x,1.5),x,-1,1, color='black') show(p1+p2+p3+p4) 
       
def g(x,y): if y != 0 or x != 0: return 2*x*(sin(1/(x^2+y^2))-cos(1/(x^2+y^2))/(x^2+y^2)) else: return 0 q1 = plot(lambda x: g(x,0.005),x,-1,1, color='blue') q2 = plot(lambda x: g(x,0.01),x,-1,1, color='green') q3 = plot(lambda x: g(x,0.5),x,-1,1, color='blue') q4 = plot(lambda x: g(x,1),x,-1,1, color='red') q5 = plot(lambda x: g(x,1.1),x,-1,1, color='green') show(q1+q2) show(q3+q4+q5)