clear; clc; format long
syms x
f=100*1e6;
w=2*pi*f;
L=0.1e-6;
R=100;
f=(w.*(R./L))./((((1./(L.*x))-w*w).^2)+((w.*(R./L)).^2)).^(0.5);
gf=diff(f,x);
e=1e-21;
x=0.2e-10;
 for m=1:1:1000
     x0=x;
     x=x+e*eval(gf);
     if abs(x-x0) < 1e-23
         break;
     end
 end
 display(x);
 display(m);
 C=-1e-10:1e-15:1e-10;
 L=0.1e-6;
 R=100;
 f=(w.*(R./L))./((((1./(L.*C))-w*w).^2)+((w.*(R./L)).^2)).^(0.5);
 plot(C,f); hold on
%  plot(x,f); hold off