Stack Exchange Network

Stack Exchange network consists of 175 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 [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

1
vote
1answer
84 views

Difficulty with numerically integrating highly-oscillatory function

I'm interested in numerically solving a "highly-oscillatory" function. I've tried increasing the "max-recursion" and "precisiongoal", but it appears as though my answer is still not converging to the ...
2
votes
1answer
47 views

Solving partial differential equation involving Hilbert transform

While solving one research paper published in Physical Review Letters, I came across the following equation and I am unable to solve it. $$\frac{\partial f}{\partial t}−(\mathcal{H}(f)\left(\frac{\...
0
votes
0answers
16 views

How to enhance the precision of the numerical solutions of ODE

Given an ODE $$D f=0$$ over the interval $[x_0,x_1] \subset \mathbb{R}$, where $D$ is a linear differential operator. I can compute the boundary condition $f(x_0)$ to a very high precision, as high as ...
0
votes
2answers
64 views

Error messages for FindRoot and NIntegrate

I want to solve the following problem. First, the setup. A function $V(\varphi)$ defined as \begin{multline} V(\varphi)=\frac{\alpha-3}{4}e^{\sqrt{2\alpha}\varphi}+\frac{\alpha-5} {\gamma}e^{(\...
0
votes
0answers
64 views

How to include an integral constraint in FindRoot?

I want to include an integral constraint during ODE solving with FDM. The problem is actually a boundary value problem and the integral constraint includes the function $u(x)$ and an undetermined ...
0
votes
1answer
63 views

Integrate a function of NDSolve

I'm having this problem of integrating a function that's the solution of a NDSolve multiplied by another function. I basically compute a cycle wich add at each step the quantity ...
-1
votes
0answers
33 views

How to speedup the following integral?

Consider the following distribution and its interpolation: ...
1
vote
3answers
51 views

NIntegrate failed to converge to prescribed accuracy for an Integral function with several singular points

The integral function is given as f[x_] := (110 (1 + x^3) (13 - 1139 x^4 + 26 x^6))/( 3 x (1 - 113 x^4 + 2 x^6) (1 - 58 x^4 + 2 x^6)) with five singular points ...
2
votes
1answer
79 views

Problem with NDSolve: Maximum number of steps reached

I am using NDSolve to solving a first order autonomous system of ODEs $\dot x(t) = f(x(t))$, $x\in\mathbb R^n$ numerically for a set of initial conditions $x(0)=a,b,...
1
vote
1answer
49 views

Using ParametricNDSolve to solve a hysteretic ODE (Wolfram Mathematica 10.0)

I am trying to solve an ordinary differential equation using ParametricNDSolve and I want to fit the solution to some data to get the value of the parameter. The problem I have is that the ODE is ...
1
vote
1answer
97 views

Unable to compute the measure of a region in four dimensions

I need to be able to calculate an integral with this implicit region: ...
1
vote
2answers
171 views

Mathematica code in fortran [closed]

I have an integral in which the integrand is a combination of ratio of modified bessel function of second kind. I am able to find the solution of this integral with mathematica Nintegrate module with ...
1
vote
1answer
61 views

NIntegrate a singular function

I am trying to do this integral numerically: ...
0
votes
1answer
66 views

NIntegrate::femrdim: FiniteElement method can only be applied to regions of embedding dimension 1, 2, or 3

As in the title: I'm trying to Nintegrate over an ImplicitRegion, this error appears. No idea what it means. Nothing in the docs. It appears on this line: ...
0
votes
0answers
51 views

Replace Integrate with NIntegrate

I have a symbolic integral with a pretty complex expression. I need it in symbolic form because I want to compute its derivative. ...
1
vote
4answers
78 views

How to put solutions of mutiple DEs with NDSolve in table

I have $N$ differential equation for each $s \in {1,2,...,N}$ on the domain $x \in [1,2]$ of the form (e.g.) $xf_s'(x) + \log(xs) f_s(x)+1 = 0$, with the boundary condition $f_s(1) = e^{-s}$ Now I ...
1
vote
2answers
92 views

Surprising error message from NIntegrate

I have the following integral: ...
0
votes
0answers
60 views
1
vote
1answer
86 views

How to integrate exponent of sine?

I am trying to integrate Abs|E^ $\sin \theta$| (the absolute value of Euler's constant to the power of sin(theta), and tried the code Integrate[Abs[E^Sin[x]], x] ...
1
vote
0answers
20 views

Unable to turn off error messages using Parallelize

I am running 11.1 and would like to run NIntegrate and turn off the error message NIntegrate::ncvb but when I run the integrations in parallel, they are not being turned off. For example, consider ...
4
votes
2answers
276 views

Nonlinear boundary value problem of ODE involving principal value of integral

I have asked a question on a nonlinear eigenvalue problem (EVP). And I have worked on these for a week but I cannot solve it. I think I should first try to solve the related ODE boundary value problem ...
0
votes
1answer
35 views

Calculation of evolution equation with NDSolve

I have near to no experience with mathematica, so this might seem pretty trivial. I want to solve an Evolution equation, i.e. we have a function $f(t,x)$ and a differential operator $T(t,\partial_t)$. ...
1
vote
0answers
43 views

NDSove vs ParametricNDSolve

ParametricNDSolve is very practical when one has to execute NDSolve again and again. However is it equally accurate? I have not ...
9
votes
4answers
687 views

NIntegrate doesn't evaluate

The integral Integrate[(t^4 x^3)/Sqrt[-t + x], {x, 0, 1}, {t, 0, x}] (* 512/5355 *) can be solved analytically. Trying to apply ...
5
votes
1answer
54 views

How to change the default normalization for NDEigensystem?

I'm currently using NDEigensystem to solve a PDE that describes a particle travelling on a hyperbolic (negatively curved) surface. However, the eigenfunctions that are returned by NDEigensystem are ...
4
votes
2answers
135 views

Solution of a singular integral equation using interpolation and truncated methods

I am trying to code the following integral equation to find the solution numerically using Mathematica. In fact the exact solution is x^2 (1 - x). First we define ...
0
votes
0answers
36 views

How to solve integral equation involving Fourier Series

I have a set of equations involving two anti periodic functions $f(t+T)=-f(t)$ and $g(t+T)=-g(t)$ \begin{cases} f(t)&=J^2g(t)^3 \\ \mathcal{F}[g](\omega_n)&=\frac{1}{-i\omega_n-\mathcal{F}[...
4
votes
3answers
170 views

Numerical solution of a singular integral equation

I am looking to approximate the solution u of the following equation using discretization method or any other idea. Is there any way on how to find a numerical ...
2
votes
1answer
69 views

Singular Integration

I am trying to simplify the following integral but getting no answer. Any help in how to get the resulting function as a function of t would be much appreciated? ...
0
votes
1answer
50 views

How to keep the numerical integration when an event occurs?

I'm numerically integrating the following system, f[r_] = 0.904965 - (1 + 12.7028/r^2) (1 - 2/r) dϕdλ = 1/r[λ]^2; eqc = r'[λ] == Sqrt[f[r[λ]]/(dϕdλ^2)]; with the ...
1
vote
1answer
99 views

How to integrate this function?

How can I perform the following integral? ...
0
votes
0answers
46 views

How to handle the instability of the integral evaluation in the following case?

I want to integrate a function \[Kappa][gh, ms, ts, th, ph] (for all definitions, see a code below) with the distribution ...
0
votes
0answers
32 views

How to set integration limits

Consider the functions ...
0
votes
0answers
29 views

Mathematica restarts kernel when trying to evaluate the integral using GlobalAdaptive

I have Mathematica 11. Each time when I try to evaluate some (specific) multi-dimensional integral using Automatic or GlobalAdaptive, it restarts the kernel, while for MonteCarlo it works fine. What ...
1
vote
1answer
62 views
1
vote
1answer
59 views

Estimating parameters on system of differential equations

I am looking for some help estimating the parameters of a series of differential equations to assist fitting the experimental data I have collected. The Problem: The equations are based off of the ...
0
votes
0answers
45 views

Analytic continuation of an ODE solution with ParametricNDSolveValue

I am working on the analytic continuation of a solution of the $2\times 2$ system $$dT=TP,\quad T(1)=Id$$ where $P$ is of the form $$P=\begin{pmatrix} 0 & t^{-1}\\ \frac{t}{4}+(t-1)^2\left(\frac{r ...
0
votes
3answers
107 views

Numerical approximation of $\int_0^t\int_0^s\vert u-v\vert^{2H-2}((t+s)-(u+v)^{-d/2})$

I want to have a numerical approximation of the following integral $$\int_0^t\int_0^s\vert u-v\vert^{2H-2}\left((t+s)-(u+v)^{-d/2}\right)\, {\rm d}v\,{\rm d}u$$ with $t=2,],s=1,\,d=1,\,2H-2=-0.5$. ...
0
votes
0answers
50 views

How to do this numerical integration via Simpson’s rule?

this is the question. Develop a code to perform a numerical integration for the following functions using Simpson’s rule. You must implement the algorithm in the form of a Module[ ]. Partition the ...
3
votes
2answers
454 views

Speed up this NIntegrate

Is there any trick to speed up this numerical integral: ...
2
votes
0answers
44 views

Problem with Erfi in Integrate function

I have a very simple integral of the form Integrate[(E^-(x - 1)^2 (x - 1) + E^-(x + 1)^2 (x + 1))/ x, {x, 0, Infinity}] Numerically, this gives the correct ...
0
votes
1answer
52 views

Implicit piece-wise function in derivative for differential equation solver

I want to set up a model/simulation that involves numerically solving a set of coupled differential equations, but at some point in time I want some of the variables to quickly jump to a constant ...
0
votes
0answers
37 views

How to fit experimental data with by numerical integration?

folks. I'm a begginer with Mathematica and all I know is just a few basics commands and i'm trying to improve it. I have this list of experimental data taken from a paper which describes the ...
0
votes
1answer
97 views

Numerical integration giving trouble

I am trying to do the following integral numerically, $$\rho(\theta_{j},\phi_{j})=\int\frac{\sin{\theta_{i}} d\theta_{i} d\phi_{i}}{\sqrt{2+2[\cos(\theta_{i})\cos(\theta_{j})+\sin{\theta_{i}\sin{\...
1
vote
1answer
59 views

How can I solve this integration or does it have a closed form solution?

The integral I am dealing with is below. I need to find the closed-form expression of this integral. $\int_0^\infty \ln(1+\frac{A}{1+B+Cx})\frac{e^{-x/M}}{M}dx$ Here, $A$, $B$, $C$ and $M$ are ...
0
votes
0answers
27 views

Error during integration: Tag Times (variable of integration) is protected. How to solve it?

I am trying to integrate and plot the following function: Y[T_?NumericQ,n_?NumericQ]:=NIntegrate[BesselK[1,mB1/t]*(mB1/t)^(3+n/2),{mB1/t,0,mB1/T}] ...
1
vote
1answer
65 views

Problem solving PDE with boundary conditions

I have the following PDE: $$ \frac{\partial }{\partial x}\left(G_x \left(\frac{\partial \phi (x,y)}{\partial x}-y\right)\right)+\frac{\partial }{\partial y}\left(G_y \left(\frac{\partial \phi (x,y)}{\...
0
votes
0answers
75 views

Numerical methods to solve an ODE with discontinuous coefficients

Consider the ODE $$\partial_t \Phi(t,x) = \mathbf b(\Phi(t,x)), \qquad t \in [0,T], \quad x=(x_1,x_2) \in \mathbb{R}^2$$ $$\Phi(0,x) = x, \quad x \in \mathbb R^2,$$ where $\mathbf b = (0,\chi_{\{x_1 \...
0
votes
1answer
34 views