Professional Documents
Culture Documents
Introduction:
Background: (Refer to the text, Section 3.6)
dy
You have discussed a process, called implicit differentiation, to find the derivative for a function y = f (x)
dx
defined implicitly by an equation F(x, y) = 0 . In this worksheet, you will use Matlab to examine graphs and
tangent lines for the functions defined implicitly by F(x, y) = 0 .
Matlab Hints:
You cannot use the “plot” command unless a function is defined explicitly as y = f (x) . You will need two new
commands: meshgrid and contour.
• The meshgrid command sets up an array of pairs of x and y values.
• Then the contour plot command sketches a graph through all of the points (x,y) that satisfy the equation
F( x , y) = 0 . Contained in this graph are the graphs of the functions defined implicitly by F( x , y) = 0 .
Note: Creating contour plots in general will be discussed in a multivariable calculus course.
Because the meshgrid command creates a very large number of values, you need to copy the commands given
in the problems carefully. You could have memory problems if you use a step size that is too small. Also,
remember to use a semicolon at the end to suppress the output.
Instructions:
You may bring your printed Word document to the Emporium class to be used during the quiz. Therefore it is
recommended that you:
• Number each question clearly and circle answers.
• Use Matlab-generated graphs pasted into the document.
• Show the correct Matlab input and corresponding output for each part of each problem.
• Answer all questions completely.
>> x=-1:.1:2;
>> y=-2:.1:2;
>> [x,y]=meshgrid(x,y);
>> F=2*y.^3+y.^2-y.^5-x.^4+2*x.^3-x.^2;
>> contour(x,y,F,[0,0],'k')
Continue with 0.5 for our second estimate: Continue with 1.5 for our third estimate:
y2 = 0.5408 y3 = 1.5781
So the point (−0.5, 0.5408) is also on the So the point (−0.5,1.5781) is also on the graph of
graph of this implicit function. this implicit function.
dy
(c) Use implicit differentiation (by hand) to calculate = y ′ . Show your work.
dx
dy 4 x 3 − 6x 2 + 2x
=
dx 6y 2 + 2y − 5y 4
(d) Write the equation of the tangent line to the graph at each of the points found in (b)
We have the points; we need the slope at these points. We KNOW the slope is the derivative so we can have
MatLab evaluate the slope for us.
>> m1 = (4*(-0.5)^3-6*(-0.5)^2+2*(-0.5))./(6*y1.^2+2*y1-5*y1.^4)
m1 = 0.6519
>> m2 = (4*(-0.5)^3-6*(-0.5)^2+2*(-0.5))./(6*y2.^2+2*y2-5*y2.^4)
m2 = -1.2455
>> m3 = (4*(-0.5)^3-6*(-0.5)^2+2*(-0.5))./(6*y3.^2+2*y3-5*y3.^4)
m3 = 0.2323
(e) Graph the curve together with each of the tangent lines found in (d). Be sure to include your Matlab
commands. (Caution: If your tangent lines do not touch the graph at the point of tangency then the line is not the
correct tangent line.)
2
When adding the tangent lines to your graph, use the plot command and redefine an x-variable because we need
more values for the lines than the command x=-1:.1:2; gives us.
>> xc=-1:.01:2;
>> line1=m1.*(xc-(-0.5))+y1;
>> line2=m2.*(xc-(-0.5))+y2;
>> line3=m3.*(xc-(-0.5))+y3;
>> hold on
>> plot(xc,line1,xc,line2,xc,line3)
Problem 1:
Be careful to use the colons, semicolons, and commas exactly as you see here.
»x=-2:.1:2;
»y=-2:.1:2;
»[x,y]=meshgrid(x,y);
»F=x.^2.*y.^2+y.^2.*cos(x)-3;
»contour(x,y,F,[0,0],'k')
Is the graph you get the graph of a single function y = f (x) ? Explain.
(b) Find to four decimal places the y-coordinates of the points on the graph that have x-coordinate x = −1.
dy
(c) Use implicit differentiation (by hand) to calculate = y ′ . Show your work. Before you go on, show your
dx
derivative to the instructor to be sure that it is correct.
(d) Write the equation of the tangent line to the graph at each of the points found in (b).
(e) Graph the curve together with each of the tangent lines found in (d). Be sure to include your Matlab
commands. (Caution: If your tangent lines do not touch the graph at the point of tangency then the line is not the
correct tangent line.)
When adding the tangent lines to your graph, use the plot command.
3
Problem 2:
(b) Find to four decimal places the y-coordinates of the points on the graph that have x-coordinate x = 0.5.
dy
(c) Use implicit differentiation (by hand) to calculate = y ′ . Show your work. Before you go on, show your
dx
derivative to the instructor to be sure that it is correct.
(d) Write the equation of the NORMAL line to the graph at each of the points found in (b).
(e) Graph the curve together with each of the normal lines found in (d).