Group Abstract Group Abstract

Message Boards Message Boards

0
|
12.7K Views
|
9 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Simple way to plot functions & vector properties

Posted 10 years ago

I'm trying to get a better intuition for scalar and vector fields, so thought I'd experiment with Plot3D .. For example I wanted to plot a function like x^2 + xy + y^2, easy enough. Then I wanted to see what the gradient looked like - could only find an abstruse set of nested commands. I will also want to look at divergence and curl, so combinations of scalars and vectors plus these operators ....

Is there a simple and easy to remember way to do things like this? Thanks.

POSTED BY: Alan Smith
9 Replies
Posted 10 years ago

the Wolfram Demonstrations Project has a number of useful bits for gradient, but nothing along those lines for divergence and curl - so maybe someone will see this and build some demonstrations for those as well :-) $X^2 + x*y + y^2$ is just an example off the top of my head, another I liked was at https://www.wolfram.com/mathematica/new-in-8/new-and-improved-scientific-and-information-visualization/show-the-gradient-field-on-a-surface.html and of course some trig combination functions ....anyway, thanks for your interest & time David

POSTED BY: Alan Smith

You can find some examples and pictures of these items in Wikipedia or perhaps other places on the web. You could look up Grad, Div, Curl, VectorPlot, VectorPlot3D, ContourPlot and ContourPlot3D in Mathematica Documentation but you will probably not be able to put them together in a short time. You might look in the Wolfram Demonstrations Project for examples. Unfortunately, Mathematica is not quite an off-the-self and start using application and I don't know of an existing direct application that would help you.

Posted 10 years ago

Thanks David, while you make a great deal of sense, I am writing an exam in the not-too-distant and for now my goal is just to plot a few simple 3-D functions with their associated grad/div/curl - to help me visualise them and the differences between them; I don't know mathematica at all well and don't want to get side-tracked (now) in trying to learn it well enough.

My thought was that I could find examples of each of any simple function with it's grad/div/curl and could code them in a macro - I could get a lot of visualising done quite time-cheaply. Do you (or anyone) perhaps know of a simple example of 'recording a macro' I could look at?

POSTED BY: Alan Smith
Posted 10 years ago

Hi folks, lost my PC to the Win10 upgrade (it got into an endless auto-repair loop and I eventually had to rebuild, so be warned) - and waiting for Wolfram support so I can reinstall mathematica ....

In the meantime I wondered - is there a way to build a 'macro' in mathematica, so I could (for example) build 'MyGradPlot[function, range(s)] and just vary the functions? If there is, I learn best by looking at examples :-)

Thanks

POSTED BY: Alan Smith
Posted 10 years ago

Mathematica has an abundance of tools for vector calculus. Some examples are seen in the attached notebook.

Best regards,

David

Attachments:
POSTED BY: David Keith
Posted 10 years ago

Hi - Plot3D will plot the function, but I want to see the gradient (or divergence or curl) simultaneously?

Thanks Alan

POSTED BY: Alan Smith
POSTED BY: Tasneem Smadi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard