Mathematica Find the tangent plane to the surface in Mathematica

AI Thread Summary
The discussion focuses on using Mathematica to find the tangent plane to the surface defined by the equation z = 2x^2 - y^2 at the point (2, 1). The user outlines their solution, which includes defining the function, calculating partial derivatives, and constructing the tangent plane equation. They also provide code for plotting both the surface and the tangent plane, adjusting the viewpoint for clarity. Respondents confirm that the code appears correct and that the output looks satisfactory, indicating that the user successfully executed the task.
Logistics
Messages
30
Reaction score
0
Hey guys I have just started learning mathematica and I was wandering if someone could confirm if I did the following correct:

Question:

Find the tangent plane to the surface z = 2x^2 -y^2 at the point (2,1). Plot the tangent plane and the surface on the same graph. Change th eviewpoint to show the tangent plane clearly.

Solution:

Clear[f, x, y, fx, fy, point1, point2]
point1 = 2;
point2 = 1;
f[x_, y_] = 2x^2 - y^2;
fx[x_, y_] = D[f[x, y], x];
fy[x_, y_] = D[f[x, y], y];
T[x_, y_] := f[point1, point2] + fx[point1, point2](x - point1) + fy[point1, point2](y - point2)
T[x, y]

Clear[G1, G2];
G1 = Plot3D[f[x, y], {x, -2, 10}, {y, -4, 4}]
G2 = Plot3D[T[x, y], {x, -2, 10}, {y, -4, 4}]
Show[G1, G2, ViewPoint -> {0, -2, 0.3}, AspectRatio -> 1, AxesLabel -> {"x", "y", "f(x,y)"}]


Thanks in advance
 
Physics news on Phys.org
anyone able to confirm if it's correct?
 
Logistics said:
anyone able to confirm if it's correct?

I tried it and it looks ok ; the code also looks ok...
 

Similar threads

Replies
2
Views
2K
Replies
1
Views
2K
Replies
4
Views
3K
Replies
1
Views
2K
Replies
8
Views
3K
Replies
2
Views
3K
Replies
3
Views
5K
Back
Top