Questions tagged [numerical-integration]
Questions on the use of numerical functions NIntegrate and NDSolve.
3,107
questions
2
votes
1
answer
79
views
Problem with a DAE and DiscreteVariables (II)
I continue with a DAE problem similar to another one posted here some days ago. @bbgodfrey offered a solution for the DiscreteVariables problem but now I have a ...
1
vote
2
answers
102
views
Solution on nonlinear pde with intial condtion
It produces an error. please suggest an alternative solution to the above-coupled pde problem.
...
1
vote
1
answer
84
views
Solving system of equations including numerical integrals over region
I am dealing with the resolution of a concrete beam. Simply put, it is an equilibrium of horizontal forces and moments.
Let's first define some parameters :
...
1
vote
1
answer
46
views
How to solve the error information in numerical integration and solve Sp?
How to solve the error information in numerical integration and solve Sp?
The codes are as follows:
...
2
votes
3
answers
103
views
Infinite Integral involving a Bessel function
I have trouble evaluating the following numerical integral,
$$
\int_{0}^{\infty} d k^{(yz)} \, k^{(yz)} J_{0} \left(d^{(yz)} k^{(yz)} \right) \frac{e^{-i d_x \sqrt{k_R^2 + {k^{(yz)}}^{2} }}}{ \sqrt{...
0
votes
2
answers
163
views
Why this integral gives zero?
I would like to compute this integral for a =100, ... ,1500
$$ \int_1^\infty \dfrac{\left(x^2-1\right)^{3/2}}{x} \,e^{-ax}\, dx $$
...
2
votes
1
answer
109
views
Solving this system of differential equation with NDSolve
I'm trying to solve this system of differential equation (the ones in yellow markers are just constants):
The initial conditions for this system are n(0) = NN, na(0) = Na, n'(0) = q(0) = 0, q'(0) = ...
0
votes
0
answers
37
views
Analytical integral running slow
I am calculating an integral with Mathematica, but it is running super slow!
Do you think there is a way to speed up the computation of A3? Maybe I should define my functions in a different way, but I ...
0
votes
1
answer
67
views
Need help solving iterativelly a set of transcendental equations with NIntegrate
I have two sets of equations:
$q = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}F(q,\phi;z,\beta,\Delta, J) $
$\phi = \frac{1}{\sqrt{2 \pi}}\int dz~ e^{-z^2/2}G(q,\phi;z,\beta, \Delta, J) $
As you may see ...
3
votes
1
answer
49
views
Why does NDSolve[] want to treat my equations as Delay Differential Equations?
I use NDSolve command (method->equation simplification -> residual) to solve different sets of Ordinary differential equations (ODEs).
It had worked alright till I added rather a simple ...
0
votes
0
answers
76
views
8
votes
2
answers
218
views
Problem with a DAE and DiscreteVariables
Cross-posted in Wolfram Community.
I am solving an DAE problem with NDSolve. It is a physical problem related to friction forces: one mass on the X axis and ...
4
votes
1
answer
237
views
NIntegrate fails to converge to desired accuracy
I am calculating an integral with Mathematica. This is the code I am using:
...
1
vote
1
answer
102
views
How to make an integral and reproduce its graph
How by Mathematica we can make the integral, equation (101) in
arxiv:1307.5949
$
H_0(t-t_0) = \int^{\frac{a}{a_0}}_1 ~ \frac{da’}{\sqrt{ \frac{\Omega_r}{a’^2} + \frac{\Omega_m}{a’} + \Omega_\Lambda ...
1
vote
1
answer
116
views
Compute area enclosed in a curve on a surface
Let's consider a 2D smooth surface embedded in 3D shown in the figure below. The corresponding metric tensor in Cartesian coordinates is
\begin{equation}
h = \biggr(\matrix{1 + \frac{A^2\pi^2}{4} \sin^...
1
vote
1
answer
60
views
NIntegrate issue without any singularity
I'm evaluating an integral using NIntegrate, I checked the expression and there shouldn't be any singularity at least on paper. The parameter ...
-1
votes
0
answers
51
views
Integration does not converge in iteration
I have the following code to find a numerical solution for a singular BVPas attached in the picture. I have the following Mathematica code: (This code of this question can be found at Mathematica does ...
0
votes
1
answer
88
views
PDE with tangential derivative condition along boundary. NDSolve not working
I'm considering the following PDE
$$
\begin{align}
\left[\cos\theta\frac{\partial}{\partial r}-\frac{\sin\theta}{r}\frac{\partial}{\partial\theta}\right]\left[\sin\theta\frac{\partial}{\partial r}+\...
0
votes
0
answers
40
views
Cannot fit data due to NIntegrate errors
Here is the data I am trying to fit
...
0
votes
1
answer
137
views
How to remove error in NIntegrate
I want to solev NIntegrate in two dimension. But when i run the code i got Throw::nocatch: Uncaught Throw[-HolonomicDifferentialRootReduceDumpy[NIntegrateLevinRuleDumpx]+(...
-4
votes
0
answers
65
views
I want to solve Integrate [duplicate]
I am wondering why I am receiving the message "The integrand ... has evaluated to non-numerical values for all sampling points in the region ..." for a particular calculation I am running. ...
1
vote
1
answer
83
views
Avoid imaginary result FindRoot
I have a code where I'm using FindRoot for the equation toroottp. I plug in some sample values on ...
1
vote
0
answers
44
views
Looking for an appropriate method of NDSolve for dynamical system
I am dealing with the numerical solutions of a variety of dynamical systems with integrals of motion.
As the example, let me consider the Kuramoto model, which equations of motion are
...
2
votes
1
answer
54
views
Integration over an implicit region
A question asks me to calculate the following integral using NIntegrate:
Calculate the double integral ... where D is the area bounded by the four lines ...
With ...
-1
votes
1
answer
81
views
Getting negative value instead of a positive value [closed]
The function is
...
0
votes
0
answers
60
views
Getting a wrong plot after NIntegration
I am trying to plot this function numerically.
R2T = ...
3
votes
1
answer
117
views
Speeding up Boussinesq equations solving?
I am working on Boussinesq equation. The notebook can run perfectly for only 0.6 steps and then the calculation starts running slowly after 0.7. All boundary conditions seemed fine. I am unsure if I ...
3
votes
1
answer
83
views
Problem with NIntegrate a solution of NDSolve
I'm having trouble making a function that uses the result of NDSolve:
...
10
votes
3
answers
2k
views
Can Mathematica calculate this elliptic, triple integral?
Integrate[(4 a b/Pi) (a^2 + b^2 - 2 a b Cos[c])^(1/2), {a, 0, 1}, {b,
0, 1}, {c, 0, Pi}]
I'm using basic plan, it gives me the result like that.
The ...
0
votes
0
answers
76
views
BVP with 2nd order coupled ODEs
I get the following error messages:
Infinite expression 1/0. encountered.
Indeterminate expression 0.\ ComplexInfinity encountered.
Encountered non-numerical value for a derivative at s == 0.1
...
2
votes
0
answers
44
views
Why does Mathematica not know some integrals diverge?
I want to analyse the convergence of some complicated 1d integrals that may have divergences at $x=0$, similarly to the harmonic integral $\int_0^a 1/x \ \mathbb{d} x$, which I know is divergent.
When ...
2
votes
1
answer
62
views
NDSolve: there are more variables than equations, underdet
I am working on using NDSolve to solve coupled ODE. The following is the coupled equations. It works fine for sever orders. I used table to generate like 962 couple variables and equations, where the ...
3
votes
1
answer
162
views
Numerical solution of an advance-delay ODE with multiple advances and delays
I am trying to solve a differential equation of the form
...
0
votes
0
answers
61
views
I am unable to plot 3D graph of integral function
I am not able to solve this integral
...
1
vote
1
answer
56
views
How to make the NIntegate of two variables as efficient as possible
I asked my question here (Multivariable NIntegrate gives different value if I integrate it separately), I think the best way to get help is by putting the original code here. So, my question is how ...
0
votes
0
answers
47
views
NDSolve overdetermined but I can't see how
Edit: partial answer
This confuses me but it is due to some behaviour of pattern matching which just seems wrong to me.
An example of the behaviour
...
1
vote
1
answer
98
views
Multivariable NIntegrate gives different value if I integrate it separately
I have a double variable integral, so I can define a function which is the integration of the other variable, and finally, I integrate the other variable. here is the code:
...
0
votes
0
answers
74
views
Too big error of numerical integrate
I want to do some numerical integrate with Mathematica, but the results are very different from others' result calculated by C code. Here is my code:
...
3
votes
1
answer
103
views
Inconsistent results between NIntegrate and Integrate
I get these inconsistent results
What is going wrong? Fast oscillating terms? Small exponential factors?
But then, why the result seems to toggle between values 1 and 2, rather than being a real ...
0
votes
1
answer
49
views
Solution of NDSolve evaluates pointwise, but won't plot (possibly due to issue with FindRoot and replacement rules)
I'm trying to solve a pair of uncoupled differential equations using NDSolve, where the initial conditions are determined by FindRoot. Here's the relevant section of the code, including error message. ...
1
vote
2
answers
106
views
Integration of accelerometer data to x-y-z position [closed]
Hi I have a list of accelerometer data, in their xyz acceleration values.
May I ask how can I integrate these data to get to the position in their xyz angle, assuming the initial velocity is zero and ...
0
votes
1
answer
49
views
NIntegrate can't integrate function but work fine with the expression [closed]
I have a function called psi0 that looks like this: psi0 := E^(-(x - 10)^2/10) and I'm trying to integrate it numerically from 0 to a variable L. However, I keep ...
0
votes
1
answer
69
views
Problem with NIntegrate and more general problems with NDSolve
I'm new to Mathematica and I'm receiving little help for a (to me) quite difficult problem I'm trying to solve. I want to solve logarithmic Boltzmann equation for abundance of dark matter.
I'm having ...
1
vote
0
answers
58
views
Choosing spatial direction in Method of Lines
Edit:The temporal variable can be set using
Method -> {"PDEDiscretization" -> {"MethodOfLines","TemporalVariable" -> t}}
...
5
votes
1
answer
249
views
Poincare section for a perturbed string
I am trying to find the Poincare section of a perturbed string in a gravitational background with a magnetic field. The plots that I am trying to reproduce are from this paper (page 11).
The code that ...
0
votes
1
answer
63
views
Non Linear System of Diferential Equations with periodic function
I am programming a system of differential equations consisting of 3 cell populations; Normal cells N, Tumor cells T and chemotherapy treatment Q, when a function q is constant. The system is as ...
0
votes
1
answer
134
views
Numerical integration of highly oscillating function
I want to Numerically integrate the following function
...
0
votes
0
answers
41
views
How to do double numerical integration one of the variables integrate to another one
Here I have an express with two variables like ...
2
votes
1
answer
146
views
Simple 3D trapzoidal rule gone wrong
I am trying to implement a 3D trapezoidal rule function, but I get wrong result and I do not understand what's wrong. Here is the code:
...
4
votes
1
answer
124
views
Nonlinear higher-order equation with fractional derivative in 1d
How can I use Mathematica to solve the following higher order and nonlinear fractional equation?
$$\partial_t u(t,x) +\partial_x(u^k(t,x)\partial_x(-\Delta)^su(t,x)) = f(t,x) \quad t >0, \ x \in (\...