% plots for week 2 homework x=linspace(-5,5,100); y1=2-1./((x.^2+1).^(3/2)); y2=2+1./((x.^2+1).^(3/2)); y3=2+3./((x.^2+1).^(3/2)); plot(x,y1,x,y2,'--',x,y3,':'), shg grid on xlabel('x') ylabel('y') legend('y(0)=1','y(0)=3','y(0)=5') title('Solutions to (x^2+1)y''+3xy=6x')