Skip to main content
40 votes
Accepted

How does Mathematica do symbolic integration?

An overview by one of the developers of Mathematica, focusing on definite integrals, is at Symbolic definite integration: methods and open issues. Mathematica knows all the entries in Gradshteyn-...
Carlo Beenakker's user avatar
25 votes

How does Mathematica do symbolic integration?

Maple uses the Risch algorithm; see Keith Geddes and George Lebahn, Symbolic and numeric integration in Maple
Ben McKay's user avatar
  • 25.7k
17 votes

How does Mathematica do symbolic integration?

People usually mention the Risch algorithm first, as other answers have. Another approach, which is surprisingly successful, is to do what you or I would when solving integrals: look for patterns for ...
Szabolcs Horvát's user avatar
11 votes
Accepted

Expected number of lines meeting four given lines or "what is 1.72..."

The integrand is periodic modulo $\pi$ in each variable, so it suffices to integrate each variable over $[0, \pi]$ and replace the constant factor by $2^{-7}$. If we were to apply a change of ...
Adam P. Goucher's user avatar
11 votes

How does Mathematica do symbolic integration?

One approach to symbolic integration is using representations as Holonomic functions (https://en.wikipedia.org/wiki/Holonomic_function): solutions to differential equations of the form: $$p_r f^{(r)} +...
TomKern's user avatar
  • 429
9 votes
Accepted

Numerical integration method that doesn't involve derivative in the error bound

If $f$ is of bounded variation $V(f)$, then Koksma's inequality (Theorem 5.1 in Kuipers & Niederreiter, Uniform Distribution of Sequences) says $$ \left|{1\over N}\sum_{n=1}^Nf(x_n)-\int_0^1f(t)\,...
Gerry Myerson's user avatar
7 votes

A numerical calculation for an integral

Nemo's representation of $F(\eta)$ in terms of a hypergeometric function can be evaluated without difficulty for large $\eta$: $$F(\eta)=\frac{\sqrt{3} {\eta}^2 \Gamma \left(\frac{2}{3}\right) \; ...
Carlo Beenakker's user avatar
6 votes

Applications of Fourier Transforms in Number Theory

Do you know the Riemann zeta function ? $\displaystyle\frac{\log \zeta(\sigma+2i\pi \xi)}{\sigma+2i\pi \xi}$ is the Fourier transform of the prime counting function $\displaystyle J(e^u) e^{-\sigma u}...
reuns's user avatar
  • 3,425
5 votes

Real world example of use of Monte Carlo method for high dimensional integrals

Some buzzwords that should lead to some non-textbook examples: In the fields of uncertainty quantification, statistical inverse problems or Bayesian inference one wants, for example, compute ...
Dirk's user avatar
  • 12.4k
5 votes

Numerical integration method that doesn't involve derivative in the error bound

$\newcommand\Z{\mathbb Z}\newcommand\R{\mathbb R}\newcommand\la{\lambda}$If $f$ is an arbitrary Lebesgue-integrable function, then, as is done in a definition of the Lebesgue integral, it makes sense ...
Iosif Pinelis's user avatar
4 votes

Expected number of lines meeting four given lines or "what is 1.72..."

If anyone is still interested, Antonio Lerario and I recently published a paper: Probabilistic Schubert Calculus: Asymptotics, in which we give a more convenient formula to compute this number. What ...
L.Mathis's user avatar
4 votes

Fourier series of $e^{(\cos(\pi x) - m)^2}$

For large $s$ a single sum in terms of a hypergeometric function may be useful, $$c_{p}=\frac{(-1)^p}{2^p p!}\sum_{n=0}^\infty\frac{(n)_p}{(2s)^{n}n!}(m+1)^{n-p} {}_2F_1\bigl(p+1/2,p-n,2p+1,2/(m+1)\...
Carlo Beenakker's user avatar
4 votes

Intractability of an integral by deterministic numerical methods

For small $n$ Monte Carlo integration is not needed. For $n$ up to 100 see Kolmogorov-Smirnov Tests when Parameters are Estimated with Applications to Tests of Exponentiality and Tests on Spacings (...
Carlo Beenakker's user avatar
4 votes
Accepted

Any convergence rule for ${\mathbf X}_k={\mathbf A}{\mathbf X}_{k-1}{\mathbf B}$?

For every square matrix $C$, let $r(C)$ denote its spectral value. We say that a complex number $\lambda$ is a dominant eigenvalue of $C$ if $\lambda$ is the only eigenvalue of $C$ with modulus $r(C)$...
Jochen Glueck's user avatar
3 votes

Gauss quadrature for products of multilinear functions on a simplex

It looks to me like you are searching for what are called monomial cubature rules on the simplex in the literature on numerical integration. As an example, a 4th-degree monomial in 2-D $(x,y)$ would ...
Tom Loredo's user avatar
3 votes
Accepted

Gaps between roots of consecutive Hermite polynomials

The answers are yes and yes. Consider the Hermite Gauss functions : $\psi_n(x)=e^{-x^2/2}H_n(x) $, we have two properties: $$\psi_n''(x)+(2n+1-x^2)\psi_n(x)=0 $$ and $$\psi_{n+1}=\psi_n'(x) +x\psi_n(...
RaphaelB4's user avatar
  • 4,341
2 votes
Accepted

How to integrate the $L^2$ function $1/|x|$ numerically

Following Michael Renardy's suggestion, write $g=\phi\psi$, and write $$ g(x)=g(0)+x\cdot G(x) , $$ where $G$ is a smooth function. Then the integral becomes $$ \int_\Omega fg = g(0)\int_\Omega f + \...
timur's user avatar
  • 3,292
2 votes

Real world example of use of Monte Carlo method for high dimensional integrals

Here are a few papers that discuss high-dimensional Monte Carlo integrals, together with quotes from Math Reviews. MR2719643 (2011i:65038) Griebel, Michael; Holtz, Markus; Dimension-wise ...
Gerry Myerson's user avatar
2 votes
Accepted

Numerical methods for IDE

I must premise that I am not a specialist in numerical analysis, therefore I may be not right when talking about more popular methods in this field pertaining the solution of IDEs. Said that, however, ...
Daniele Tampieri's user avatar
2 votes
Accepted

On the continuity and injective-ness of Gauss quadrature scheme for numerical integration, with weight function identically $1$

The key here is the simple change-of-interval/rescaling formula, found e.g. at the link in the OP, according to which \begin{equation} T_n(f)(x)=T_{n,[0,x]}(f)=x\sum_1^n w_i f(xx_i), \tag{*} \end{...
Iosif Pinelis's user avatar
2 votes

Error in Gauss-Laguerre numerical quadrature scheme

The function $f(x)=e^{-x+\sqrt{x}}$ belongs to the space $C_{0}^{3}[0,\infty)$ defined, for $q\geq p\geq0$, by $$C _ { p } ^ { q } [ 0,\infty ) : = \{ f \in C ^ { p } [ 0,\infty ) \cap C ^ { q } ( 0,\...
user111's user avatar
  • 3,904
2 votes
Accepted

Integrating a B-Spline basis function with respect to the standard normal PDF

Since a B-spline is a piecewise polynomial function, the question is whether there exists an exact equality formula for the integral $\int_{-a}^{b}u^pe^{-u^2/2}du$. This integral equals an elementary ...
Carlo Beenakker's user avatar
2 votes
Accepted

Quadrature methods for high-dimensional Gaussian integration

You may want to use a stochastic algorithm. Entry points to the literature (which is large) could be A stochastic algorithm for high-dimensional integrals over unbounded regions with Gaussian weight (...
Carlo Beenakker's user avatar
2 votes

Integration algorithm and analytic property

The article gives an existence proof of an algorithm, but does not say anything about effectively using that algorithm. In practice, given an arbitrary real analytic function $f$ one cannot determine ...
Willie Wong's user avatar
  • 38.4k
1 vote

Numerical method with rational nodes and weights to compute exact value of definite integral?

It can be done with $n$ abscissae for odd $n$, though I'm not sure it can always be done with positive weights. Take $a=-1$, $b=1$ without loss of generality. I'll do $n=5$. Consider $$I=w_0(f(-x_0)+...
Brendan McKay's user avatar
1 vote

Approximation for a Bessel function integral

Q: The OP seeks a "reasonable approximation" for large or small $\rho_0$ of the function $$P(x)= \int_0^{x} e^{-\rho^2-\rho_0^2} \rho I_0(2\rho \rho_0)\,d\rho,\;\;x\geq 0.$$ Consider the ...
Carlo Beenakker's user avatar
1 vote
Accepted

Numerical solution to some functional equation

$\newcommand\erf{\operatorname{erf}}\newcommand\R{\mathbb R}$The functional equation in question is \begin{equation*} a=F(a) \tag{1}\label{1} \end{equation*} on $(0,\infty)$, where $a$ is in the ...
Iosif Pinelis's user avatar
1 vote

Finding numerical solution for nonlinear Poisson-like equation using finite difference method

Since it is a non-linear differential equation you cannot expect to obtain a linear system at the end. Think about using a non-linear solver like a Newton solver instead.
Max's user avatar
  • 11
1 vote

Gaussian quadrature, with no exact result over polynomial, but on inverse functions

The book Stroud A. H., Secrest D., "Gaussian Quadrature Formulas". Prentice-Hall, Englewood Cliffs, N.J., 1966 gives some answer to my question. See Section 3.2.2 "Finite to semi-...
MathTolliob's user avatar
1 vote
Accepted

What is the minimum number of stages $s$ required for a Runge-Kutta type numerical method of given order $p$?

For implicit methods, you can achieve order $2s$ with $s$ stages. Note that this result is the same if one considers the simpler problem of numerical integration (quadrature). Update as of 2024: a 16-...
David Ketcheson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible