# Questions tagged [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

2,915 questions
Filter by
Sorted by
Tagged with
35 views

### Integrate of simple equation but is not solving!

I have this simple integral but I don't know why Mathematica can't solve it?! FullSimplify[Integrate[x/(-x^2 + a x + b)^(1/2), {x, Sqrt[b], Sqrt[R^2 + b]},Assumptions -> {a > 0, b > 0}]]
51 views

42 views

### how to exclude some points which are not well-defined in NIntegrate? [closed]

I have obtained the following plot from a NIntegrate as you can see, some points are not well-defined (between 0.01 and 0.02) and have produced anomalies in the ...
24 views

### Exclusions in NIntegrate automatically uses GlobalAdaptive method?

I tried to integrate a function using LocalAdaptive method. However, if I add Exclusions option in addition to ...
85 views

### Non linear first DE with lot of parts

I want to know how I can solve this equation in Mathematica I guess I missed something!! DSolve[ {a (h[a])^2 h'[a] +(nh[a]/ a^2) + m(h[a])^3 - l (h[a])^2 - t == 0}, h, a] h[a] is my function and n,m,l,...
43 views

### How to speed up the multiple sums and integration?

I want to numerically calculate a sum with multiple variables and then integrate the whole expression. Any solutions to speed up the process? ...
63 views

...
91 views

### why this NIntegrate doesn't work?

I intend to run a NIntegrate inside a Do loop. At first I import the integrand as a txt file and then number it using loop ...
77 views

### Integration NSolve problems

I have some problems in solving this equation numerically in Mathematica. Mathematica gives me the error message "NSolve::nsmet: This system cannot be solved with the methods available to NSolve&...
121 views

### Calculate median of pdf using NSolve [closed]

I was trying to compute the median of a pdf using NSolve, defined such that $$\int_{0}^{\rm median}p(x)dx = \frac{1}{2}$$ but NSolve seems unhappy about solving for an upper limit of an integral. A ...
83 views

### How to solve this set of integrated PDEs

Could anyone help me solve set of pdes with embedded integration? The pdes below is solvable , but can not be solved when I tried different parameters such as ...
455 views

### Real-valued integral gives large imaginary part

I found a very strange result in Integrate command. I numerically integrated $$\int_{-1}^1 \int_{-1}^1 \frac{1}{|x|^{2/5} |y|^{3/10} |x-y|^{7/10}} dx dy.$$ ...
36 views

### Is that possible to take numerical integration of a function that depends on other variables in addition to the integration variable? [closed]

As I know, the result of a numerical integration should be a number. However, there are situations at which we have a multivariate function but we want to integrate only over one variable and use the ...
114 views

### Difference in results between Integrate and NIntegrate

I was trying to ocmpute the line integral between the two zeroes of the function $f(x)=\sqrt{\frac{-x^2+x-1}{x^2(x-1)^2}}$. The zeroes are located at $(-1)^{1/3}$ and $(-1)^{2/3}$. I used the ...
408 views

### NIntegrate with singularity does not work

Consider the following integral $$\int_{-\infty}^\infty \int_{-\infty}^\infty \frac{e^{-x^2-y^2}}{|x^2+y^2-1|^{0.6}} dxdy.$$ By changing to polar coordinate analytically and putting the result into ...
60 views

### why this analytical formula can't yields the answer of numerical integration?

I have an initial function as follows ...
39 views

### Can I set the limits of NIntegrate symbolic in a multidimensional integral?

I have written my integral as follows: NIntegrate[ f[re, rp, r], {re, 0, \[Infinity]}, {r, 0, \[Infinity]}, {rp, RealAbs[re - r], re + r}] but it returns ...
186 views

### How to minimize a function involving NIntegrate?

I have three datasets as follow: ...
114 views

### How to plot poincare map as shown in below image for Duffing equation?

I am trying to plot phase diagram and poincare map. But I cannot get the poincare map as shown in the image below Phase Space ...
170 views

### 3D FEM Mesh - Accessing values of individual boundary elements

I have 3D mesh and calculate the heat equation using NDSolve. I want to access the temperature values on the individual boundary elements to solve another problem (...
52 views

55 views

### NMaximize computes wrong value

This question is a continuation of NIntegrate with a complicated function over the 4-sphere . Now I define a certain new function called "improvement" via: ...
89 views

### FEM 1D 3D region coupling - integration too slow for coupling with energy conservation

EDIT: I reposted this question, removing everything that is not necessary for my coupling approach. Find the new post here. I am working on a 3D simulation of the heat equation which is coupled to a ...
76 views

### How to calculate precise higher derivatives of ParametricNDSolve solution

Higher Derivatives of NDSolve don't match the results from DSolve solution, can I somehow increase the accuracy of numerical method to match arbitrarily high derivatives? Equation I am using ...
59 views

### Issues with Nintegrate - different methods yielding different values (both giving warnings)

I am integrating the following function \begin{equation} \frac{1}{2d^{2}}\times\frac{\sqrt{\omega_{c}\left|t_1-t_2\right|}-\sqrt{\pi}e^{\frac{1}{\omega_{c}\left|t_1-t_2\right|}}\text{erfc}\left(\frac{...
116 views

### NDSolve unable to solve system of PDEs

I'm trying to solve a set of PDEs and am running into problems. The system is defined by: As can be seen, there are two dynamical equations for $\rho$ and $\phi$, but the equation for $v$ has no time ...
68 views

### Same integral yielding to different results

I am currently working with the following integrals \begin{equation} \int_{0}^{\infty} dk\thinspace \frac{k^{3}e^{-2kd}}{\omega^{2}+k^{4}} = \frac{1}{\omega^{2}d^{4}}\int_{0}^{\infty}d\epsilon\...
107 views

### Numerical integration over infinite interval with highly oscillatory integrand

It is known that $J_{\nu }(x)=\frac{2}{\pi }$ $\int_0^{\infty } \cosh (\nu t) \sin \left(x \cosh (t)-\frac{\pi \nu }{2}\right) \, dt$ for $x>0$ and $-1<\Re(\nu )<1$. (see DLMF ...
69 views

### System of PDE with integration conditions interior of domain

I am trying to solve this system of pde numerically. I am unable to find any method in Mathematica that can handle this problem. The issue is having this integration condition in the domain. I tried ...
143 views

### Integrate of HypergeometricPFQ gives the wrong result

Good morning, I computed the following integral using Integrate in version 12.2 and it gives the wrong result. Can you help me understand what I am doing wrong? Here is the integral: ...
62 views

### Numerical Integration - taking too long

recently I have been trying to calculate the following numerical integral \begin{equation} \frac{4 t}{\text{DD}}\frac{1}{2 \pi } \int_{0}^{\infty} dx \int_{0}^{\infty} d\epsilon \frac{\left(\frac{\sin ...
111 views

### Geodesics on arbitrary 2D surfaces

Geodesics on 2D Function Surfaces I am trying to approximately find the shortets path between two point on a surface defined as z=F[x,y]. I am solving for X,Y as function t. However, when trying to ...
65 views

### Distributive property of Integration

As it is known that Integrate[A+B]= Integrate[A] + Integrate[B] I am facing problem with the following integral, when I integrate ...
186 views

### A little complex data fitting in physics which my easy code can't solve properly

This is a data fitting in physics, however, some errors may estimate and cause failure. First, I define: ...
133 views

### There are some warnings thrown with NDSolve here. How can I change my code to avoid them?

I want to solve some differential equations, but the warnings "NDSolve change the value" are thrown. How do I change the equations? Are there some equations that are not allowed? Are some ...
238 views

68 views

### How to exclude the singularities by using FunctionSingularities

I want to compute a integration like ...
88 views

### NDSolve of a stiff system of ODE's

I am trying to solve numerically the following set of differential equations ...
59 views

### Precision problem with mathematica

I have a precision problem with a complicated function in Mathematica. I need to get norm (NIntegrate[f[x],{x,0,1}]) and shape (...
86 views

### Unable to solve this differential equation with NDSolve. NIntegrate::inumr error

My code goes as follows: ...
I am trying to solve the Laplace equation in polar coordinates -\left(\frac{\partial^2\psi_n(r,\theta)}{\partial r^2}+\frac{1}{r}\frac{\partial\psi_n(r,\theta)}{\partial r}+\frac{1}{r^2}\frac{\...