% OCW Universidad de Cantabria
% Cálculo Simbólico y Numérico en Ecuaciones Diferenciales
% © Cursos 2001-2014,  M. Eugenia Pérez, UC
%
syms  x;
f=sin(x)
g=cos(x)
ezplot(f,[-10,10])
axis([-10 10 -2 2])%  
pause
%  
w2=subs(f,x,x-2*0.25)*(+1/4);
w1=subs(f,x,x+2*0.25)*(3/4);
w=(w1+w2);
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pause
%  
w2=subs(f,x,x-2*0.5)*(+1/4);
w1=subs(f,x,x+2*0.5)*(3/4);
w=(w1+w2)
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pause
w2=subs(f,x,x-2)*(+1/4);
w1=subs(f,x,x+2)*(3/4);
w=(w1+w2)
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pause
w2=subs(f,x,x-2*1.5)*(+1/4);
w1=subs(f,x,x+2*1.5)*(3/4);
w=(w1+w2)
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pause
w2=subs(f,x,x-2*2)*(+1/4);
w1=subs(f,x,x+2*2)*(3/4);
w=(w1+w2)
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pausew2=subs(f,x,x-2*2.5)*(+1/4);
w1=subs(f,x,x+2*2.5)*(3/4);
w=(w1+w2)
ezplot(w,[-10,10])
axis([-10 10 -2 2])
pause
%  
syms x t
solucion=(subs(f,x,x+2*t)*(3/4)+subs(f,x,x-2*t)*(1/4))
ezsurf(solucion,[0,4],[-10,10])
 