Comments on Student Solutions to PSA
Comments on specific problems.
#2. Use "format long" to get more decimal places of accuracy.
#3. Many students did not interpret the output of the "factor" command. It means that
123456789 = 3^2*3607*3803.
#5. The command "solve" finds two complex roots of the equation in addition to the three real ones you should have found by a combination of graphs and "fzero". Use "double" to convert the symbolic output of "solve" to numerical values.
#6. You need an interval like [-10, 10] to see the "big picture". Also you can use a parameter in the contour command to see more contours or a specific contour. See the solution on the course web page.
#7. Use the command "pretty" to put complicated formulas into math notation.
#8. You were asked to explain the graph. You can say e.g. that the curve depicting the derivative crosses the x-axis wherever the original polynomial has a max or min. The command "axis tight" will adjust your graph to display all the data Matlab has, some of which may not be displayed depending on your choices of the parameters.
#9. For a solution to (c), see the solution on the web page. Also, you need to use the parameter 'left' to get the one-sided limit in (d).
#10. You need to simplify the derivative (using "simplify") in (e) to match up with the original function. Note that Matlab does not succeed with (f); it gives an answer in terms of another antiderivative. It also fails to find a symbolic solution in (g).
General Points.
¾
If you insert a long comment you may need two lines. Use a carriage return and begin each line with %.
¾
Label your problems and problem parts with comment lines.
¾
"contour" and "quiver" require componentwise operations on vectors; use the dot notation in front of algebraic operations.
¾
Do not omit interpretations and explanations that are requested. Include them using comment lines.
¾
Use a separate M-file for each problem; problems in succeeding problem sets will be longer and generate more complicated files. Combining several problems into one very long M-file may prove problematic.
¾
Don't use the dot in front of operations when issuing symbolic commands.
¾
Don't use ^0.5, especially in symbolic expressions; use ^(1/2).
¾
Use semi-colons to suppress superfluous output.
¾
If you need to rerun an M-file, do not forget to delete the old diary file first.