save_figs = F # Question 22: # A = matrix( c( 1, 1, -2, 1 ), nrow=2, ncol=2, byrow=T ) b = c( 1, 0 ) x = solve( A, b ) print(x) b = c( 0, 1 ) x = solve( A, b ) print(x) # Question 23: # A = matrix( c( exp(-3), exp(-1), -3*exp(-3), -exp(-1) ), nrow=2, ncol=2, byrow=T ) b = c( 1, 0 ) x = solve( A, b ) print(x) b = c( 0, 1 ) x = solve( A, b ) print(x) print( c( -0.5*exp(3), 1.5*exp(1) ) ) # check with the numbers in the back of the book