Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168756
Image: ubuntu2004
var('x,y') f = x^2+y^2 myplot=contour_plot(f,(-3,3),(-3,3), fill=False, cmap='prism', contours=[0.5*t for t in range(-8,8)]) gradient_field = plot_vector_field([f.diff(x),f.diff(y)], (x,-3,3),(y,-3,3)) show(myplot+gradient_field, figsize=(4,4)) html('<h2> Contour plot and gradient field of $f(x,y) = %s$ </h2>' %latex(f))

Contour plot and gradient field of f(x,y) = {y}^{2} + {x}^{2}

var('x,y') f = x*y myplot=contour_plot(f,(-3,3),(-3,3), fill=False, cmap='prism', contours=[0.5*t for t in range(-8,8)]) gradient_field = plot_vector_field([f.diff(x),f.diff(y)], (x,-3,3),(y,-3,3)) show(myplot+gradient_field,figsize=(5,5)) html('<h2> Contour plot and gradient field of $f(x,y) = %s$ </h2>' %latex(f))

Contour plot and gradient field of f(x,y) = {x y}

var('x,y') f = x^2-x*y+y^2 myplot=contour_plot(f,(-3,3),(-3,3), fill=False, cmap='prism', contours=[t for t in range(0,8)]) gradient_field = plot_vector_field([f.diff(x),f.diff(y)], (x,-3,3),(y,-3,3)) show(myplot+gradient_field, figsize=(5,5)) html('<h2> Contour plot and gradient field of $f(x,y) = %s$ </h2>' %latex(f))

Contour plot and gradient field of f(x,y) = {y}^{2} - {x y} + {x}^{2}