Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168703
Image: ubuntu2004
var('x,y,z')
(x, y, z)
## Sage uses "abs" rather than vertical bars for the absolute-value function ## We'd write this as f(x,y) = | |x-y|-|x+y| | f(x,y) = (abs(x)-abs(y))^2
## The graph of f has a sharp point at the origin, ## and isn't differentiable there FPlot = plot3d(f, (x,-1,1), (y,-1,1)) FPlot
## What happens if we zoom in near (0,0,0)? ## The surface does not flatten out, which suggests that f is not differentiable. ## On the other hand, the z-coordinates are getting smaller and smaller. ## This suggests that the function ys that the function r = 0.1 plot3d(f, (x,-r,r), (y,-r,r))
## No matter how far you zoom in, the surface still has a crease! r = 0.01 plot3d(f, (x,-r,r), (y,-r,r))
## On the other hand, the partial derivatives f_x(0,0) and f_y(0,0) both exist ## (and both equal zero). What this means geometrically is the following: if ## you slice the surface with the plane y=0 or x=0, you will get a curve that ## DOES have a tangent line. r=1 XPlane = implicit_plot3d(x==0, (x,-r,r), (y,-r,r), (z,-r,r), color="red") FPlot + XPlane
YPlane = implicit_plot3d(y==0, (x,-r,r), (y,-r,r), (z,-r,r), color="orange") FPlot + XPlane + YPlane
## But putting those slices together doesn't necessarily give you a tangent plane. Don't be misled!