k = 2 #postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_5_prob_7_plot.eps", onefile=FALSE, horizontal=FALSE) ys = seq( -5, +5, length.out=100 ) fs = k*(1-ys)^2 plot( ys, fs, type='l', col='black', xlab='y', ylab='f(y)' ) abline(h=0, col='black', lty=1, lwd=2) grid() #dev.off() if( FALSE ){ ts = seq( 0, 10, length.out=100 ) y0 = 3 y0_3 = ( (y0-1)*k*ts - y0 ) / ( (y0-1)*k*ts - 1 ) # should diverge to +Inf y0 = 0.5 y0_n5 = ( (y0-1)*k*ts - y0 ) / ( (y0-1)*k*ts - 1 ) # should converge to 1 #postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_5_prob_7_plot_yt.eps", onefile=FALSE, horizontal=FALSE) plot( ts, y0_3, type='l', col='black' ) lines( ts, y0_n5, type='l', col='red' ) grid() #dev.off() }