Find the tangent plane to the surface in Mathematica

In summary, the conversation involves a question about finding the tangent plane to a surface and plotting it with the surface using Mathematica. The solution involves defining functions and using them to plot the tangent plane and surface on the same graph. The viewpoint is also adjusted to clearly show the tangent plane.
  • #1
Logistics
30
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
  • #2
anyone able to confirm if it's correct?
 
  • #3
Logistics said:
anyone able to confirm if it's correct?

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

1. How do I find the tangent plane to a surface in Mathematica?

To find the tangent plane to a surface in Mathematica, you can use the built-in function TangentPlane. This function takes in the surface equation and the point at which you want to find the tangent plane, and returns the equation of the tangent plane.

2. Can I visualize the tangent plane in Mathematica?

Yes, you can visualize the tangent plane in Mathematica by using the Plot3D function. First, plot the surface using Plot3D and then use the Epilog option to add the tangent plane equation as a Graphics3D object on top of the surface.

3. How do I specify the point at which I want to find the tangent plane?

To specify the point at which you want to find the tangent plane, you can use the Point function. This function takes in the coordinates of the point and returns a Point object that can be used as an argument in the TangentPlane function.

4. Can I find the tangent plane to a parametric surface in Mathematica?

Yes, you can find the tangent plane to a parametric surface in Mathematica by using the TangentPlane function with the parametric equations of the surface. You will also need to specify the point at which you want to find the tangent plane.

5. How accurate is the tangent plane calculated in Mathematica?

The accuracy of the tangent plane calculated in Mathematica depends on the accuracy of the input surface equation and the specified point. The TangentPlane function uses numerical methods to calculate the tangent plane, so the accuracy may vary depending on the complexity of the surface and the chosen point.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
464
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
19
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
741
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
Back
Top