MAT 201, Lab #4, Spring 2016 Name Directions: The labs for this

MAT 201, Lab #4, Spring 2016
Name _____________________________________________
Directions: The labs for this course will require the use of MatLab (mostly). Instructions on how to
access MatLab can be found under a separate document posted in the course. Use the listed example
code to complete the following exercises. Print the resulting MatLab worksheet. Circle and number the
solutions to the problems on the printout. Or, copy and paste the contents of the MatLab worksheet
into a file, note the problem numbers in the code, to submit the problems electronically.
Example Code File: 201lab_ex4.pdf
The code file begins by declaring variables. You will need to declare any variables you intend to use
before you use them. The file declares the variables: ๐‘ฅ, ๐‘ฆ, ๐‘ง. Then we define a function ๐‘”(๐‘ฅ, ๐‘ฆ) =
sin(๐‘ฅ๐‘ฆ) + cos(๐‘ฅ๐‘ฆ 2 ) and take the partial derivatives with respect to both ๐‘ฅ and ๐‘ฆ.
If we want to compute a derivative like ๐‘”๐‘ฅ๐‘ฆ๐‘ฆ , that code follows with embedded derivative commands.
Recall the inside command is the one that gets executed first.
Integration works similarly. To compute the double integral ∫1 ∫−3 ๐‘ฅ๐‘ฆ๐‘‘๐‘ฆ๐‘‘๐‘ฅ , we define the function, and
use embedded integration commands. Or we can create integrals with variable limits of integration,
which follows in the code. You can do this in one stage or two, with the intermediate stage being a
function. You will need to save the result using the define function code. We will use this when we find
potential functions.
The last bit of code creates a gradient vector ∇โ„Ž for โ„Ž(๐‘ฅ, ๐‘ฆ, ๐‘ง) = ๐‘ฅ๐‘ฆ๐‘ง + 2 cos ๐‘ฅ − 3๐‘ง 2 − arcsin ๐‘ฆ, and
then expresses it as a column vector.
Use these examples to complete the following:
1. Find the indicated partial derivatives.
a. ๐‘“(๐‘ฅ, ๐‘ฆ, ๐‘ง) = ๐‘ฅ 2 ๐‘ฆ + arctan(2๐‘ง) , ๐‘“๐‘ฅ , ๐‘“๐‘ง , ๐‘“๐‘ฆ๐‘ง
b. ๐‘”(๐‘ฅ, ๐‘ฆ, ๐‘ง) = ๐‘ฅ๐‘’ ๐‘ฆ๐‘ง − cos(๐‘ฅ ln ๐‘ฆ) , ๐‘“๐‘ฅ๐‘ฆ , ๐‘“๐‘ง๐‘ฆ๐‘ฅ
2. Find the values of the double integrals.
4 2
a. ∫0 ∫−1 cos 2(๐‘ฅ) sin(๐‘ฆ) ๐‘‘๐‘ฆ๐‘‘๐‘ฅ
b. ∫−1 ∫0 ๐‘ฅ 2 ๐‘ฆ 3 ๐‘‘๐‘ฆ๐‘‘๐‘ฅ
3. For the function ๐‘“(๐‘ฅ, ๐‘ฆ, ๐‘ง), and the vector field ๐นโƒ— (๐‘ฅ, ๐‘ฆ, ๐‘ง) = (๐‘ฅ + ๐‘ฆ)๐‘–ฬ‚ + (tan ๐‘ฆ + ๐‘ฅ๐‘ง)๐‘—ฬ‚ +
(๐‘ง 2 − 1)๐‘˜ฬ‚, find the following:
a. ∇๐‘“
b. ∇ × ๐นโƒ—
c. ∇ โˆ™ ๐นโƒ—
d. ∇2 ๐‘“
To submit your solutions, copy and paste the graphs and the code into a file for printing or to submit by
email. Mark the sections of your code that correspond to which problems, and label your graphs.