lehoff

5 Reputation

One Badge

7 years, 78 days

MaplePrimes Activity


These are replies submitted by lehoff

@rlopez that was a very helpful video - the solution you refer to is using a different variant of Gauss' Divergence Theorem than the one I was after, but the video gave me some insights into how Maple works and I have now found a solution to the problem using the Div(V) version of the theorem.

Omega := (u,v,w) -> (u,v,w(1-u^3))

Notice that I use parenthesis instead of angle brackets here.

The we calculate the Jacobian matrix for Omega:

JM := Jacobian([Omega(u,v,w)], [u,v,w])

Notice the square brackets around Omega(u,v,w) - that is the trick to make Maple happy.

And then we just take the determinant of that:

with(Student[LinearAlgebra]):

Jr := Determinant(JM)

which returns 1 - u^3 as it should.

And here's the final trick... in order to make the divergence a function we do this:

DivV := Divergence( (x,y,z) -> V)

And now we can write the integrant for the tripple integral as:

DivV(Omega(u,v,w)) * Jr

which exactly what you'd do by hand.

Again, thanks for taking the time to respond and the video gave me exactly the extra understanding required for this!!

Cheers,

Torben

p.s. One can actually take this one step further and make Div a function:

Div := V -> Divergence( (x,y,z) -> V)

and then the integrant becomes:

Div(V)(Omega(u,v,w)) * Jr

And then you can reuse Div in other settings.

A similar thing can be done for Jr.

Page 1 of 1