Message Boards Message Boards

0
|
205 Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:
GROUPS:

Method of obtaining the potential equation from the gradient

Posted 4 days ago

Would someone please tell me what I am doing incorrectly and/or show me the Mathematica recommended method of obtaining the potential equation from the gradient - see attached notebook.

It seems that in attempting to find the anti-derivative (especially in 2 or more dimensions with indefinite integrals) these inter constants "C" seems to convolute and complicate the calculations. I can perform the calculations manually; however, they are extremely time consuming and prone to errors. I am interested in learning if there is a better method than what I am using.

Thanks,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
5 Replies

You do not want a triple integral. You want three separate single integrals.

POSTED BY: Daniel Lichtblau

DSolve[] can solve the system all at once:

DSolve[{Grad[f[x, y, z], {x, y, z}] == {y z, x z, x y}}, 
 f[x, y, z], {x, y, z}]

(*  {{f[x, y, z] -> x y z + C[1]}}  *)

If you wish to perform the iterative approach you give in your notebook, then DSolve[] can perform the single-integral steps:

DSolve[{D[f[x, y, z], x] == y z}, f[x, y, z], {x, y, z}]

(*  {{f[x, y, z] -> x y z + C[1][y, z]}}  *)

Here C[1] is your g; that is C[1][y, z] is g[y, z]. This is an advantage of DSolve[] over Integrate here: Since the variables {x, y, z} are specified, DSolve[] makes the "constant of integration" depend on y and z, just what is needed for the next step.

You can then differentiate and integrate, eliminating a variable at each iteration as in your "Manual Method." I figure you would appreciate working out the rest of the steps yourself, but if you run into difficulty, you can post a reply and I will try to help.

POSTED BY: Michael Rogers

Hi Michael;

Thank you so much - your solution is exactly what I wanted.

I actually tried using the function DSolve[] but had the parameters defined incorrectly. Your definitions worked flawlessly.

Thanks Again, Mitch Sandlin

POSTED BY: Mitchell Sandlin

I tried to solve your problem following your steps. See the attached notebook.

Attachments:
POSTED BY: Gianluca Gorni

Thank you - I will study the notebook.

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

Group Abstract Group Abstract