Questions tagged [numerical-integration]
The numerical-integration tag has no usage guidance.
21
questions
0
votes
0
answers
45
views
handling symbolical and numerical nested integrals
I'm working on reproducing a calculation from this paper https://arxiv.org/abs/1712.03972 for my thesis but I'm struggling with how to properly implement the nested integrals in Python, specifically ...
1
vote
0
answers
75
views
Numerical integration over part of a sphere
I want to numerically compute the surface integral,
$$
\int_0^{2\pi} d\phi \int_{\theta_0}^{\theta_1} d\theta \sin{\theta} f(\theta,\phi)
$$
Is there a clever transformation from this integral over ...
3
votes
0
answers
59
views
Quadrature on an interval $[0,h]$ for $f\in C^3$ vanishing at zero
Cross-posted at Math SE
I am studying for an exam and I would like to receive feedback on my solution to a past problem on numerical integration and/or receive suggestions about how to improve my ...
0
votes
0
answers
63
views
How to calculate the numerical integration and plot the result in python?
I am trying to solve the question below in McQuarrie Physical-Chemistry book.
The first step of the exercise, I solved. However, the second step involves a numerical integration. I can develop a code ...
0
votes
0
answers
97
views
Numerically integrating photon wavelength undergoing gravitational time dilation
I am trying to integrate the wavelength of a photon that is undergoing gravitational redshift.
The formula that I'm trying to emulate is:
\begin{equation}
\lambda_{i} = \lambda_{e} \frac{ \sqrt{...
2
votes
1
answer
69
views
What would be the right approach to numerically integrate in MATLAB an improper integral with Bessel function?
I have an improper integral which contains Bessel functions, Cosine term as well as a rapidly decreasing exponential term. This is the integral:
$$\frac{1}{2\alpha}\int_{0}^{\infty}e^{-\frac{\xi^2}{4\...
0
votes
1
answer
79
views
How to modify adaptive step size Runge-Kutta cash karp algorithm for higher accuracy?
I'm following a paper on making your own cosmic microwave background perturbation solver code by Peter Callin https://arxiv.org/pdf/astro-ph/0606683.pdf
In the programming techniques section V, the ...
2
votes
0
answers
99
views
Calculating Debye functions to high accuracy (hundreds of bits), is it possible to be faster than generic quadrature?
The Debye functions are defined like so: ${D_n\left(x\right)} = {\frac{n}{x^n} \cdot {\int_0^x{\frac{t^n}{e^t - 1}dt}}}$.
I'm trying to evaluate the functions for $n$ from one to four and for $\left\...
0
votes
0
answers
69
views
Solving coupled 2nd-order differential equation
I would appreciate it if you could help me solve the following coupled equation numerically
$$
[-\frac{1}{2} \partial_r^2 + v_0(r) -E]\psi_{\ell} + v_1(r) \psi_{1-\ell}(r) = 0,
$$
where $\ell = 0 , 1$ ...
0
votes
0
answers
88
views
Unable to solve numerically this system of differential equation
I'm trying to obtain the graph of x(y) from the following system :
Therefore I tried to solve this system using an Euler Method :
...
6
votes
1
answer
154
views
Slope limiting with implicit time integration
I am solving the advection problem with high order numerical methods, using the method of lines. The boundary conditions and initial condition are selected in a way where I know that the exact ...
0
votes
0
answers
110
views
How to minimize a numerical integration in python?
I need some help to minimize a numerical integration. It's about a classical problem in physics (hydrogen atom). It can be solved analytically but I need to solve it numerically in Python.
We have an ...
1
vote
0
answers
64
views
3D Quadrature schemes with points on boundary
In one dimension there are two types of quadrature schemes.
asymmetric rules like Newton-Cotes like formulas (Trapezodi, Simpson), and Clenshaw-Curtis place sampling points on boundary of the ...
0
votes
1
answer
69
views
What happens to the $O(\cdot)$ terms when we implement the Leapfrog Integration algorithm in a programming language?
Integration Algorithms
The Verlet leapfrog algorithm is an economical version of the basic algorithm, in that it needs to store only one set of positions and one set of velocities for the atoms, and ...
0
votes
0
answers
132
views
Am I doing leapfrog integration correctly?
I wrote this minimal example to examine the Leapfrog integration algorithm.
However, I am not sure it is the correct algorithm, and the listing is giving the correct output.
Is this the Leapfrog ...
2
votes
2
answers
1k
views
Understanding leapfrog integration algorithm
The leapfrog.cpp is an implementation of leapfrog integration algorithm where f() function is being integrated:
leapfrog.cpp
<...
0
votes
0
answers
34
views
Matching the limits of integration with the proper variables in a complicated case when using scipy.integrate.nquad
I need to integrate expressions containing powers of the function:
...
0
votes
1
answer
46
views
'Integral2' error in MATLAB for invalid integrand
Here is the code that I am trying to run:
...
2
votes
1
answer
119
views
How to numerically solve differential equations involving sines, cosines and inverses of the unknown function?
I'm very new to finite difference method and I am just introduced to methods of solving differential equation using finite difference method via sparse matrix method.
I find that the main idea is to ...
0
votes
1
answer
133
views
finding weak form of nonlinear differential equation for FEM simulation
The following is the well-known nonlinear differential equation for director's distribution at static equilibrium in liquid crystal displays(LCD). I want to obtain weak form of the given differential ...
2
votes
0
answers
70
views
Order of local error when integrating ODE with discontinous derivatives
I'm working with ODEs, $$\dot{x} = f(x, t),$$ where the (higher) derivatives of the right-hand side have discontinuities. In particular, $f(x, t)$ is obtained by interpolation of discrete samples, and ...