# \#integral

**URL:** https://discourse.julialang.org/tag/integral/576.md?page=1

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

**Page:** 2

---

## [Handling an overflow example in QuadGK](https://discourse.julialang.org/t/handling-an-overflow-example-in-quadgk/101657)

<div class="topic-metadata">

**Author:** [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Replies:** 5\
**Last updated:** [July 16, 2023, 2:06pm UTC](https://discourse.julialang.org/t/handling-an-overflow-example-in-quadgk/101657 "2023-07-16T14:06:11Z")

</div>

Someone asked me this question over email, and I decided to post my answer here since it might be of more general interest. Suppose that we are trying to compute \\int\_0^\\infty (e^y - 1) \\frac{e^{-2.5y}}{y^{1.2}} dy. Th…

---

## [Computing expectation of nonlinear function of multinomial logit](https://discourse.julialang.org/t/computing-expectation-of-nonlinear-function-of-multinomial-logit/80575)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 4\
**Last updated:** [June 29, 2023, 6:03pm UTC](https://discourse.julialang.org/t/computing-expectation-of-nonlinear-function-of-multinomial-logit/80575 "2023-06-29T18:03:25Z")

</div>

Suppose I have constants \\{\\delta\_j\\}\_{j \\in J} and have random variables \\{\\varepsilon\_j\\}\_{j\\in J} distributed iid according to type I extreme value distribution as in a standard multinomial logit model. Let F: \\mathbb…

---

## [Performance problems in one-dimensional complex integration](https://discourse.julialang.org/t/performance-problems-in-one-dimensional-complex-integration/100912)

<div class="topic-metadata">

**Author:** [@javier\_mj](https://discourse.julialang.org/u/javier_mj)\
**Replies:** 15\
**Last updated:** [June 27, 2023, 10:52pm UTC](https://discourse.julialang.org/t/performance-problems-in-one-dimensional-complex-integration/100912 "2023-06-27T22:52:23Z")

</div>

Hello to all I am currently moving some code to Julia with the intention of improving performance. However, within a function I am running into a bottleneck when calculating the integral in one dimension of a complex fu…

---

## [Assemble load line vector](https://discourse.julialang.org/t/assemble-load-line-vector/100575)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 5\
**Last updated:** [June 20, 2023, 6:53pm UTC](https://discourse.julialang.org/t/assemble-load-line-vector/100575 "2023-06-20T18:53:02Z")

</div>

hi, I want to integrate applied displacement on a load line and assemble the vector on my FE test space(V0\_Disp) but it gives me error. is there anyone who knows what should i do to solve this? dirichlet\_tags = \["LeftSu…

---

## [Integro-DDE that includes integral over delta function](https://discourse.julialang.org/t/integro-dde-that-includes-integral-over-delta-function/100429)

<div class="topic-metadata">

**Author:** [@rogue26](https://discourse.julialang.org/u/rogue26)\
**Replies:** 2\
**Last updated:** [June 16, 2023, 12:36pm UTC](https://discourse.julialang.org/t/integro-dde-that-includes-integral-over-delta-function/100429 "2023-06-16T12:36:07Z")

</div>

Hi everyone. I’ve solved some DDE systems in Julia, but I’m stumped on my latest problem. I’m not sure if this is a math question or a Julia question, but I’d appreciate any guidance you can provide. How would you go ab…

---

## [Symbolic integration with SymPy.jl](https://discourse.julialang.org/t/symbolic-integration-with-sympy-jl/78624)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 6\
**Last updated:** [June 6, 2023, 8:14am UTC](https://discourse.julialang.org/t/symbolic-integration-with-sympy-jl/78624 "2023-06-06T08:14:57Z")

</div>

I ran into a problem with SymPy.jl for symbolic integration, using SymPy m = symbols(“m”, integer=true) n = symbols(“n”, integer=true) x = symbols(“x”, integer=true) integrate(diff(x^4,(x,2)),x) The output is 4\*…

---

## [Volume integral in Julia?](https://discourse.julialang.org/t/volume-integral-in-julia/98085)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [April 29, 2023, 2:21pm UTC](https://discourse.julialang.org/t/volume-integral-in-julia/98085 "2023-04-29T14:21:14Z")

</div>

Hello! Is something like this possible in Julia, here an example from Matlab: Where it is possible to perform a volume integral using non-constant values in the limits? EDIT: Just to make it a bit easier I pasted …

---

## [\[Help\] Nested ForwardDiff.jacobian of an Integrals.IntegralProblem](https://discourse.julialang.org/t/help-nested-forwarddiff-jacobian-of-an-integrals-integralproblem/97430)

<div class="topic-metadata">

**Author:** [@aafsar](https://discourse.julialang.org/u/aafsar)\
**Replies:** 2\
**Last updated:** [April 13, 2023, 5:36pm UTC](https://discourse.julialang.org/t/help-nested-forwarddiff-jacobian-of-an-integrals-integralproblem/97430 "2023-04-13T17:36:03Z")

</div>

I have an integration problem (actually vector-valued, but problem here applies to scalar-valued ones as well) as a part of my model which it might be helpful to calculate its Hessian. I follow the documentation of Integ…

---

## [Approximate inverse of a definite integral](https://discourse.julialang.org/t/approximate-inverse-of-a-definite-integral/83181)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [March 31, 2023, 3:09pm UTC](https://discourse.julialang.org/t/approximate-inverse-of-a-definite-integral/83181 "2023-03-31T15:09:41Z")

</div>

For a given (fixed) function f: \[0,1\] \\to \[0, \\infty), let g(x) = \\int\_0^x f(x) dx and h(x) = \\frac{g(x)}{g(1)} h is then, by construction, \[0,1\] \\to \[0,1\]. I need a fast approximation of its inverse: I am OK with …

---

## [Domain error with QuadGK to derive Caputo derivative](https://discourse.julialang.org/t/domain-error-with-quadgk-to-derive-caputo-derivative/96550)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 2\
**Last updated:** [March 24, 2023, 3:57pm UTC](https://discourse.julialang.org/t/domain-error-with-quadgk-to-derive-caputo-derivative/96550 "2023-03-24T15:57:06Z")

</div>

Hi everyone! I’m trying to evaluate caputo derivative using Quadgk. It works unless when t=3 it gives me Domain error. With Mathematica I got the value -3.11522 using QuadGK, ForwardDiff, SpecialFunctions f(t)=t^2\*sin(t…

---

## [How to speed up the numerical integration with interpolation](https://discourse.julialang.org/t/how-to-speed-up-the-numerical-integration-with-interpolation/96223)

<div class="topic-metadata">

**Author:** [@J\_I](https://discourse.julialang.org/u/J_I)\
**Replies:** 7\
**Last updated:** [March 17, 2023, 7:40am UTC](https://discourse.julialang.org/t/how-to-speed-up-the-numerical-integration-with-interpolation/96223 "2023-03-17T07:40:41Z")

</div>

Hi, I have performance problem regarding numerical integration and interpolation. I want to perform numerical integration with interpolation like below. using Dierckx using QuadGK function test() x = 0:0.01:1000 …

---

## [Numerical integration only with evaluated point](https://discourse.julialang.org/t/numerical-integration-only-with-evaluated-point/63552)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 6\
**Last updated:** [March 13, 2023, 2:17am UTC](https://discourse.julialang.org/t/numerical-integration-only-with-evaluated-point/63552 "2023-03-13T02:17:33Z")

</div>

Hi, I’d like to integrate a function numerically. I found some packages, e.g., QuadGK.jl, it seems only supports numerical integration with a given function. In my case, suppose we cannot access the function at arbitr…

---

## [Integration of arbitrarily-spaced data](https://discourse.julialang.org/t/integration-of-arbitrarily-spaced-data/94533)

<div class="topic-metadata">

**Author:** [@SantiagoOrtiz](https://discourse.julialang.org/u/SantiagoOrtiz)\
**Replies:** 2\
**Last updated:** [February 13, 2023, 7:25am UTC](https://discourse.julialang.org/t/integration-of-arbitrarily-spaced-data/94533 "2023-02-13T07:25:22Z")

</div>

Hello all, Is there any function/package in Julia that I could use to integrate one-dimensional arbitrarily-spaced data? NumericalIntegration has several options, but they require evenly spaced data. Best, Santiago

---

## [\[ANN\] SimplicialCubature.jl](https://discourse.julialang.org/t/ann-simplicialcubature-jl/91255)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 7\
**Last updated:** [December 5, 2022, 2:37pm UTC](https://discourse.julialang.org/t/ann-simplicialcubature-jl/91255 "2022-12-05T14:37:53Z")

</div>

Hello, I made a package for the numerical integration of a multivariate function on a simplex: SimplicialCubature.jl. This is a port of the R package SimplicialCubature. The integration is adaptive. There’s also a fun…

---

## [Exact integral of a polynomial over a simplex](https://discourse.julialang.org/t/exact-integral-of-a-polynomial-over-a-simplex/91132)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 5\
**Last updated:** [December 3, 2022, 8:26pm UTC](https://discourse.julialang.org/t/exact-integral-of-a-polynomial-over-a-simplex/91132 "2022-12-03T20:26:30Z")

</div>

Hello, I wrote a function which computes the exact value of a multivariate polynomial over a simplex. I’m open to any comment on my code. I also implemented this method in Python. I’m sure it is correct, I multi-checke…

---

## [1D adaptive integration of a function with a parameter](https://discourse.julialang.org/t/1d-adaptive-integration-of-a-function-with-a-parameter/90365)

<div class="topic-metadata">

**Author:** [@sylvian\_kahane](https://discourse.julialang.org/u/sylvian_kahane)\
**Replies:** 2\
**Last updated:** [November 17, 2022, 11:29am UTC](https://discourse.julialang.org/t/1d-adaptive-integration-of-a-function-with-a-parameter/90365 "2022-11-17T11:29:03Z")

</div>

The hquadrature (hcubature) does not offer the possibility to transfer arguments to the integrand (like using args=() in scipy.integrate). I have an integrand func(x, E) depending on the independent variable x and on th…

---

## [How to call multi-dimensional vector value Vectorized Cubature numerical integration?](https://discourse.julialang.org/t/how-to-call-multi-dimensional-vector-value-vectorized-cubature-numerical-integration/90200)

<div class="topic-metadata">

**Author:** [@swish47](https://discourse.julialang.org/u/swish47)\
**Replies:** 2\
**Last updated:** [November 13, 2022, 9:16pm UTC](https://discourse.julialang.org/t/how-to-call-multi-dimensional-vector-value-vectorized-cubature-numerical-integration/90200 "2022-11-13T21:16:56Z")

</div>

As the topic, I want to use parallelized numerical integration. However, since the special receives of hcubature with vector-valued integrands, and I don’t know how to set each components of v respectively, there is a pr…

---

## [Unreasonable slow speed in numerical integration](https://discourse.julialang.org/t/unreasonable-slow-speed-in-numerical-integration/89910)

<div class="topic-metadata">

**Author:** [@swish47](https://discourse.julialang.org/u/swish47)\
**Replies:** 16\
**Last updated:** [November 12, 2022, 7:15pm UTC](https://discourse.julialang.org/t/unreasonable-slow-speed-in-numerical-integration/89910 "2022-11-12T19:15:45Z")

</div>

I hope to compute an intergration of a function with intergration inside, however the efficiency is extremely slow. using HCubature,QuadGK,NumericalIntegration spinonenergy(kx::Float64,ky::Float64)::Float64=2\*(cos(kx)+c…

---

## [Simpsons Rule](https://discourse.julialang.org/t/simpsons-rule/84114)

<div class="topic-metadata">

**Author:** [@simonluzara](https://discourse.julialang.org/u/simonluzara)\
**Replies:** 23\
**Last updated:** [September 5, 2022, 1:25pm UTC](https://discourse.julialang.org/t/simpsons-rule/84114 "2022-09-05T13:25:34Z")

</div>

Hello everyone, am a new enthusiastic member of julia community. I have spent quite a fair share of time watching tutorials from Chris and all the others. I have a matlab simpsons rule code which was very generic for nu…

---

## [How do I do a fast cumulative integration](https://discourse.julialang.org/t/how-do-i-do-a-fast-cumulative-integration/85574)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 8\
**Last updated:** [August 11, 2022, 1:14pm UTC](https://discourse.julialang.org/t/how-do-i-do-a-fast-cumulative-integration/85574 "2022-08-11T13:14:02Z")

</div>

What are my options for a fast cumulative integration? I can use one of many quadrature packages but this does not scale. using QuadGK f = cos x₁ = 0.0 int\_f(x₂) = quadgk(f, x₁, x₂)\[1\] using Plots plot(\[f, int\_f\], xlim…

---

## [Numerical integration of vector-valued functions using Julia packages](https://discourse.julialang.org/t/numerical-integration-of-vector-valued-functions-using-julia-packages/85413)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 3\
**Last updated:** [August 6, 2022, 10:26pm UTC](https://discourse.julialang.org/t/numerical-integration-of-vector-valued-functions-using-julia-packages/85413 "2022-08-06T22:26:32Z")

</div>

Hi, I need to compute the following integral \\int\_{0}^{t} e^{At'}b \\,dt' where A is a real-valued matrix of size (m x m), and b is a real-valued column vector of size (m x 1). The current method I have implemented to c…

---

## [Unbounded Numerical Integration, non-centered](https://discourse.julialang.org/t/unbounded-numerical-integration-non-centered/84947)

<div class="topic-metadata">

**Author:** [@Ross\_Boylan](https://discourse.julialang.org/u/Ross_Boylan)\
**Replies:** 3\
**Last updated:** [July 29, 2022, 1:43am UTC](https://discourse.julialang.org/t/unbounded-numerical-integration-non-centered/84947 "2022-07-29T01:43:31Z")

</div>

I’m interested in integrating f(x)\\phi(x) over the entire real line, where \\phi(x) is the Gaussian/Normal density function. Ordinarily the Gauss-Hermite method in FastGaussQuadrature would be good for this (with suitabl…

---

## [How can I reduce memory consumption when using Zygote and Integrals together](https://discourse.julialang.org/t/how-can-i-reduce-memory-consumption-when-using-zygote-and-integrals-together/84638)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 0\
**Last updated:** [July 22, 2022, 3:43pm UTC](https://discourse.julialang.org/t/how-can-i-reduce-memory-consumption-when-using-zygote-and-integrals-together/84638 "2022-07-22T15:43:25Z")

</div>

Let’s start with a simple example: julia\> using Integrals julia\> using SciMLSensitivity julia\> using BenchmarkTools julia\> using Zygote julia\> f(x,h)=sin(x)\*exp(h\*cos(x)) f (generic function with 1 method) julia\> …

---

## [MultiResidue.jl (A new package to calculate the multi-variable residue)](https://discourse.julialang.org/t/multiresidue-jl-a-new-package-to-calculate-the-multi-variable-residue/82028)

<div class="topic-metadata">

**Author:** [@gangchern](https://discourse.julialang.org/u/gangchern)\
**Replies:** 18\
**Last updated:** [June 7, 2022, 5:54am UTC](https://discourse.julialang.org/t/multiresidue-jl-a-new-package-to-calculate-the-multi-variable-residue/82028 "2022-06-07T05:54:28Z")

</div>

I am announce a new package onMultiResidue.jl, which is used to calculate the multi-variable residue over a zero-dimensional point in multi-variable complex space. The method and Mathematica code have beed included in M…

---

## [Is Julia integral calculation not as fast as MATLAB?](https://discourse.julialang.org/t/is-julia-integral-calculation-not-as-fast-as-matlab/79824)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 20\
**Last updated:** [April 22, 2022, 2:08pm UTC](https://discourse.julialang.org/t/is-julia-integral-calculation-not-as-fast-as-matlab/79824 "2022-04-22T14:08:34Z")

</div>

I found it was slow when I used QuadGK.jl to do integral calculation. Then I used MATLAB to make a comparison and found that Julia integral was slower than MATLAB. Here are my comparisons: julia\> using QuadGK julia\> f(…

---

## [Numerical computation of continuous Fourier transforms](https://discourse.julialang.org/t/numerical-computation-of-continuous-fourier-transforms/77999)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 3\
**Last updated:** [March 17, 2022, 10:05am UTC](https://discourse.julialang.org/t/numerical-computation-of-continuous-fourier-transforms/77999 "2022-03-17T10:05:45Z")

</div>

Are there any packages available for computation of Fourier transforms of the form F(x\_k) = \\int\_{-\\infty}^\\infty f(t)\\mathrm{e}^{-\\mathrm{i}tx\_k}\\,\\mathrm{d}t? e.g. the method developed by DBailey and Swarztrauber (The …

---

## [Hcubature - New to Julia](https://discourse.julialang.org/t/hcubature-new-to-julia/77155)

<div class="topic-metadata">

**Author:** [@maria96](https://discourse.julialang.org/u/maria96)\
**Replies:** 7\
**Last updated:** [February 27, 2022, 10:45pm UTC](https://discourse.julialang.org/t/hcubature-new-to-julia/77155 "2022-02-27T22:45:48Z")

</div>

Hi all! I’m very new to Julia so this may be quite simple I don’t know. I have two functions written in Julia that I want to integrate and both should give a value very close to 1. They both produce the same type of var…

---

## [Function defined as multidimensional integral](https://discourse.julialang.org/t/function-defined-as-multidimensional-integral/73535)

<div class="topic-metadata">

**Author:** [@Federico\_Compagnin](https://discourse.julialang.org/u/Federico_Compagnin)\
**Replies:** 5\
**Last updated:** [December 23, 2021, 6:31pm UTC](https://discourse.julialang.org/t/function-defined-as-multidimensional-integral/73535 "2021-12-23T18:31:26Z")

</div>

Hi, I’m trying to define a new function as follows: meaning, I’d like to integrate over x and y, leaving z as a variable. I thought maybe to integrate z over (0,z) and then differentiate the function with respect to z…

---

## [\`Inf\` does not work in \`quadgk!()\`](https://discourse.julialang.org/t/inf-does-not-work-in-quadgk/72838)

<div class="topic-metadata">

**Author:** [@HJWang](https://discourse.julialang.org/u/HJWang)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 6:09pm UTC](https://discourse.julialang.org/t/inf-does-not-work-in-quadgk/72838 "2021-12-09T18:09:50Z")

</div>

I tried to use quadgk!(), which is the in-place quadgk(), but encountered problems. Simply put, quadgk!() does not accpet Inf or -Inf in the domain boundary while it is not a problem with quadgk(). The following is a MWE…

---

## [Unexpected behavior of QuadGK with extended precision floats](https://discourse.julialang.org/t/unexpected-behavior-of-quadgk-with-extended-precision-floats/72684)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 4\
**Last updated:** [December 7, 2021, 9:42pm UTC](https://discourse.julialang.org/t/unexpected-behavior-of-quadgk-with-extended-precision-floats/72684 "2021-12-07T21:42:36Z")

</div>

This topic arose from a topic in the Fortran Discourse group. Calling the gauss function from the QuadGK package produces different results depending on how it was previously called. Here is an example: …

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

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