Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [quadrature]

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

0
votes
0answers
11 views

Function smoothness

why is this integrand non-smooth in +/- 1? ∫ √‾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 a lot!
2
votes
0answers
32 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
20 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
33 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
12 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
116 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
30 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
14 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 ...
0
votes
0answers
45 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
74 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:...
1
vote
1answer
75 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^{-...
3
votes
0answers
42 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
75 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
37 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
20 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)...
0
votes
0answers
37 views

weigths of gaussian quadrature

How can I show that the weights $w_i$ of the gaussian quadrature are always positive? We have the the gaussian quadrature formula: $\sum_{i=1}^n w_if(x_i)$
1
vote
0answers
31 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 ...
0
votes
0answers
50 views

Quadrature of Lagrangian basis functions with varying Jacobian in finite element method

I am attempting to create a 2D discontinuous Galerkin solver for the Navier-Stokes equations on a structured quadrilateral grid. I am running into problems with quadrature of the "volume" integral for ...
1
vote
1answer
50 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
79 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 ...
0
votes
0answers
20 views

Quadrature formulas.

Let $a,b \in \mathbb{R}$ and $f:[a,b]\rightarrow \mathbb{R}$ a function.Let the aproximation of function $f$ be made with the polynomials $P_n:[a,b]\rightarrow\mathbb{R}$ of degree $n \in \{0,1,2,3\}$ ...
0
votes
0answers
43 views

Gauss-Legendre and Gauss-Chebyshev error estimates

I would like to estimate the error when calculating the value of the integral $$\int_{-1}^1\frac{e^{-x^2}}{\sqrt{1-x^2}}$$ an 8-point Gauss-Legendre quadrature and an 8-point Gauss-Chebyshev ...
1
vote
1answer
33 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(\...
0
votes
0answers
15 views

How to interpret/understand polynomial r in proof for the weights in the Gauss rule being positive

I am trying to proof the following statement: "the weights in the Gauss rule are positive:" by definition $w_i = \int_{a}^{b}Li$ ( from now on notated as I[Li] ) with Li being the Lagrange ...
1
vote
0answers
78 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
22 views

Quadrature of rather symmetric moderate-dimensional functions

I'm interested in doing some quadrature in dimension 5, .., 10 so am thinking of sums like $$ \sum_{1 \leq i, j, \ldots k \leq n} f_{i, j,\ldots, k} $$ the summands corresponding to the contribution ...
0
votes
0answers
47 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
157 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
147 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 ...
5
votes
1answer
138 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 ...
1
vote
2answers
217 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
114 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 ...
2
votes
1answer
87 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 ...
4
votes
1answer
175 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 ...
0
votes
1answer
39 views

Finding formula for error in the basic midpoint rule

I wanted to derive the formula for the error in the basic midpoint rule. For the error I found $$E(f)= \int_{a}^{b} f[\tfrac{a+b}{2},x](x-\tfrac{a+b}{2})\,dx.$$ I didn't know how to go from here so ...
0
votes
2answers
89 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]...
0
votes
1answer
123 views

Quadrature Rule Error and Peano Kernel

Consider the following quadrature: $$\int_0^1 x^cf(x)dx\approx Af(0)+B\int_0^1 f(x)dx, c>1, \neq 0$$ Determine A and B such that this rule has a degree of exactness 1. Let $E(f)$ be the error ...
1
vote
3answers
52 views

Why does $ \int_{\Omega} f\, dA = 2\pi \,f(0) $ and not zero?

I have been experimenting with quadrature domains. The most obvious one is a circle. Let $f(z)$ be holomorphic on a large enough region and $\Omega= \{|z| < 1 \}$ then: $$ \int_{\Omega} f\, dA = ...
3
votes
1answer
215 views

If the Gaussian Quadrature approximations are eventually all equal is the function a polynomial?

For a fixed function $f$ defined on $[-1, 1]$, let's define $$G_m(f)=\sum_{k=1}^m w_k^{(m)}f\left(x_k^{(m)}\right)$$ where $x_1^{(m)}, x_2^{(m)}, \ldots, x_m^{(m)}$ are the $m$ roots of the $m$th ...
1
vote
1answer
38 views

Approximation to $\int_{-1}^{1}f(x)dx$ using only $f(0)$, $f'(-1)$, and $f''(1)$

The exercise is Using only $f(0)$, $f'(-1)$, and $f''(1)$, compute an approximation to $\int_{-1}^{1}f(x)dx$ that is exact for all quadratic polynomials I have only seen guassian quadrature ...
0
votes
1answer
58 views

Show that the trapezoid rule is more precise than Simpson rule for $x^{5} - \alpha \cdot x^{4}$

I need to show that for $\int_{0}^{1}(x^{5}-\alpha \cdot x^{4})dx$, the trapezoid rule is more precise than Simpson when $\frac{15}{14} < \alpha < \frac{85}{74}$ What I have done : Trapezoid ...
0
votes
1answer
147 views

Gauss - Chebyshev Quadrature confusion. Please help.

So I'm reading my lecturer's notes on Gauss-Chebyshev Quadrature (lecturer uses the word Formulation instead of Quadrature) and there is a point where he lost me completely. Here are his notes and ...
1
vote
1answer
384 views

Numerical Convergence of Trapezoidal Rule

So I am implementing the trapezoidal rule as my choice of quadrature. Most functions seem to be second order convergence except for two: $$ f(x) = e^{cos(x)} - .1cos(x), \quad x \in [-7, -2] $$ The ...
0
votes
3answers
319 views

Gaussian quadrature with weight function x^2

I would like to get the points and weights of Gaussian quadrature formulas for $$ \int_{-1}^{+1} x^2 f(x)\;\text{d}x. $$ Is this tabulated anywhere yet?
0
votes
1answer
114 views

Simple Gaussian Quadrature Confusion

I'm trying to compute $\int_0^4 x^2 dx$ using 2-point Gaussian quadrature. This should give an exact result since for 2 points, we can exactly handle polynomials of degree 2*2-1=3. By the usual ...
0
votes
1answer
86 views

Degree of accuracy for the Gauss-Lobatta quadrature formula

We would like to approximate the integral of $f$ over an interval $[a,b]$ with positive measure $\mu$. To this end, we choose $n$ points $x_1, x_2, \ldots, x_n$ inside the open interval $(a,b)$ ...
1
vote
0answers
92 views

How to calculate the mean and the variance for the function with Multidimensional Polynomial Chaos Approach?

I would like to calculate the mean and the variance for the function f(x1,x2)=pi*(x1-1)*sin(pi*x1)*(1-x2^2); (x1,x2)->Uniform distribution [-1,1] using the ...
1
vote
0answers
21 views

Sampling Method to Calculate Result of High Dimension Integral

I need to calculate the average outputs ($Y_j$) from a non-linear simulation model ($M_j$) which takes a large number of possible input strings ($B_i$). $$Y_j = E(M_j(B_i))$$ Each $B_i=(b_{i,1},b_{...
0
votes
2answers
194 views

Error of composite trapezium rule

Given the integral $$\int_{1}^{\infty} \frac{e^{-x}}{x^2}dx$$ I want to find a value of $b >1$, and a number of intervals $n$ such that the error in $$\int_{1}^{b} \frac{e^{-x}}{x^2}dx$$ is less ...
1
vote
1answer
63 views

Integrate over a triangle in the 2D normal distribution

I'd like to evaluate following expression efficiently (numerically). $$g_a(x) := \int_0^x e^{-t^2} \int_0^{at} e^{-s^2} dsdt$$ If I want a given fixed accuracy, and evaluate both integrals using e.g....