On Sun, Sep 6, 2020 at 5:03 AM Teodoro Coluccio <teodoro.coluc...@gmail.com>
wrote:

> Can I perform triple integrals in a region of space I define? I'm trying
> to migrate from mathematica to sage, and in mathematica I could go and
> define a region of space (with various limitations) and then perform the
> integral of a function on it. Here is an explanatory image:
> [image: screen.png]
> Is there a way to easily perform this operation even in sage?
>


1) You have to integrate wrt z first, which I don't know whether Mma would
understand without being told.

sage: integral(integral(integral(x^*2*+*2**y*z, (z, y, (*2*-x-*2**y)/*3*)),
(y, x, (*2*-x)/*2*)), (x, -*1*, *2*))
1681/320

2) Using sympy (in sage, but I used https://live.sympy.org/):

>>> var("x,y,z")
(x, y, z)(x, y, z)
>>> integrate(x*x+2*y*z, (z, y, (2-x-2*y)/3), (y, x, (2-x)/2), (x, -1, 2))
1681/320

3) You can also do this in maxima (also included in sage). See
https://themaximalist.org/tag/triple-integration/
for an example of how to use the syntax.

4) Instead of reposting the same question 3 times , it would be helpful to
others with the same question just
to keep the question in one thread.

5) Is this a homework problem for a math class?



> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/2f4b4ec1-5661-490a-925d-6d038692bc0dn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-support/2f4b4ec1-5661-490a-925d-6d038692bc0dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAEQuuAVewrVAf-xJbjsp_9dng0BtS_tFx54KtTf0mqyAE3hBBA%40mail.gmail.com.

Reply via email to