Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [quadrature]

Quadrature refers to techniques in numerical integration, such as Riemann sum approximations, Simpson's rule and Gaussian quadrature.

Filter by
Sorted by
Tagged with
2
votes
1answer
51 views

Change of Interval for Chebyshev–Gauss quadrature

I am curretly working to numerically evaluate an integral of the form: $$\int_{-1}^{1} f(x) \sqrt{1-x^2} dx$$ For this issue Gauss-Chebysehv integration of second kind seems ideal as it uses the ...
0
votes
0answers
38 views

Gauss Quadrature Error in 2D

Could someone tell me what is the error when applying the Gauss Quadrature rule in 2 dimensions? I know that for one dimension the error is $$\frac{(n!)^{4}}{(2n+1)[(2n)!]^{3}} \cdot f(\xi)^{2n}(b-a)...
0
votes
0answers
33 views

Gauss-Chebyshev Integration on arbitrary intervals

So, I would like to do a numerical integration of something of the form: $\int_{-1}^1 dx f(x) \sqrt{1-x^2}$ I tried this using Gauss-Legendre only to find out that the last second factor keeps the ...
2
votes
1answer
88 views

Gaussian quadrature: Orthogonal polynomial for chi distribution

I have a problem involving numerical integration of the form: $$I = \int_0^\infty \!dx \, w(x) f(x)$$ where the weighting function is a chi distribution of degree 2, i.e., $$w(x) = x \, e^{\frac{-...
4
votes
1answer
233 views

Interleaving of Gaussian quadrature nodes and weights

A Gaussian quadrature is used to approximate the following integral: $$ \int_{-1}^{1} f(x) dx \approx \sum_{i=1}^n w_i f(x_i). $$ Numerically I've found an interesting property of $x_i$ and $w_i$: if ...
1
vote
1answer
56 views

Riemann sum not converging

I am trying to find the volume of a hemisphere by numerical integration. I have a set of points equally spaced over x-y plane. I am trying to calculate its volume by trying to evaluate Riemann sum. $$...
0
votes
0answers
46 views

Change numerical integration range when using Gaussian quadrature

I have a little problem related to numerical integration. If someone knows the solution I would be very grateful for sharing. I'm calculating numerical integrals using Gaussian points $x_{1} , x_{2} ,...
4
votes
1answer
75 views

Gauss Legendre quadrature problem with Legendre polynomials composed with square root

Let $P_n$ be the orthogonal Legendre polynomial with a degree of $n$, meaning it satisfies the following recursive formula: $$(n+1)P_{n+1}(x)-(2n+1)xP_n(x)+nP_{n-1}(x)=0$$ where $P_0(x) = 1$ and $P_1(...
4
votes
2answers
227 views

Ancient Greek proofs of Archimedes' three properties of the parabola?

Please refer to the document, "Archimedes' Quadrature of the Parabola": https://www2.bc.edu/mark-reeder/1103quadparab.pdf This document describes how Archimedes proves that the area of any parabolic ...
0
votes
0answers
38 views

Minimum number of sub-intervals for the composite trapezoid rule.

I have been working on the following problem. Given a uniform partition of the interval [-2,2] the following integral is approximated using the composite trapezoid rule $$ I = \int_{-2}^{2} ln(1 + x^2)...
1
vote
1answer
26 views

Trapezoidal integration rule error analysis.

Let $f(x)\in C^2[a,b]$ and $p\in P_1$ its Lagrange interpolation polynom for nodes $a,b$: $$p(a) = f(a), ~p(b) = f(b).$$ Then the interpolation error is $$f(x) - p(x) = \frac{1}{2}(x-a)(x-b)f''(\xi(x))...
0
votes
0answers
24 views

Determination of Weights for Hierarchical Sparse Girds Quadrature

For the solving a $d$-dimensional SDE with a sparse grid algorithm related to an option pricing problem I ended up having to solve the following integral equation. $g_{\bar{l},\bar{i}} = \int_D p(e^{...
1
vote
1answer
45 views

Proof of exactness of Gaussian-Laguerre quadrature integration

The Laguerre polynomials $a_{0}(x), a_{1}(x), a_{2}(x), \dots$ form an orthogonal set on $[0, ∞)$ and satisfy: $\int_{0}^{\infty} e^{-x} a_{i}(x) a_{j}(x) d x=0, \quad i \neq j$ The polynomial $a_{n}...
0
votes
1answer
81 views

Exercise of quadrature and error.

I am trying to solve the following problem, but I can not understand it(in the school they did not teach us quadrature). From the nodes $x_0 = \frac{2}{3}$, $x_1 = \frac{5}{9}$ and $x_2 = \frac{65}{...
1
vote
1answer
237 views

Double Integral for Gaussian Quadrature

I am trying to apply the Gaussian-Legendre Quadrature rule to a Double Integral, namely $$ \int^1_0 \int^1_0 \text{sin}(x^2+y^2)dxdy $$ I have done the following: Define $\phi_n(x)$ is the Legendre ...
1
vote
1answer
45 views

Deriva parameters of Gauss quadrature rule

Derive the parameters of Guass quadrature with three points $$ \int_{-1}^1 f(x)\,\mathrm dx \approx C_1 f(\xi_1)+C_2 f(\xi_2) + C_3 f(\xi_3) $$ such that the integral is exact up to $x^5$. ...
0
votes
1answer
40 views

Are there quadrature methods allowing to track current progress, converging faster than Monte-Carlo?

Consider an integral to evaluate: $$I=\int_a^b f(x)\,\mathrm dx.\tag1$$ In the Monte-Carlo quadrature, if $I_n$ is $n$th estimate of $I$, then for $(n+1)$th estimate we have: $$I_{n+1}=\frac{nI_n+f(...
0
votes
0answers
28 views

When can one trust that an adaptive quadrature scheme is not missing nontrivial areas of the domain?

hcubature http://ab-initio.mit.edu/wiki/index.php/Cubature_(Multi-dimensional_integration) seems to be a useful package for computing multidimensional integrals numerically. However, I have come upon ...
0
votes
0answers
23 views

Roughness of $\int\sqrt{1-t^2}f(t)\,dt$ in $[-1,1]$

Why is this integrand non-smooth in $[-1,1]$? $$\int\sqrt{1-t^2}f(t)\,dt$$ where $f$ possesses an analytic extinction to a complex neighbourhood $[-1,1]$ More general, how can I find it out? Thanks ...
1
vote
0answers
31 views

CDF Approximation in Two Dimensions

Let $(\Omega, \mathcal{A}, \mathbb{P})$ be our respective probability space and $X$ a two-dimensional random variable with values on $[0,1]^2$ and probability density function $f(x_1,x_2)$ for $x_1, ...
0
votes
1answer
105 views

Determine Gaussian quadrature formula

I want to calculate the integral $$\int_0^1\frac{1}{x+3}\, dx$$ with the Gaussian quadrature formula that integrates exactly all polynomials of degree $6$. First of all do we have to transform the ...
0
votes
0answers
48 views

Why are isolated zeros allowed in the weight function?

In an exercise I have determined the Gaussian Quadrature formula and I have applied that also for a specific function. Then there is the following question: Explain why isolated zeros are allowed ...
0
votes
0answers
33 views

Gaussian Quadrature and Degree of Precision

how to prove a interpolatory quadrature has degree of precision k = 2n + 1 if and only if it is a Gaussian Quadrature
1
vote
1answer
29 views

Methods for Numerical Integration of a Definite Integral over Singularities

In studying the Schwarz-Christoffel mapping, I have come across certain integrals that I want to numerically integrate. For example, one such integral is: $\int_{0}^{1} (z^2 - z)^{-2/3} dz$ A ...
2
votes
0answers
141 views

Cubic Bézier curve arc length parametrization reversal: find t given a length

I am following this paper Approximate Arc Length Parametrization, M. Walter & A. Fournier, 1996 and have succesfully implemented the direct solution, as in finding the length $s(t)$ given $t$. ...
0
votes
0answers
45 views

Determining constants to make a quadrature formula with degree of precision equal to three.

I just need an explanation on how these linear equations are found when plugging and testing $f(x) = x^k. $ For example, in the first linear equation, what happens to the constants c and d. Why are ...
0
votes
1answer
40 views

Bisection Newton - Quadratures

The problem states the following: Find with at least 10 digitis of precisión the roots of the following equation: $\int_x^{x^2} \!e^{-t^2}\,\mathrm{d}t = x^5 -3x^2 + 1 $ in the closed Interval [-1,1]. ...
1
vote
0answers
38 views

Orthogonal polynomials on triangles: Connection with quadrature rules?

In a 1D interval $[a, b]$, quadrature rules and orthogonal polynomials are tightly interconnected. For example, given the $n$ roots $t_j$ of the $n$th orthogonal polynomial $p_n$, one has the ...
2
votes
0answers
122 views

References on quadrature of $\int_0^{\infty} f(x) \exp(-x^a) dx$

I am aware of Hermite-Gaussian quadrature techniques for integrals of the form $$ \int_0^{\infty} f(x) \exp(-x^2) dx $$ However, am I looking for references on quadrature where the exponent is more ...
3
votes
1answer
36 views

Approximating the first moment of h(x) where $x$~Lognomal($\mu, \sigma$)

What is the best way to approximate $E(h(X))$, where $X$ ~ Lognomal($\mu, \sigma$). So far, I can think of Monte Carlo Methods and Gaussian Hermite quadrature as below: \begin{align} E(h(X)) &= ...
1
vote
0answers
57 views

Can using Gauss-Hermite quadrature for estimation, introduce a bias?

I am using Gauss-Hermite quadrature to estimate E[h(x)] where x is a log normal random variable. I happen to see some bias in my final results. I was wondering if there is a formula specifying an ...
1
vote
1answer
98 views

Expressing a classic integral having no elementary primitive.

Some functions do not have primitive functions which are easy to express with elementary functions. A famous example is $$\int_a^be^{-x^2}dx$$ But what about if we can write $$=\int_a^b1\cdot e^{-...
0
votes
0answers
76 views

Comparison in the accuracy of Romberg Integration and Second Order Newton-Cotes Quadrature

Context I ask this question because I'm currently working on a program that solves the Cahn-Hilliard equation in 2D. For this project I need a subroutine to calculate the free energy functional by ...
0
votes
4answers
79 views

Finding $x(t)$ for the mechanical system $x'' = -x$

Using energy conservation theorem and method of integration by quadrature, find $x(t)$ for the mechanical system $x'' = -x$, considering a spring with mass $1$ and elasticity constant $1$. My attempt:...
3
votes
0answers
52 views

The Distribution of Abscissae and Sums of Weights in Gaussian Quadrature

Let $n$ be a positive integer, and for $i = 1, 2, \ldots, n$, let $x_i$ be the $i^\text{th}$ abscissa for $n$-point Gaussian quadrature, and $w_i$ the associated weight, so that $-1 < x_1 < x_2 &...
1
vote
0answers
83 views

Approximate Solution for $\int_{E_T}^\infty \frac{2 E b^\nu}{\Gamma (\nu)} \int_0^\infty x^{\nu -2}\exp(-b x)\exp(-(A^2 + E^2)/x) I_0(2EA/x) dx dE$

(This question is more about solving the integral than what the integral represents.) The homodyned K distribution has the following probability density function (PDF): $$ f(E | A, \nu, b) = \frac{2 ...
1
vote
0answers
86 views

3D Gauss-Hermite Quadrature

Is it possible to examine a 3D integral by using Gauss-Hermite quadrature type technique? I mean there might be an equation like this (with analogy to 1D Gauss-Hermite quadrature): $\int_{-1}^{-1} \...
0
votes
1answer
22 views

Error of a quadrature applied to an approximation of a function with its own error

This has come up with a math modeling project I am doing. To try and boil it down, suppose I am using a numerical quadrature such that $ \int_0^1 f(x) dx = \sum_{i=1}^n f(x_i) + O(h^n)$ where $O(h^n)...
1
vote
0answers
84 views

Proof of Newton–Cotes quadrature rules, I guess?

I've been searching for the proof of this formula, I think the main problem is that the book doesn't really give it a name, therefore it's hard to search it up even online. I read the topics suggested ...
1
vote
1answer
124 views

Quadrature exact for polynomials up to degree 3

Question: Consider the quadrature rule $$\int_{-1}^1 f(x)dx \approx w_{-1}f(-1)+w_0f(0)+w_1f(1)+w'_0f'(0)$$ Compute the weights such that the polynomial is exact up to degree 3. Answer: When I ...
1
vote
0answers
241 views

Integration using Gauss-Laguerre quadrature

I need to solve integral using Gauss-Lagerre'e quadrature: $\int_0^\infty e^{-10x}(5x^3-\pi)$ on interval [0, $\infty$). I am not really familiar with this kind of methods, but I need to solve it ...
1
vote
1answer
38 views

Composite Lagrangian Quadrature rule for sin(x)

Suppose we want to estimate $\int_0^{h}f(x) dx$ using Lagrangian interpolating polynomials and with nodes $x_0 = 0,x_1 = \frac{2}{3}h$. Thus we compute the quadrature rule $$ Q(f) = a_0f(0)+a_1f(\...
1
vote
0answers
329 views

Gaussian Quadrature Error Estimate

According to Chapter 5 of Numerical Methods and Software by Kahaner, et al. (1989), it can be shown that the error associated with Gaussian quadrature is $\displaystyle\int_a^b f(x)\,dx - \sum_{i=1}^...
0
votes
0answers
49 views

Can a recursive, continuous integral be approximated with Gauss-Legendre or similar?

Maybe I need to reformulate(?). Suppose there is this simple function: $$f(x)=\int_a^b{x \text{d}x}$$ If it were to be discretized, there would be losses due to sampling. In order for the errors to ...
0
votes
1answer
340 views

Gauss-Legendre vs Gauss-Chebyshev quadratures (and Clenshaw-Curtis)

There's a point I wish to elucidate about integrating polynomials. It is known that functions are better approximated by polynomials with non-uniformly spaced nodes, which is why Gauss quadratures ...
1
vote
0answers
268 views

how to implement adaptive gaussian (kronrod?) quadrature (technicalities)

I am trying to figure out what is the best way to implement an adaptive quadrature scheme which preferentially makes use of guassian quadrature. Guassian quadrature doesn't really give any easily ...
2
votes
1answer
147 views

Why not simply use sine weights with Clenshaw-Curtis nodes?

Clenshaw-Curtis quadrature is based on writing $$ \int_{-1}^{1} f(x)dx=\int_{0}^{\pi}f(\cos y)\sin y dy $$ and then replacing $f(\cos y)$ by a truncated Fourier series, so that the integral can be ...
1
vote
2answers
352 views

High accuracy root finder of Legendre polynomials' derivatives?

I need GLL (Gauss-Legendre-Lobatto) nodes for the Legendre-Galerkin-NI spectral method. It requires me to find the roots of the derivatives of Legendre polynomials. My Matlab program calculates the ...
2
votes
1answer
122 views

the highest degree of the polynomial, for which the above formula is exact?

Consider the quadrature formula $\int _{-1}^1\vert x \vert f(x)dx \approx \frac{1}{2}[f(x_0)+f(x_1)]$, where $x_0$ and $x_1$ are quadrature points. Then the highest degree of the polynomial, for which ...
0
votes
2answers
163 views

How to obtain the coefficients of a trigonometric polynomial by evaluating at well-chosen points?

Suppose that we are given the trigonometric polynomial $$ P_M(t)=a_0 +\sum_{m=1}^M a_m \cos(mt)+b_m\sin(mt),\quad t\in[-\pi, \pi]. $$ Question. How to find nodes $t_1, t_2\ldots t_K\in [-\pi, \pi]...