Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

4
votes
1answer
33 views

How to speed up NIntegrate when using an interpolating function output from NDEigensystem?

I have been working with NDEigensystem in order to find the resonant frequencies of different shaped drums. I would also like the coefficients of the different eigenfunctions so that each of these ...
0
votes
0answers
58 views

Solving equation containing integration

I am struggling with solving an equation which is not simple but nothing particularly sophisticated either. I get the mistake like ...
1
vote
1answer
49 views

Complex exponential integrand and NIntegrate

For some non-negative numbers $m_1$, $m_2$, $E$ I define a function $$ f\left(\boldsymbol{q},E\right)=\frac{1}{2\omega_{1}\omega_{2}}\frac{1}{\omega_{1}+\omega_{2}+E}+\frac{1}{4\omega_{1}\omega_{2}}\...
1
vote
1answer
60 views

ParametricPlot3D shows an empty box

I'm trying to visualize numerical solution of 4 differential equations (these are the coordinates of a wave function in a quantum mechanical system): ...
0
votes
2answers
38 views

Convergence Problem in NIntegrate

I need to evaluate the following integral numerically for different values of a: ...
7
votes
1answer
82 views

NDSolve how to monitor shooting method iteration?

here is a shooting method solution right out of the docs: ...
2
votes
1answer
55 views

Problem using Nintegrate and NDsolve

I am going to use Nintegrate to integrate the result of NDsolve and also a Table. How I can ...
17
votes
1answer
162 views

How to implement custom NIntegrate integration strategies?

How can new integration strategies algorithms be used with NIntegrate? This is a different type of extension than the extensions with new integration rules, as ...
2
votes
3answers
110 views

How to integrate numerically the product of result of NDsolve? [closed]

I am going to integrate the product of the results of NDsolve, in fact If x and y are the results as interpolating function, How I can integrate x*y numerically? <...
0
votes
0answers
30 views

How to use a numerical integral as an input function

I am new to mathematica. I am trying to use a numerical indefinite integral as an input function of a module. I have a function $$r^* \equiv r^*(r)=\int_0^{1/r} B(z)dz$$ with $B(z)$ being a analytic ...
0
votes
2answers
114 views

Solving a set of nonlinear equations

I am trying to setup and solve a set of nonlinear equations. I keep getting an error. Here is my problem: ...
0
votes
1answer
63 views

Error message when running NDSolveValue

I am trying to solve a set of differential equations but keep getting an error. See message below "NDSolveValue::ndnum: Encountered non-numerical value for a derivative at t=0" The system that I ...
1
vote
2answers
85 views

Stop Integration in NDSolve

The following code executes properly for some choices of initial points and parameter c, but fails for other choices. Could the failure be due to computation outside of the defined t, x, and y ranges? ...
1
vote
0answers
26 views

Numerical integration and interpolation with free parameters [closed]

I hope you'll be able to give me a hand on my question, I'm stuck and don't know how to make it work. First of all, I have a table of data pairs (x,f): ...
2
votes
0answers
29 views

Use of AccuracyGoal & MachinePrecision in NIntegrate

I just learned about the Inverse Symbolic Calculator and it seems like a very useful tool. For example, to find an analytic solution to $$ \int_0^{\infty } \frac{1-e^{-x} (x+1)}{\left(e^x-1\right) \...
0
votes
0answers
30 views

Difference between using NIntegrate and Integrate inside NDSolve?

The differential equation I am considering depends on an integral, which I would like to solve with NIntegrate (since it will gets more complicated and thus I have to use NIntegrate later). My code ...
7
votes
2answers
115 views

Bug in NDSolve/WhenEvent?

Bug introduced in v10. I'm fairly sure the following is a bug, and I would normally just report it to WRI. However, this is related to my answer to When using NDsolve, how to determine the ...
24
votes
2answers
426 views

How to implement custom integration rules for use by NIntegrate?

How can NIntegrate be extended with custom implementation of integration rules? This answer of the question "Monte Carlo integration with random numbers generated ...
3
votes
1answer
101 views

Understanding difference between `NIntegrate` result and home-cooked Simpson's rule

In this question I am asking about the different results I get between NIntegrate-ing a function of two variables vs. "doing it myself" with my own implementation ...
0
votes
1answer
203 views

How to pass arguments in NIntegrate and NDSolve

I am solving PDEs with NDSolve and NIntegrate, but I do not know how to pass arguments correctly. My orignial code is very ...
0
votes
1answer
66 views
0
votes
0answers
52 views

Double Integral with NDSolve!

I have fivefold multiple integral and I wanted a speed calculations.I came across on this Question and had already begun the problems. Here is a toy example with simple double integral: ...
2
votes
2answers
66 views
1
vote
2answers
122 views

NIntegrate evaluates its 1st argument while it has the attribute HoldAll?

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
0
votes
1answer
88 views
1
vote
0answers
22 views

Launching specific remote kernels in parallel

For some reason I found that my numerical integration runs much faster on Mathematica 9 than on Mathematica 10. Since I sent my calculation to a cluster with 24 cores with the following command <...
11
votes
2answers
119 views

Why NIntegrate is badly-behaved on $J_{\frac{9}{2}}(x)$ by default?

A friend of mine showed me this example: Plot[BesselJ[9/2, x], {x, 0, 1}, PlotLabel -> Style["The integrand seems to be simple", 14]] ...
3
votes
2answers
137 views

Integrate on a contour in the complex plane

I want to integrate the function f[z]= z + Conjugate[z] over a circle of radius 2 centered at the origin. For the sake of stating something that I have tried: <...
0
votes
1answer
75 views

Negative numerical result when integrating a strictly non-negative integrand

Although there are similar posts here Negative integral of a positive function , Positive integrand giving negative answer , my case is even more surprising. I have a very simple function ...
2
votes
2answers
138 views

NIntegrate fails in a very strange way

I found a strange behavior in Mathematica when trying to evaluate the integral $$f(n) = \int_{1}^2 \frac{\Gamma(n)\Gamma(x)}{\Gamma(x+n)}{\rm d}x$$ I evaluate this using ...
0
votes
0answers
30 views
1
vote
1answer
48 views

How to solve an iterative integral equation for a function in Mathematica 8.0?

I would like to solve the following iterative integral equation in order to find the functional form of $P_{0}(k)$ numerically and then use it subsequently for the rest of my code: ...
2
votes
1answer
126 views

Undershoot/Overshoot Method for this differential equation?

I have tried to solve this equation for some weeks and I am not capable. I have read in articles that it is easy with an undershoot/overshoot method, but I don't know how to do it. $y''+\frac{3}{x}y'-...
4
votes
0answers
54 views

N[Integrate] failing to return an accurate result from an interpolated integrand

I need to N[Integrate] a function Cos[alpha*x]*f(x) between x=0 and 30 at increasing alpha-values. Here f(x) is an interpolated function derived from a set of 120 ...
1
vote
1answer
72 views

Differential equation involving history integral

I have not found a solution by using google so I hope I can ask this here. I have an issue with a problem I am trying to solve and I was wondering whether what I am doing is not possible with ...
0
votes
1answer
57 views

Solution of Coupled second-order ODEs and plot the diagram

We have two second-order Coupled differential equations as the followings: $$\left\{\begin{array}{lr} \displaystyle \frac{{{d^2}{y_1}}}{{d{x^2}}} = \{ \frac{{\sqrt {\frac{{1 - {\varepsilon ^2}}}{{{{(...
5
votes
2answers
169 views

How to speed up Integration of interpolation function?

I have a list of data, and I interpolate it to a function. Then I need to do an integration with the interpolating function. But I found that the speed is unacceptably slow. My data is here (a little ...
0
votes
0answers
71 views

Tricky inverse Laplace transform

I'm trying to compute the inverse Laplace transform of $f(s) = s^c/(N + s^{ir} )$ where $c,N \in \mathbb{C}$ and $r \in \mathbb{R}^+$ using the Bromwich integral $$ F(t) = \frac{1}{2 \pi i} \int_{- ...
0
votes
1answer
83 views

Definite and indefinite integral give different results

I'm trying to find an expression that, given $x$, $y$, and $R$, gives the indefinite 2D integral of a function at the circle centered on $(x_0, y_0)$ with radius $R$. With $g$ as defined below, I'd ...
2
votes
1answer
78 views

Why does NDSolve and NIntegrate not give the same result? [closed]

I have plotted solution of two equivalent equations one in Integral form (right chart) the other in Differential form (left chart) using NDSolve and NIntegrate but they give me completely different ...
1
vote
1answer
55 views

How can use Table for two functions obtained from NDSolve? [closed]

I have obtained a numerical solution using NDSolve for two functions a(x) and b(x). how do I use Table to make a list of a(x) vs b(x) values. is it simply Table[{a(x),b(x)},{x,0,100}] or should I use ...
2
votes
1answer
69 views

Will the solution NDSolveValue finds outside of the region I give it give me bogus results?

I'm using NDSolveValue to solve Laplace's equation for a relatively simple system. I have two rectangles, separated by a small gap, which I define using RegionDifference: ...
2
votes
2answers
43 views

NIntegrate::inumri error with continuous function

I'm trying to calculate the finite part of a divergent integral numerically, but as I bring the regulator down to $0$, Mathematica starts throwing an error. ...
1
vote
1answer
72 views

NDSolve a system of PDE's when one variable does not have an explicit time derivative

Say I want to solve the following set of PDE's (my actual equations are way more complicated, this is just a simplified example to show the structure): $$\begin{align} \partial_t f(x,t)&=1-g(x,t)\...
2
votes
1answer
116 views

Numerical integration over a circle contour [duplicate]

I want to numerically integrate the following function $$f(p) = \frac{1}{2\pi i}\int_{\Gamma}\frac{1}{p}\exp\left(\frac{a^{2}}{2}\frac{1}{p}+\frac{b^{2}}{2}p\right)dp$$ where the contour $\Gamma$ ...
-1
votes
1answer
155 views

Can Mathematica solve this integral numerically?

I need to evaluate numerically the following $$\int_0^{\infty}\exp\left(-\pi\lambda\mathbb{E}_H\left(\int_r^\infty\left(1-\exp\left(-sP_{\text{M}}Hr^{-1/\delta}\right)\right){\rm{d}}r\right)\right)2\...
0
votes
1answer
121 views

Why MMA is not able to solve this problem?

I am running these following code in Mathematica. But, MMA does not output anything. It is giving me an message as "The integrand .... has evaluated to non-numerical values for all sampling points in ...