function[r] = sol4(n)
y=200*n;
x=linspace(0,n,y);
z=tan(x);
w=z-x;
for i=1:y-1
    if w(i)<0 & w(i+1)>0;
        t(i)=1;
    else
        t(i)=0;
    end
end

s=find(t);
a=length(s);
for j=1:a
    c(j)=(s(j)-1)*0.005;
end
for j=1:a
    b(j,1)=c(j);
end
for j=1:a
for i=2:1000
    b(j,i)=b(j,i-1)-(((tan(b(j,i-1)))-(b(j,i-1)))/(((sec(b(j,i-1)))^2)-1));
    
end
end
for j=1:a
    r(j)=b(j,1000);
end
end




