t=linspace(0,2*pi,100)
y1=sin(t)
y2=t
y3=t-(t**3)/6+(t**5)/120
plot(t,y1,t,y2,'--',t,y3,'o')
axis([0,5,-1,5])
xlabel('t')
ylabel('approximations of sin(t)')
title('fun with sin(t)')
text(3.5,0,'sin(t)')
text(0.5,2.2,'linear approximation')
text(4.2,2,'first 3 terms')
text(4.2,1.8,'in Taylor seeries')

Kreyszig-6.1.5_method2 (last edited 2010-12-18 06:30:47 by beesanna)