Message Boards Message Boards

Calculating multivariable calculus surface integrals using Mathematica

Posted 24 days ago

Hi;

I am trying to understand Surface Integrals and how to calculate them using Mathematica's NSurfaceIntegral[], NIntegrate[] and other functions - See Attached Notebook. Honestly, I find the whole process somewhat confusing and need someone to give some clarification as to what I am doing correctly and incorrectly. Additionally, the problem that I have chosen has a symbolic range of "y" imbedded in the upper end of the "x" range which makes the calculations a bit more difficult.

Like I said previously, I am extremely new to Surface Integral calculations, therefore any advice and clarification you can give is greatly appreciated.

Thanks,
Mitch Sandlin

POSTED BY: Mitchell Sandlin
5 Replies

Thanks so much for your assistance.

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Hey Mitch—just popping in here momentarily without the tooootally full context, but I think you can build some more insight on how these differential surface patches and the corresponding integrals are done in the Introduction to Multivariable Calculus course, particularly in the exercises for the lessons in Section 5 (Three Great Theorems). I worked on these solutions and the corresponding visualizations, and I think they're pretty great!

(As for Minors, if you check out the Applications section in the documentation, you can see how it comes in here—when one calculates a determinant by hand, they often will write out the minors of the matrix to make the calculation easier. You can indeed totally avoid it when just computing the differential "size" element for an integral in WL.)

POSTED BY: Arben Kalziqi

It is equivalent: you can also calculate the two partial derivatives, take the cross product and then the norm:

twoPartialDerivatives = {D[r, x], D[r, y]}
crossProduct = Cross @@ twoPartialDerivatives
areaElement =
 Simplify[Norm[crossProduct],
  Element[x | y, Reals]]

The version with the jacobian is more easily genralized to higher dimensions. You will find textbooks that use this approach.

POSTED BY: Gianluca Gorni

Hi Gianluca;

Thank you so much for your response, because it certainly appears that your solution absolutely nailed the answer. I found it extremely interesting that you took both derivatives at once, within one derivative function, which created a single matrix containing both derivatives (x, y). Whereas, textbook examples show, taking two separate partial derivatives (one for x and another for y) and then combining them using a cross product before taking the norm. This method producing a different answer than obtained from using the SurfaceIntegrate[] function. Additionally, it seems that the method of combining two separate derivatives depends on whether the values are scalars or vectors (by adding scalars together or using the cross product to combine vectors) - is this correct?

Lastly, I noted that you used a function Minors[] which I am totally unfamiliar with. However, the function Minors[] did not seem to have any effect on the matrix, at least in my example, and therefore I was curious as to the intention of using it.

Again, thank you so much for your response, I certainly appreciate your time and insight, and I am still studying your solution to get a better understanding surface integrals.

Mitch Sandlin

POSTED BY: Mitchell Sandlin

Your area element calculation is wrong. It should be something like this:

r = {x, y, x y};
jacobian = D[r, {{x, y}}]
areaElement = Simplify[Norm@Minors[jacobian, 2],
  Element[x | y, Reals]]
NIntegrate[(x + y^2 + x^3 y^3 ) areaElement, {y, 0, 1}, {x, 0, y}]
POSTED BY: Gianluca Gorni
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