Review and summary of the homework
1. The
solve
command:
Without evaluating the following code, try to predict exactly what the output will be:
>
solve( x^2 - x - 2 = 0, x );
solve( {a+b = 3, a-b = 1}, {a,b} );
Now evaluate the expressions the check your predictions.
Exercise : Use the solve command to find a pair of numbers whose sum is 10 and whose product is 21. Try it now.
> solve( {c+d=10, c*d=21});
2. The
plot
command:
Plot the polynomial
for
=
to 4.
Does this range show all the roots to this polynomial?
Title your plot "Cubic Polynomial."
> plot(x^3-16*x^2+7, x=-4..4,title="Cubic Polynomial");
Polynomial with a power of three should have three roots shown.