
%ejercico 1a

x=linspace(0,pi/2);


    df=2*x;

    dg=1./(1+x.^2);
    
  

plot(x,2*x-1./(1+x.^2))
hold on


cero=fzero(@(x)2*x-1./(1+x.^2),0.3)

%ejercicio 1b

figure(2)
f=x.^2;
g=atan(x);

plot(x,f,'r')
hold on
plot(x,g,'k')
plot(x,df,'g')
plot(x,dg,'m')
legend('f(x)','g(x)','df(x)','dg(x)')
