Re: How to plot divergence of gradient as contour plot

*To*: mathgroup at smc.vnet.net*Subject*: [mg124031] Re: How to plot divergence of gradient as contour plot*From*: Peter Breitfeld <phbrf at t-online.de>*Date*: Fri, 6 Jan 2012 04:17:44 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <je402c$efu$1@smc.vnet.net>

Szymon Roziewski wrote: > Hello there, > > I am concerning to plot something like that. > > ContourPlot[Divergence[Gradient[Sin[x + y]]], {x, -5, 5}, {y, -5, 5}] > > Plotting divergence of gradient scalar field. > How can I manage to do that? > > Best regards, > Szymon Roziewski Try this: Needs["VectorAnalysis`"] SetCoordinates[Cartesian[x,y,z]] (*usual cartesian coordinates *) ContourPlot[Evaluate@Div@Grad[Sin[x+y]],{x,-5,5},{y,-5,5}] You need to include Evaluate, dew to the way Plot works. -- _________________________________________________________________ Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de