# \#integral

**URL:** https://discourse.julialang.org/tag/integral/576.md?match_all_tags=true&tags%5B%5D=integral

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] GruntzLimit.jl, RischIntegrate.jl, RUBISymbolicIntegration.jl, SymJ.jl](https://discourse.julialang.org/t/ann-gruntzlimit-jl-rischintegrate-jl-rubisymbolicintegration-jl-symj-jl/140334)

<div class="topic-metadata">

**Author:** [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Replies:** 6\
**Last updated:** [November 11, 2026, 7:13pm UTC](https://discourse.julialang.org/t/ann-gruntzlimit-jl-rischintegrate-jl-rubisymbolicintegration-jl-symj-jl/140334 "2026-11-11T19:13:55Z")

</div>

New packages, mostly generated with assistance from Claude. These started as an experiment to see how much work it would be to generalize SymbolicLimits.jl and SymbolicIntegration.jl beyond SymbolicUtils.jl to any symbol…

---

## [\[ANN\] HAdaptiveIntegration.jl v1.0.0 - Adaptive numerical integration over simplices and orthotopes](https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 1\
**Last updated:** [April 6, 2026, 9:10am UTC](https://discourse.julialang.org/t/ann-hadaptiveintegration-jl-v1-0-0-adaptive-numerical-integration-over-simplices-and-orthotopes/135309 "2026-04-06T09:10:39Z")

</div>

The HAdaptiveIntegration.jl package is designed for numerical integration over multidimensional domains. It computes integrals of the form I = \\int\_{\\Omega} f(x) \\, \\mathrm{d}x where f is any Julia function and \\Omega re…

---

## [Caching in Integrals.jl](https://discourse.julialang.org/t/caching-in-integrals-jl/135443)

<div class="topic-metadata">

**Author:** [@omerc](https://discourse.julialang.org/u/omerc)\
**Replies:** 4\
**Last updated:** [February 5, 2026, 2:25am UTC](https://discourse.julialang.org/t/caching-in-integrals-jl/135443 "2026-02-05T02:25:25Z")

</div>

Recently, I tried to numerically integrate a function for multiple parameters. The integral is four dimensional, so I use CubatureJLh() (but I don’t mind using other methods - the documentation doesn’t elaborate a lot on…

---

## [Tanh-Sinh Quadrature package](https://discourse.julialang.org/t/tanh-sinh-quadrature-package/135114)

<div class="topic-metadata">

**Author:** [@svretina](https://discourse.julialang.org/u/svretina)\
**Replies:** 4\
**Last updated:** [January 17, 2026, 11:50pm UTC](https://discourse.julialang.org/t/tanh-sinh-quadrature-package/135114 "2026-01-17T23:50:08Z")

</div>

Hi everyone, before I tag an official release and make an official announcement for this package (GitHub - svretina/FastTanhSinhQuadrature.jl: A Julia package for Tanh-Sinh Quadrature rules up to 3 dimensions). I would …

---

## [\[ANN\] SymbolicIntegration.jl - indefinite integration with Symbolics.jl symbols](https://discourse.julialang.org/t/ann-symbolicintegration-jl-indefinite-integration-with-symbolics-jl-symbols/134777)

<div class="topic-metadata">

**Author:** [@CiccioPasticcio](https://discourse.julialang.org/u/CiccioPasticcio)\
**Replies:** 28\
**Last updated:** [January 5, 2026, 10:12am UTC](https://discourse.julialang.org/t/ann-symbolicintegration-jl-indefinite-integration-with-symbolics-jl-symbols/134777 "2026-01-05T10:12:25Z")

</div>

For a while now I have been developing SymbolicIntegration.jl, that lets you solve symbolic integrals in julia! it has for now two different methods to arrive at the antiderivative: Risch algorithm Rule based method us…

---

## [Speeding up N-dimensional integration](https://discourse.julialang.org/t/speeding-up-n-dimensional-integration/132782)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 14\
**Last updated:** [October 1, 2025, 2:17pm UTC](https://discourse.julialang.org/t/speeding-up-n-dimensional-integration/132782 "2025-10-01T14:17:14Z")

</div>

I am struggling to speed up a N-dimensional integration problem. To me it looks that allocations are the problem. I chased as many allocations I could find in the code but I still would like to speed-up the code by at le…

---

## [Common API for \`Integrate\`. IntegrationBase](https://discourse.julialang.org/t/common-api-for-integrate-integrationbase/130637)

<div class="topic-metadata">

**Author:** [@misha\_mikhasenko](https://discourse.julialang.org/u/misha_mikhasenko)\
**Replies:** 5\
**Last updated:** [July 11, 2025, 6:30pm UTC](https://discourse.julialang.org/t/common-api-for-integrate-integrationbase/130637 "2025-07-11T18:30:02Z")

</div>

I’ve observed a conflict of different packages exporting integrate (e.g.). It would be nice to have IntegrationBase with API. Currently, the ecosystem is diverse. Overview of methods integrate is exported by Polynomi…

---

## [Enzyme cannot deduce type for integral function in reverse mode AD](https://discourse.julialang.org/t/enzyme-cannot-deduce-type-for-integral-function-in-reverse-mode-ad/127822)

<div class="topic-metadata">

**Author:** [@jwalker](https://discourse.julialang.org/u/jwalker)\
**Replies:** 11\
**Last updated:** [April 9, 2025, 4:06pm UTC](https://discourse.julialang.org/t/enzyme-cannot-deduce-type-for-integral-function-in-reverse-mode-ad/127822 "2025-04-09T16:06:04Z")

</div>

Could someone explain why I’m getting the following error from this example? using Enzyme struct Parameters M::Int R::Real end function integrand2(v::Vector, nt::NamedTuple) x = v\[1\] y = v\[2\] θ = n…

---

## [Integrating over piecewise approxfun](https://discourse.julialang.org/t/integrating-over-piecewise-approxfun/127309)

<div class="topic-metadata">

**Author:** [@nilsbecker](https://discourse.julialang.org/u/nilsbecker)\
**Replies:** 8\
**Last updated:** [March 25, 2025, 4:08pm UTC](https://discourse.julialang.org/t/integrating-over-piecewise-approxfun/127309 "2025-03-25T16:08:26Z")

</div>

Following up on my earlier post, I now have an ApproxFun.jl Fun defined over a piecewise domain: using ApproxFun f\_pw = Fun(x -\> (x \< 1.0 ? exp(x) : 1.), union(Segment(0.,1.), Segment(1.,2.))) f\_pw\_i = integrate(f\_pw) T…

---

## [Symbolic Integration for hard expressions and generate function](https://discourse.julialang.org/t/symbolic-integration-for-hard-expressions-and-generate-function/124744)

<div class="topic-metadata">

**Author:** [@MechRob](https://discourse.julialang.org/u/MechRob)\
**Replies:** 9\
**Last updated:** [January 22, 2025, 6:22pm UTC](https://discourse.julialang.org/t/symbolic-integration-for-hard-expressions-and-generate-function/124744 "2025-01-22T18:22:59Z")

</div>

Hello All, I am trying to generate Julia functions by deriving the symbolic expressions in Julia. I started using Symbolics.jl and SymbolicNumericIntegration.jl, however it seems that SymbolicNumericIntegration.jl is no…

---

## [Compute integral for DelaunayTriangulation.jl to be able to solve PDE with FiniteVolumeMethod.jl](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 4\
**Last updated:** [January 2, 2025, 3:20pm UTC](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310 "2025-01-02T15:20:13Z")

</div>

Hi :), I would like to solve a advection PDE of the form \\frac{\\partial}{\\partial t} f(x,t) = - \\nabla\_x \\cdot \\left(\\left(\\int \[\\phi(p\_1(x,y),\\phi(p\_2(x,y)\]\\odot (y-x) f(y,t) \\text{d} y\\right) f(x,t)\\right) for p\_a(x\_i…

---

## [Integrate convolution symbolically to solve PDE](https://discourse.julialang.org/t/integrate-convolution-symbolically-to-solve-pde/123810)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 2\
**Last updated:** [December 13, 2024, 9:32pm UTC](https://discourse.julialang.org/t/integrate-convolution-symbolically-to-solve-pde/123810 "2024-12-13T21:32:41Z")

</div>

I would like to solve a PDE with MethodOfLines.jl and ModellingToolkit.jl similar to the example docs.sciml.ai/MethodOfLines/stable/tutorials/PIDE/. My modification is to change the integral term. Instead of integrating …

---

## [Integration on an ordered domain](https://discourse.julialang.org/t/integration-on-an-ordered-domain/118180)

<div class="topic-metadata">

**Author:** [@IlliaFaraji](https://discourse.julialang.org/u/IlliaFaraji)\
**Replies:** 3\
**Last updated:** [August 14, 2024, 2:55pm UTC](https://discourse.julialang.org/t/integration-on-an-ordered-domain/118180 "2024-08-14T14:55:00Z")

</div>

I want to carry out an integral of this form \\int\_{0}^{\\infty} \\int\_{0}^{t\_{n}} \\ldots \\int\_{0}^{t\_2} \\ f(s\_1, \\ldots, s\_n)\\, \\mathrm{d}s\_1 \\ldots \\mathrm{d}s\_n , for n \\approx 10. The domain of integration here is S=…

---

## [Slow numerical integration of scalar function](https://discourse.julialang.org/t/slow-numerical-integration-of-scalar-function/114976)

<div class="topic-metadata">

**Author:** [@golanor](https://discourse.julialang.org/u/golanor)\
**Replies:** 1\
**Last updated:** [May 30, 2024, 5:16pm UTC](https://discourse.julialang.org/t/slow-numerical-integration-of-scalar-function/114976 "2024-05-30T17:16:24Z")

</div>

Hi, I’m trying to compute a set of integrals, and the integration takes a lot of time and allocates a lot. Is there a way to speed it up? MWE: using Integrals, BenchmarkTools const ω1, ω2 = 33.807, 37.822; const Ω1, …

---

## [Integration packages to calculate the first N Fourier coefficients](https://discourse.julialang.org/t/integration-packages-to-calculate-the-first-n-fourier-coefficients/114787)

<div class="topic-metadata">

**Author:** [@ccmejia](https://discourse.julialang.org/u/ccmejia)\
**Replies:** 3\
**Last updated:** [May 27, 2024, 6:54pm UTC](https://discourse.julialang.org/t/integration-packages-to-calculate-the-first-n-fourier-coefficients/114787 "2024-05-27T18:54:58Z")

</div>

I am trying to calculate the first N Fourier coefficients for sampled data (harmonic + gaussian like). The Riemann sum was my first approach, however I think the results are not enough accurate. Therefore, I am trying t…

---

## [QuadGK unexpected behavior on first degree polynomial](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 18, 2024, 2:25pm UTC](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134 "2024-04-18T14:25:34Z")

</div>

I constructed a tiny example on which my (naive?) use of the quadgk() fails. The example is a first order polynomial in x and y on the triangular domain with vertices (0,0), (1,0) and (0,1). Below a working and failing M…

---

## [How to evaluate multivariate log normal distribution at arbitrary point?](https://discourse.julialang.org/t/how-to-evaluate-multivariate-log-normal-distribution-at-arbitrary-point/112608)

<div class="topic-metadata">

**Author:** [@structural](https://discourse.julialang.org/u/structural)\
**Replies:** 2\
**Last updated:** [April 7, 2024, 9:46am UTC](https://discourse.julialang.org/t/how-to-evaluate-multivariate-log-normal-distribution-at-arbitrary-point/112608 "2024-04-07T09:46:47Z")

</div>

Suppose I have the following distribution over two variables dist = MvLogNormal(mean\_a\_b, cov\_a\_b) Suppose h is an array of dimension 1000\\times 2. For each row of array h, the first entry represents the rank of the …

---

## [Numerical integration over 3D domain of vector-valued function](https://discourse.julialang.org/t/numerical-integration-over-3d-domain-of-vector-valued-function/112284)

<div class="topic-metadata">

**Author:** [@Lisette\_de\_Bruin](https://discourse.julialang.org/u/Lisette_de_Bruin)\
**Replies:** 33\
**Last updated:** [April 6, 2024, 6:52pm UTC](https://discourse.julialang.org/t/numerical-integration-over-3d-domain-of-vector-valued-function/112284 "2024-04-06T18:52:50Z")

</div>

Hi all, I am interested in evaluating a volume integral of a vector-valued function. So the integral has the following form: I already tried to use nested quadgk and hcubature. Both methods give me the correct result…

---

## [Why does "QuadGK.jl" not behave the same as "Integrals.jl with QuadGKJL()"](https://discourse.julialang.org/t/why-does-quadgk-jl-not-behave-the-same-as-integrals-jl-with-quadgkjl/110795)

<div class="topic-metadata">

**Author:** [@Laura](https://discourse.julialang.org/u/Laura)\
**Replies:** 3\
**Last updated:** [February 29, 2024, 7:08am UTC](https://discourse.julialang.org/t/why-does-quadgk-jl-not-behave-the-same-as-integrals-jl-with-quadgkjl/110795 "2024-02-29T07:08:36Z")

</div>

I am writing a program to perform a spherical Bessel transformation which requires some one dimensional integrals but I am having some trouble with the Integrals.jl package. Naturally my first attempt to do this was to …

---

## [How to use autodiff with Quadrature.jl](https://discourse.julialang.org/t/how-to-use-autodiff-with-quadrature-jl/77437)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 4\
**Last updated:** [February 20, 2024, 7:47pm UTC](https://discourse.julialang.org/t/how-to-use-autodiff-with-quadrature-jl/77437 "2024-02-20T19:47:39Z")

</div>

I’m trying to use autodiff on a function that uses Quadrature.jl numerical integration. I’m getting an error and not sure why. Any suggestions? Thanks. The function f(y) is \\int\_0^y x dx - y (computed numerically using …

---

## [BatchIntegralFunction not appearing to work as intended](https://discourse.julialang.org/t/batchintegralfunction-not-appearing-to-work-as-intended/109513)

<div class="topic-metadata">

**Author:** [@HSnowden](https://discourse.julialang.org/u/HSnowden)\
**Replies:** 2\
**Last updated:** [February 3, 2024, 4:05am UTC](https://discourse.julialang.org/t/batchintegralfunction-not-appearing-to-work-as-intended/109513 "2024-02-03T04:05:09Z")

</div>

I am trying to implement a batch integral function using the new BatchIntegralFunction rather than then deprecated nout/batch keywords. However, when I do, the in-place vector to fill place the answer in is the incorrec…

---

## [Is there any documentation on "IntegralFunctions"](https://discourse.julialang.org/t/is-there-any-documentation-on-integralfunctions/108970)

<div class="topic-metadata">

**Author:** [@Laura](https://discourse.julialang.org/u/Laura)\
**Replies:** 8\
**Last updated:** [February 3, 2024, 12:36am UTC](https://discourse.julialang.org/t/is-there-any-documentation-on-integralfunctions/108970 "2024-02-03T00:36:50Z")

</div>

I have been trying to solve two integrals at the same time using the Integrals.jl Package. I am following the example in the documentation of Integrals.jl in the link below. My function that I am integrating is an in-…

---

## [Why does my cubature of ODESolution break down with finite limits?](https://discourse.julialang.org/t/why-does-my-cubature-of-odesolution-break-down-with-finite-limits/108736)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 18\
**Last updated:** [January 24, 2024, 11:04am UTC](https://discourse.julialang.org/t/why-does-my-cubature-of-odesolution-break-down-with-finite-limits/108736 "2024-01-24T11:04:34Z")

</div>

I want to find the multi-dimensional integral of a scalar-valued function with vector argument defined on a rectangle (basically, product of truncated PDFs). The argument of the function comes from solving a system of OD…

---

## [Guide to numerical integration methods?](https://discourse.julialang.org/t/guide-to-numerical-integration-methods/108704)

<div class="topic-metadata">

**Author:** [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Replies:** 10\
**Last updated:** [January 16, 2024, 11:03pm UTC](https://discourse.julialang.org/t/guide-to-numerical-integration-methods/108704 "2024-01-16T23:03:20Z")

</div>

To pile on with a related question, as a EE without a particularly deep math background, @stevengj do you have any handy references for the different integration methods and their advantages/pitfalls? I find myself writ…

---

## [Quadratures and cubatures with Dirac deltas](https://discourse.julialang.org/t/quadratures-and-cubatures-with-dirac-deltas/108683)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 11\
**Last updated:** [January 11, 2024, 6:46pm UTC](https://discourse.julialang.org/t/quadratures-and-cubatures-with-dirac-deltas/108683 "2024-01-11T18:46:46Z")

</div>

Are there ways to compute cubatures of functions that include the Dirac delta function?

---

## [How to improve the implementation of a function involving a numerical integration?](https://discourse.julialang.org/t/how-to-improve-the-implementation-of-a-function-involving-a-numerical-integration/105444)

<div class="topic-metadata">

**Author:** [@lsablon](https://discourse.julialang.org/u/lsablon)\
**Replies:** 7\
**Last updated:** [October 27, 2023, 4:10am UTC](https://discourse.julialang.org/t/how-to-improve-the-implementation-of-a-function-involving-a-numerical-integration/105444 "2023-10-27T04:10:03Z")

</div>

Hello, I am trying to optimize my code, but I don’t really know in which direction I should go (but I know I don’t want to use multithreading). Here is my goal: I want to implement the following function k\_\\perp(x,y;…

---

## [QuadGK returns NaNs](https://discourse.julialang.org/t/quadgk-returns-nans/105308)

<div class="topic-metadata">

**Author:** [@aner-sanchez](https://discourse.julialang.org/u/aner-sanchez)\
**Replies:** 4\
**Last updated:** [October 24, 2023, 1:24pm UTC](https://discourse.julialang.org/t/quadgk-returns-nans/105308 "2023-10-24T13:24:46Z")

</div>

Hello everyone :slight\_smile: Would someone know why using QuadGK n = 538 \_, w, \_ = kronrod(n,1e-11,40); @show w returns a vector of NaN weights at n=538 and not before?

---

## [How to compute integral of multivariate normal with bounds defined by lines](https://discourse.julialang.org/t/how-to-compute-integral-of-multivariate-normal-with-bounds-defined-by-lines/104160)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 13\
**Last updated:** [September 25, 2023, 8:10am UTC](https://discourse.julialang.org/t/how-to-compute-integral-of-multivariate-normal-with-bounds-defined-by-lines/104160 "2023-09-25T08:10:16Z")

</div>

Hi all, I would like to use Distributions.jl and HCubature.jl (or suitable alternative) to compute an integral over part of the domain of a multivariate normal distribution. The image below provides an example. In the i…

---

## [Definition of an integral function whose argument is the upper limit of integration](https://discourse.julialang.org/t/definition-of-an-integral-function-whose-argument-is-the-upper-limit-of-integration/103946)

<div class="topic-metadata">

**Author:** [@aburousan](https://discourse.julialang.org/u/aburousan)\
**Replies:** 2\
**Last updated:** [September 18, 2023, 2:01pm UTC](https://discourse.julialang.org/t/definition-of-an-integral-function-whose-argument-is-the-upper-limit-of-integration/103946 "2023-09-18T14:01:55Z")

</div>

Hi, I want to define a function let’s say, $$ f(x) = \\int\_0^x u^2 du /(e^{u^2+16} +1)^{\\frac{3/2}}$$ How can I do this?, A naive approach is to use a loop and just each time calculate the whole thing. But is there any…

---

## [How to evaluate a complex function between complex bounds](https://discourse.julialang.org/t/how-to-evaluate-a-complex-function-between-complex-bounds/102460)

<div class="topic-metadata">

**Author:** [@AkchurinDA](https://discourse.julialang.org/u/AkchurinDA)\
**Replies:** 2\
**Last updated:** [August 3, 2023, 10:43pm UTC](https://discourse.julialang.org/t/how-to-evaluate-a-complex-function-between-complex-bounds/102460 "2023-08-03T22:43:21Z")

</div>

I’m having trouble evaluating the following expression that contains an integral with a complex function with complex bounds. In this expression, \\phi() is the PDF of a standard normal distribution, \\beta is a number…

[Next page](https://discourse.julialang.org/tag/integral/576.md?match_all_tags=true&page=1&tags%5B%5D=integral)
