Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
51 views

How to solve in principle such coupled ODEs

One example for coupled ODEs from the Mathemtica help center reads ...
0
votes
0answers
21 views

NDSolve: Improperly assigned stepsize

This is not a question which I estimate is aided in answering by providing complete code, which is excessively long. I ran an NDSolve[] at ...
0
votes
0answers
33 views

NDSolve and piecewise functions

I'm trying to use NDSolve on a Pde for a function that is made up of several pretty complicated functions, most of which are themselves functions of an underlying piecewise function. When I try to ...
3
votes
1answer
53 views

NDSolve Step Size Effectively Zero

I'm trying to solve a PDE for a function of 2 variables. The most accurate parameterizations of this equation are very unwieldy and involve numerous piecewise elements, and so right now I'm trying to ...
0
votes
0answers
15 views

Seconde Derivatives of an integral [closed]

$$ g(x) = \int_{-\infty}^{x^2/2} e^{-(x^2+1)t^2}dt\,. $$ Trouble calculating the first and the second derivative of this function.
0
votes
1answer
63 views

Numerical integration of a numerical integration [closed]

I have a complicated function $f(x)$ whose analytical form does not exist for the following integral $$g(x)=\int_0^x\mathrm{d}x'\,f(x'). $$ I finally need to evaluate the following integral $$\int_0^...
3
votes
1answer
72 views

Convergence of a multiple numerical integration

I would like to define the following function $F(A,\nu)$, which is the result of a numerical integration, and needs the following function definitions. ...
1
vote
1answer
105 views

Approximating Integral under 2D Interpolation function

First, I have already been working on this problem, and have asked a similar question previously here. I am trying to find the integrals of 2D interpolation functions that are output from ...
-1
votes
1answer
51 views

Given a function of two variables, how can I define a 2nd function that is the integral of the 1st w.r.t. one of the variables? [duplicate]

Given a function of two variables, how can I define a 2nd function that is the integral of the 1st w.r.t. one of the variables? I have a function $f(x,y)$ and I want to do the integration like $\int^...
1
vote
0answers
30 views

NIntegration[?] and N[Integration[?]] [duplicate]

The following Integral answer is different with the following two methods. which one is correct? ...
7
votes
4answers
179 views

How to avoid repetitive calculation when doing numerical integral?

Suppose I have a function f[x] which is very complicated, together with a function g[f[x]]+h[x] to integrate. That is: ...
0
votes
0answers
36 views

A problem with the Gauss Kronrod quadrature

I take the risk to ask a weird question but I wonder If i miss something. In the very complete answer to How to solve a non-linear integral equation? How to solve a non-linear integral equation? ...
2
votes
2answers
70 views

Integration vs numerical integration

When I solve the following integral analytically and numerically the answers are different. Why? how can I get similar answers? ...
0
votes
1answer
73 views

How to increase the evaluation speed of this numerical integral?

I have a three dimensional integration, which takes about 30s using LocalAdaptive and "GaussKronrodRule". Using ...
1
vote
2answers
87 views

Numerical Integration involving multiple singularities [closed]

I want to solve the following double integral numerically. This integral has singularities in two points. ...
2
votes
2answers
98 views

How to get rid of the error message when evaluating a highly oscillatory numerical integral?

I have a simple numerical integral with a highly oscillatory integrand: ...
0
votes
0answers
32 views

Integral function whose limits are solutions to separate equations

I'm trying to get the function Ne to work, which involves an integral whose limits are the solutions to two different equations. So far, the code runs smoothly, but when I try to plug values into CMB,...
3
votes
1answer
54 views

How to index multi-dimensional vectors in NDSolve/WhenEvent?

I want to solve a system of coupled ODEs using NDSolve with WhenEvent. But I'm having a hard time trying to index the state ...
0
votes
1answer
63 views

Dealing with numerical integration singularities

I'm trying to perform the following integral (numerically) (1) And their behaviour is where PV denotes principal Value. In principle I don't know the functions $\rm{Im}(\alpha)$ and $\rm{Re}(...
0
votes
1answer
62 views

How can we plot gamma function numerically?

How can we plot this integration for m=1,\theta = 0.2? Here r_h(lower limit) = 1.
0
votes
1answer
82 views

Getting errors from NIntegrate when I try to plot my function

I am trying to 3D plot the function ϕ[σ, λ], but Mathematica keeps refusing to plot for the reason that the output involves complex numbers, even though by ...
4
votes
0answers
57 views

How can I make NIntegrate aware of a singularity along a curve, e.g. a circle in a 3D integral?

I am having some trouble trying to get Mathematica to do a numerical integral over three dimensions which contains a singularity of dimension 1, and I would like some pointers to solid resources on ...
0
votes
0answers
39 views

NIntegrate and Integrate seem to over-estimate an integral involving a sharp Lorentzian (Cauchy) distribution

I am trying to do a numerical integral with NIntegrate, but it seems that I get a bigger number than I should. The integral is fairly simple: ...
1
vote
1answer
79 views

How to speed up this code with NMaximize?

I want to maximize the expected exponential growth rate of the portfolio, which contains 3 stocks. I get the adjusted stock price for General Electric, Du Pont, and IBM. ...
8
votes
2answers
282 views

NIntegrate appears to give incorrect results

I am trying to specify a bivariate probability density function in Mathematica. As a check, I would like to confirm that it integrates to one. Here is the function: ...
2
votes
1answer
77 views

Using RegionPlot to draw inequality involving Nintegrate

I'm trying to draw the region where the next inequality is true : $$ r_1 \tau-r_3 \int^{\tau}_{0} C_s(t)<0$$where $$C_s(t)=e^{t-r_5 t} \left(d e^{r_8 \tau }+e^{r_8 (t+\tau )}-e^{r_8 t}\right){}^{-\...
0
votes
1answer
50 views

Error with Numerical Integration

I'm running the following code: ...
0
votes
1answer
29 views

Possible Error with the Output Graph

I'm running the following command: ...
3
votes
1answer
109 views

failure of code with Helmholtz equation with point source

I am new to the finite elements package in Mathematica. I have a system of equations, one of which is a Helmholtz equation with a point source in the interior of a bounded domain. The following is the ...
1
vote
1answer
53 views

Error with Numerical Integration and Graph Plotting

I'm trying to run the following code: ...
1
vote
0answers
35 views

Changing variable in numerical solution

I solved numerically the differential equation: ...
0
votes
2answers
84 views

Multivariate integration of a compicated expression

I have an expression in multiple variables that is something like ...
14
votes
1answer
503 views

Gillespie Stochastic Simulation Algorithm

The Gillespie SSA is a Monte Carlo stochastic simulation algorithm to find the trajectory a dynamic system described by a reaction (or interaction) network, e.g. chemical reactions or ecological ...
2
votes
0answers
109 views

Bug in the “PrincipalValue” method of NIntegrate?

Update 2 The technical support suggests setting AccuracyGoal. As I quote here It does appear that the program is returning an incorrect result along with a ...
0
votes
0answers
33 views

Interpolation function inside a numerical integral [on hold]

Hello all and thanks in advance for your comments, I will be brief to explain my doubt. If you need any more information, please ask me. I have an interpolation function which comes from the ...
0
votes
2answers
113 views

2d numerical integration [closed]

I'm trying to get a numerical solution for a double integral: ...
1
vote
1answer
50 views

NDSolve for complex variables

I am trying to simulate a multiple pendulum system with damping as follows: ...
1
vote
1answer
47 views

Integration of a function of interpolating functions

I need to calculate the integral of a function of interpolating functions. Being more specific, the function I want to integrate is the following ...
4
votes
1answer
59 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 ...
1
vote
1answer
52 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
62 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): ...
1
vote
2answers
42 views

Convergence Problem in NIntegrate

I need to evaluate the following integral numerically for different values of a: ...
7
votes
1answer
86 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
180 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
113 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
117 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
65 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 ...