# Multidimensional integration and differentiation

**URL:** <https://discourse.julialang.org/t/multidimensional-integration-and-differentiation/56163>\
**Category:** Numerics\
**Created:** [February 27, 2021, 10:40pm UTC](https://discourse.julialang.org/t/multidimensional-integration-and-differentiation/56163 "2021-02-27T22:40:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 27, 2021, 11:04pm UTC](https://discourse.julialang.org/t/multidimensional-integration-and-differentiation/56163/2 "2021-02-27T23:04:58Z")

</div>

> [@simonf](#):
>
> I’m wondering if I can implement this with numerical packages. I have tried with [HCubature.jl](https://github.com/JuliaMath/HCubature.jl) but can’t get it to work, I think because the upper limit of the inner integral contains the variable of integration of the outer integral.

Perform a change of variables to a rectangular domain, as explained [here](https://discourse.julialang.org/t/2d-integration-over-non-rectangular-domain-using-cubature/2991) and [here](https://discourse.julialang.org/t/nested-quadgk-long-compilation-time-gets-short-when-plotting-the-argument-beforehand-but-not-when-calling-it/24519/3) and [here](https://github.com/stevengj/HCubature.jl/issues/16), for example.

---

_[View the full topic](https://discourse.julialang.org/t/multidimensional-integration-and-differentiation/56163)._
