MATLAB Assignment A hints:

advertisement
MATLAB Assignment A hints:
The following problems are form Chapters 1 and 11 of the MATLAB textbook.
Chapter 1 #10a: First solve the equation for the variable a first (on paper), then enter the expression in
MATLAB.
Chapter 1 #11: Define variables a and b (see pp16-18 for how to define variable expressions), then
enter the expression for LABC. Make sure to look up how to enter the natural logarithm function in
MATLAB!
Chapter 1 #17: Again, as in the previous problems, solve the equation for the desired variable first (on
paper), then enter the expression after defining a, b, and gamma. You should look up expressions for
square root functions.
Chapter 11 of the MATLAB textbook uses the symbolic package of MATLAB to find exact solutions
to mathematical problems. First, you should look at the Calculus I Overview linked on the MATLAB
schedule, paying particular attention to "MATLAB Examples" on the last page.
Chapter 11 #10 (solve, ezplot): Define x and y as symbolic variables (see the MATLAB book
pp350-353), then define the equations of the ellipses and use ezplot (pp369-371, along with hold on:
pp142-143) to plot both ellipses on the same graph. Use the solve command (pp360-363) to find the
points of intersection. NOTE that the easiest syntax is [var1 var2] = solve(eq1, eq2, var1, var2) (see
examples on p361) so the solutions will be immediately displayed.
TIME TO MAKE IT RELEVANT TO CALCULUS!!! For the remaining 4 problems, you will
apply these symbolic techniques to applications of integration from the Stewart textbook.
The following problems are form the Calculus textbook. Problems from this book are labeled
“Stewart”.
Stewart 427/18 (solve, ezplot, int): Inform them that the process for solving applications like these by
hand are the same ones that work in MATLAB-only MATLAB does the "grunge calculations" for
them! The process is: 1) use ezplot (and hold on as above) to plot the graphs, 2) use solve to find the
intersections, 3) based on the graph and the appropriate formula, set up and evaluate integrals using the
int command (pp365-366).
Stewart 438/28 (solve, ezplot, int): Same as above, but plot the region you would rotate, solve to find
the intersections, set up the volume integral based on the appropriate formula and evaluate using the int
command.
Stewart 444/26 (solve, ezplot, int): Same as above. The beauty of 'ezplot' is that it WILL easily graph
these functions (unlike your calculator!!!).
Stewart 451/12 (int, solve): Use the appropriate formula and integrate in MATLAB to calculate the
average value (define b as a symbolic variable as well!), then solve f_avg=3 for b.
Download