Questions tagged [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

Filter by
Sorted by
Tagged with
0
votes
2answers
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}]]
2
votes
1answer
51 views

"Sparse" Overflow error in NIntegrate

I want to evalutate an integral $$I = \int_{-0.01}^0 \int_{-0.01}^0 \left(\frac{1}{\sinh|t_2+t_1+T| \sinh|t_2+t_1|}\right)^{2/m} \left(\frac{\sinh|2t_1+t_2+T|}{\sinh|t_1+T|}\right)^{1/m} \left(\frac{\...
0
votes
1answer
38 views

NIntegrate::zeroregion error outside the integration domain

I am trying to integrate a function $$\int_R \frac{1}{(\sinh|T-t_1+t_2|)^{\frac2m} (\sinh|t_1-t_2|)^{\frac2m}} \left(\frac{\sinh|t_2|}{\sinh|t_1|}\right)^{\frac1m} \left(\frac{\sinh|T-2t_1+t_2|}{\sinh|...
0
votes
0answers
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 ...
1
vote
0answers
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 ...
0
votes
0answers
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,...
0
votes
0answers
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? ...
0
votes
1answer
63 views

Numerical integration precision issue

...
-1
votes
3answers
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 ...
0
votes
2answers
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&...
4
votes
1answer
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 ...
2
votes
1answer
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 ...
6
votes
2answers
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.$$ ...
-1
votes
1answer
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 ...
3
votes
1answer
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 ...
5
votes
3answers
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 ...
0
votes
1answer
60 views

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

I have an initial function as follows ...
0
votes
2answers
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 ...
0
votes
2answers
186 views
0
votes
1answer
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 ...
3
votes
1answer
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 (...
0
votes
0answers
52 views

Is it possible that NSolve gives the roots that the function is not (well-)defined at those points? (an example is given)

I have this function for reals values of $x$ for $2<x<3$. $$f(x)=(3 \pi -2 x)^2 \sin \left(\frac{1}{2} \left(\csc ^{-1}\left(\frac{4 \pi (\pi -x) \csc \left(\frac{\pi ^2}{\pi -x}\right)}{4 x^2-...
1
vote
2answers
205 views

FEM 1D 3D region coupling - speed up coupling using boundary integration

I am working on a simulation of the heat equation involving a 3D solid simulation coupled to a 1D fluid simulation (convective term of heat equation). I am using the method of false transient as ...
0
votes
0answers
39 views

How can I make sure if the given function has any roots which are not rational multiples of $\pi$?

I have this function for $0<x<\pi$. $$f(x)=(3 \pi -2 x)^2 \sin \left(\frac{1}{2} \left(\csc ^{-1}\left(\frac{4 \pi (\pi -x) \csc \left(\frac{\pi ^2}{\pi -x}\right)}{4 x^2-8 \pi x+5 \pi ^2}\...
0
votes
0answers
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: ...
1
vote
0answers
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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{...
2
votes
1answer
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 ...
0
votes
2answers
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\...
2
votes
2answers
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 ...
1
vote
1answer
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 ...
2
votes
1answer
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: ...
0
votes
1answer
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 ...
5
votes
1answer
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 ...
0
votes
2answers
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 ...
5
votes
1answer
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: ...
1
vote
1answer
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 ...
7
votes
2answers
238 views

Finite difference method to solve coupled differential equations

I am trying to solve the following coupled differential equations: $\dot{c}_1(t)=-\int_0^tf(t-s)c_1(s)+g(t-s)c_2(s)ds$, $\dot{c}_2(t)=-\int_0^tg(t-s)c_1(s)+f(t-s)c_2(s)ds$, where $f(t-s)=\frac{\sqrt{2}...
1
vote
0answers
65 views

NIntegrate and MaxRecursion

I'm using NIntegrate to get the value of a very complicated function f[k,T,M], where T and <...
1
vote
1answer
82 views

Non-numerical values for integral

I am trying to solve the following integral numerically ...
1
vote
1answer
46 views

1D Integral always evaluates to 0 and Replace All

I am a bit puzzled by Mathematica's behaviour. I am trying to evaluate some 1D integrals which depend on parameters phi1,phi2 numerically (functions ...
0
votes
1answer
62 views

Trouble while trying to re-run open source code

I am a physics student and this is my first time working with Mathematica. I am trying to run the notebook mentioned here, titled "Amplification factors of the superradiant scattering of a ...
6
votes
2answers
225 views

Inverting integral transform $f(s)=\int_0^\infty g(x) \exp(-s g(x)) \mathbb{d}x$

Suppose our function $f$ is defined in terms of $g$ as follows. $$f(s)=\int_0^\infty g(x) \exp(-s g(x)) \mathbb{d}x.$$ Are there tools in Mathematica that could let me obtain $g$ given knowledge of $...
2
votes
2answers
68 views

How to exclude the singularities by using FunctionSingularities

I want to compute a integration like ...
1
vote
1answer
88 views

NDSolve of a stiff system of ODE's

I am trying to solve numerically the following set of differential equations ...
0
votes
1answer
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 (...
0
votes
2answers
57 views

Problem with a double integral

Why is the following integral not evaluated by Mathematica (ver. 11.3, Windows 10) ...
2
votes
1answer
58 views

Custom Normalization for NDEigensystem

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{\...

1
2 3 4 5
59