function z1=edyy2(a)
hold off
axis([-2,2,-2,2])
x=-2:0.01:2;
if x==0
y==0;
else
y=x.^2.*sin(1./x);
plot(x,y,'-g')
hold on
plot(x,a,'-b');
plot(x,-a,'-b');
m=moviein(16);
for k=-2:0.01:0
if sqrt((k.^2.*sin(1./k)).^2)<a;
z1=k;
break;
end
end
n1=floor(z1)+1;
t=-2:0.01:-1.5
axis([-2,2,-2,2])
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=-1.5:0.01:-1
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=-1:0.01:-0.5
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=-0.5:0.01:n1
axis([-2,2,-2,2])
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
m(:,n1+4)=getframe;
end
e=-2:0.01:a;
n2=length(e);
n3=n1*ones(1,n2);
plot(n3,e,'.g')
m(:,n1+1)=getframe;
for i=2:0.01:0
if (i.^2.*sin(1./i))<a
z1=i;
break;
end
end
n4=floor(z1)+1;
t=2:-0.01:1.5
axis([-2,2,-2,2])
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=1.5:-0.01:1
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=1:-0.01:0.5
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
t=0.5:-0.01:n4
y=t.^2.*sin(1./t);
plot(t,-2,'.r');
plot(t,y,'.r');
m(:,n4+4)=getframe;
e=-2:0.01:a;
n2=length(e);
n5=n4*ones(1,n2);
plot(n5,e,'.g')
m(:,n4+1)=getframe;
movie(m,30)