print( polyroot( c( 0.75, 2, 1 ) ) ) print( polyroot( c( 4, -4, 1 ) ) ) print( polyroot( c( 5, 2, 1 ) ) ) print( polyroot( c( 12, 7, 1 ) ) ) print( polyroot( c( -1, 5, 1 ) ) ) print( polyroot( c( 3, -3, 1 ) ) ) print( polyroot( c( 9, -6, 1 ) ) ) print( polyroot( c( 8, 4, 1 ) ) ) print( polyroot( c( 4, 1, 1 ) ) ) print( polyroot( c( -3, -1, 2 ) ) ) solve( matrix( data=c( 1, 1, 3/2, -1 ), nrow=2, ncol=2, byrow=T ), c( 1, 4 ) ) # Problem 13: xs = seq( 0.1, 3, length.out=100 ) ys = 2 * xs^(3/2) - xs^(-1) plot( xs, ys, type='l', xlab='x', ylab='y' ) grid() # Problem 14: print( polyroot( c( 17, 4, 4 ) ) ) xs = seq( 0.1, 3, length.out=100 ) ys = 2 * xs^(-1/2) * cos( 2 * log( xs ) ) - xs^(-1) * sin( 2 * log( xs ) ) plot( xs, ys, type='l', xlab='x', ylab='y' ) grid() # Problem 15: print( polyroot( c( 4, -4, 1 ) ) ) xs = seq( -2, -0.1, length.out=100 ) ys = 2 * xs^2 - 7 * xs^2 * log( -xs ) plot( xs, ys, type='l', xlab='x', ylab='y' ) grid() # Problem 16: print( polyroot( c( 5, 2, 1 ) ) ) xs = seq( 0.1, 2, length.out=100 ) ys = xs^(-1) * cos( 2 * log( xs ) ) plot( xs, ys, type='l', xlab='x', ylab='y' ) grid()