I'm looking to numerically evaluate an integral of the form $$I=\int_0^1rK(r)f(r)\,dr$$ where $f(r)$ is a smooth function known at a set of grid points $\{r_i\}$ with error $O(\Delta r^2)$ ($\Delta r\sim10^{-3}$) and $K$ is the complete elliptic integral of the first kind. A first attempt would be to simply use the trapezoidal rule, but $K(r)$ is singular at $r=1$ so this is poorly conditioned as the grid becomes very fine. One approach I have seen is to use an asymptotic expansion of $K(r)\approx-\log\sqrt{1-r^2}$ for $r\approx 1$ and then taking $f$ to be constant in some small interval $(1-\epsilon,1)$ (chosen to fall on a grid point) so that $$\int_{1-\epsilon}^1rK(r)f(r)\,dr\approx f(1)\int_{1-\epsilon}^1-\frac{r}{2}\log(1-r^2)\,dr=\frac{f(1)}{4}\left[1+\epsilon(2-\epsilon)\log(1-(1-\epsilon)^2)+(1-\epsilon)^2\right]$$ (if I worked out the integral correctly). This approach seems very sensitive to the value of $\epsilon$ chosen, and it further assumes $f$ is constant on this interval which does not preserve the second-order accuracy. Is there a way to approach this integral that does not require an arbitrary choice of $\epsilon$, and further can compute $I$ with $O(\Delta r^2)$ error?
2026-03-28 03:53:36.1774670016
Numerical Integral of Complete Elliptic Integral
143 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in NUMERICAL-METHODS
- The Runge-Kutta method for a system of equations
- How to solve the exponential equation $e^{a+bx}+e^{c+dx}=1$?
- Is the calculated solution, if it exists, unique?
- Modified conjugate gradient method to minimise quadratic functional restricted to positive solutions
- Minimum of the 2-norm
- Is method of exhaustion the same as numerical integration?
- Prove that Newton's Method is invariant under invertible linear transformations
- Initial Value Problem into Euler and Runge-Kutta scheme
- What are the possible ways to write an equation in $x=\phi(x)$ form for Iteration method?
- Numerical solution for a two dimensional third order nonlinear differential equation
Related Questions in ASYMPTOTICS
- Justify an approximation of $\sum_{n=1}^\infty G_n/\binom{\frac{n}{2}+\frac{1}{2}}{\frac{n}{2}}$, where $G_n$ denotes the Gregory coefficients
- How to find the asymptotic behaviour of $(y'')^2=y'+y$ as $x$ tends to $\infty$?
- Correct way to prove Big O statement
- Proving big theta notation?
- Asymptotics for partial sum of product of binomial coefficients
- Little oh notation
- Recurrence Relation for Towers of Hanoi
- proving sigma = BigTheta (BigΘ)
- What's wrong with the boundary condition of this $1$st order ODE?
- Every linearly-ordered real-parametrized family of asymptotic classes is nowhere dense?
Related Questions in ELLIPTIC-INTEGRALS
- Evaluation of Integral $\int \frac{x^2+1}{\sqrt{x^3+3}}dx$
- The integral of an elliptic integral: $\int_{0}^{1}\frac{x\mathbf{K}^2\left ( x \right )}{\sqrt{1-x^{2}}}\mathrm{d}x$
- Closed form of Integral of ellipticK and log using Mellin transform? $\int_{0}^4 K(1-u^2) \log[1+u z] \frac{du}{u}$
- "Not so" elliptic integral?
- Infinite series with harmonic numbers related to elliptic integrals
- Reduction of a type of hyperelliptic integrals to elliptic integrals.
- Finding $\int\frac{x^2-1}{\sqrt{x^4+x^2+1}}$
- Is this an elliptic integral or not?
- Verifying the formula for the perimeter of an ellipse
- Jacobi form to Weierstrass form . . . lattices included .... polynomial factoring in the way
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
Basically you're doing everything right, but several improvements can be suggested.
First, the expansion for $K(r)$ near $r = 1$ is $$ K(r) = \log 4 - \frac{1}{2} \log(1-r^2) + \dots $$ The missing $\log 4$ term introduces $O(\Delta r)$ error in your computations.
I suggest splitting $K(r)$ into regular and singular parts as $$ K(r) = -\frac{1}{2} \log(1-r^2) + R(r). $$ Here $R(r)$ is smooth enough to use in numerical quadrature (though high order quadratures would loose orders of convergence due to $R'(1) = -\infty$)
Then do the splitting $$ \int_0^1 r K(r) f(r) dr = \int_0^1 r R(r) f(r) dr - \int_0^1 \frac{r}{2} \log(1-r^2) f(r) dr. $$ Note that the singular part is used for the whole domain $[0, 1]$ and not only for the $[1-\epsilon, 1]$.
The first integral can be evaluated using the trapezoidal rule. Use $R(1) = \log 4$ at the last point and $R(r) = K(r) + \frac{1}{2} \log (1-r^2)$ for the rest.
The second integral needs to be integrated analytically. To do this we need to split the $[0, 1]$ into segments $[r_m, r_{m+1}]$ in which we treat $f(r)$ as a linear function. In other words we consider $f(r)$ as a piecewise-linear function. Using $a = r_m, b = r_{m+1}$ for simplicity we need to evaluate the following integral $$ \int_a^b \frac{r}{2} \log(1 - r^2) \left[ f(a) + \frac{f(b) - f(a)}{b-a} (r - a) \right] dr = \\ = f(a) J_1(a, b) + \frac{f(b) - f(a)}{b-a} J_2(a, b),\\ J_1(a, b) = \int_a^b \frac{r}{2} \log(1 - r^2) dr\\ J_2(a, b) = \int_a^b \frac{r}{2} \log(1 - r^2) (r-a) dr. $$ The exact expressions for $J_1$ and $J_2$ are $$ J_1(a, b) = \frac{1}{4} \left( a^2 - b^2 + (1-a^2)\log(1-a^2) - (1-b^2)\log(1-b^2) \right)\\ J_2(a, b) = \frac{b-a}{36} (5 a^2+5 a b-4 b^2-12) +{} \\ {} + \frac{ (3 a - 3ab^2 + 2b^3) \log (1-b^2) - a(3-a^2) \log (1-a^2) }{12} + {} \\ {} + \frac{\operatorname{arctanh}(b) - \operatorname{arctanh}(a)}{3} $$ I've obtained them using Wolfram Mathematica with some simplifications by myself.
Below is the implementation of the method in Python: