Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

7
votes
0answers
279 views

NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
7
votes
0answers
2k views

Integro-differential equation

I have to numerically solve a nonlinear partial integro-differential equation using Mathematica. This is my equation, $$\frac{\partial y(x,t)}{\partial t}=\int_{-\infty}^\infty K_0(|x-u|) ...
6
votes
0answers
67 views

Slow NIntegrate over complicated domains (sometimes)

Overview I have a very large matrix I need to calculate where each element requires the integration of a product of two functions over some complicated domain. I would like to find a set of options ...
6
votes
0answers
350 views

Numerically solve 2nd order differential equation with singularity

Consider a second order differential equation with a potential that diverges at some generic value in the variable. For example: $$-y^{\prime\prime}(s)+\frac1{\mathrm{cn}{(s\mid k^2)}}y(s)=0$$ where ...
6
votes
0answers
365 views

Optimizing NIntegrate for higher PrecisionGoal

By default, NIntegrate works with MachinePrecision and its PrecisionGoal is set to ...
5
votes
0answers
80 views

Modify NDSolve`StateData (if possible)

I am trying to solve a PDE that needs to be scaled constantly (refer to this). @andre suggests I modify NDSolve`StateData. Now, the problem is, I'm not used to ...
5
votes
0answers
602 views

Controlling the time step in NDSolve?

I generally use NDSolve for stiff non linear partial differential equations of 4th order. I find that a BDF1 method generally does well to placate my beast of a PDE. I've also tried out ...
4
votes
0answers
233 views

NDSolve: ProcessEquations and Reinitialize with Piecewise functions

I am having trouble with using NDSolve`Reinitialize when the system consists of a pieceise function. If we define the ODE system ...
4
votes
0answers
165 views

Artifacts in Line Plot from InterpolatingFunction

I have a periodic solution from an NDSolve that is producing an InterpolatingFunction. With the default plot settings, there is not enough PlotPoints/MaxRecursion to resolve the peaks in the function: ...
4
votes
0answers
260 views

Increase precision of custom function

I hope the title is not misleading: Suppose I have a function that is quite complicated, e.g. f[u_] := Exp[-Exp[- Abs[c.u]^a] Sin[d.u] Sin[(Abs[c.u]^a) ... I ...
3
votes
0answers
78 views

Non-linear integral equation

I'm trying to solve with Mathematica an integral equation. I found this excellent answer (How to solve a non-linear integral equation?) solving with a collocation method a problem which can be ...
3
votes
0answers
408 views

Using NDSolve for Integro-Differential Equations

I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are: ...
3
votes
0answers
325 views

Numerically solving PDE with high precision

I want to numerically solve the PDE $\partial_t u(t,x)=c\partial_x u(t,x)+(mx-l)u(t,x)$ with some initial and boundary conditions and given parameters $c$, $m$ and $l$. Consider the code ...
3
votes
0answers
769 views

Solving a system of nonlinear equations self-consistently

I am trying to solve a set of three non-linear equations in Mathematica. I need help with them. The Mathematica code (in plain text format) is attached below. If you copy & paste the code below ...
2
votes
0answers
86 views

Global vs local adaptive integration: lattice propagator

I was doing the first exercise in the paper Lattice QCD for Novices. This is the expected result: With the default "GlobalAdaptive" method for NIntegrate it threw errors saying that the error had ...
2
votes
0answers
69 views

Slow integration of interpolating function

I have a large file with irregularly spaced data in the format: ...
2
votes
0answers
79 views

Whether NIntegrate evaluation is multithreaded or not?

About MultiThread evaluation I am talking about here, see this post I am NIntegrate the function grarm[e, 3, dimension, 1, 1, 0.005]. There is matrix operation in ...
2
votes
0answers
228 views

Is mathematica storing information it shouldn't store?

I'm seeking to find solutions to a numerical integration with a large set of parameter combinations (basically, I'm doing a brute parameter sampling). Yet, I believe the memory of the computer is ...
2
votes
0answers
225 views

FindRoot - Speed and errors

I am using FindRoot[] to solve a complicated equation. It seems I get the correct answer even though I get errors about an ...
2
votes
0answers
399 views

Inconsistent boundary and initial conditions: BC ignored altogether

Consider the following diffusion-decay equation with von Neumann b/c in the origin and Dirichlet at the other boundary: ...
2
votes
0answers
209 views

Numerical-Symbolical Integration (Calculus)

I created a simple numeric-symbolic integration. Here you can use symbolical and numerical techniques at the same time. You can also interpolate numerical integrals. The problem with my function is ...
2
votes
0answers
162 views

EventLocator with LSODA?

Is the EventLocator option not compatible with LSODA on NDSolve. Below is what I tried to do ...
1
vote
0answers
59 views

Monte Carlo integration with random numbers generated from a Gaussian distribution

I want to do numerical integration of some functions using the Monte Carlo method. The default setting for the Monte Carlo method is to use a uniform distribution as far as I know. How can I change ...
1
vote
0answers
56 views

Choosing PrecissionGoal and AccuracyGoal for decomposed integral with NIntegrate

Assume I have a complicated integral $I$ which can feature all kinds of difficulties like infinite interval, rapidly oscillatory integrand, integrable singularities and numerically almost singular ...
1
vote
0answers
42 views

ParametricNDSolve and ProcessEquations

I have a question regarding NDSolve`ProcessEquations and ParametricNDSolve. When using the regular NDSolve we have the option to divide the integration into the three steps ProcessEquations, Iterate ...
1
vote
0answers
201 views

Differential equations: How do I solve a delay differential equation with 0-1 variables

How do I solve the following non-linear, delay-differential equations using Mathematica under the assumptions $$p(t) = 1 ,\; y(t) > k$$ $$p(t) = 0,\; y(t)<= \ k$$. $$ \frac{dw}{dt} = ...
1
vote
0answers
69 views

Constrain integration to be over real domain

I am trying to integrate the following: Integrate[(2*Cos[Sqrt[F]*z - G])/E^(D*(p + z)^2), {z, -(h/2), h/2}] I am getting solution in complex domain: ...
1
vote
0answers
77 views

NIntegrate doesn't work

I have a function, Dx[s] (defined in a module) which I can plot: Plot[Dx[s], {s, 0, GetLatticeLength[]}] However if I try ...
1
vote
0answers
145 views

Jumps in NDSolve results

I need to compute using NDSolve routine, some function $F(x)$, having two possible values $F_1(x)$ and $F_2(x)$ depending on whether the argument exceeds some ...
1
vote
0answers
80 views

why maxrecursion didn't work if I specify singularity in NIntegrate

I study sigularity specification and MaxRecursion in NIntegrate. And find something unusual. first I define a function δ[x_, y_: 1/100] := 1/π*y/(x^2 + y^2) ...
1
vote
0answers
69 views

Integrate boundaries defined as equations

Have you guys ever needed to define Integrate boundaries as equations? I tried to submit the equation as was written in original text but it seems that mathematica can't understand it. ...
1
vote
0answers
283 views

triple NIntegrate fails

Here's m problem simpler in terms of codes ...
1
vote
0answers
194 views

Why is a bump function making NDSolve take forever to solve?

I am attempting to solve a system of relatively complicated elliptic PDEs via a relaxation technique. In particular, I am trying to solve $\textrm{div} LW = S$ where $S$ is some vector and $L$ is the ...
1
vote
0answers
224 views

Numerical integration involving Inverse Normal CDF

I'd like to evaluate the following numerical integration using Mathematica $$ \ \int_0^T\int_0^\infty xe^{-0.04 s}g(x,s) dxds\ $$ where g(x,s) is a Gaussian copula function with say, marginal ...
1
vote
0answers
220 views

Cauchy principal value integral of a list of numbers. How?

I have a list of numbers that are numerical samples of a function for which I need to find the Cauchy principal value integral. I thought I should be able to combine Interpolation with Integrate to do ...
1
vote
0answers
471 views

NDSolve: methods and step size choosing

I am looking into the documentation of NDSolve[]; more precisely how this function chooses the StepSize and how it chooses which ...
1
vote
0answers
276 views

Solving homogeneous Fredholm Equation of the second kind

I am trying to solve a homogeneous Fredholm integral equation of the second kind, i.e. $\lambda y(x) = \int\limits_a^b e^{i[\phi(t)+k(t-x/M)^2]} y(t)\,dt$ where $\lambda$ is the eigenvalue (to be ...
1
vote
0answers
220 views

Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations

I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...
1
vote
0answers
369 views

How can I speed up numerical integration of multidimensional integral?

I am numerically solving an integral equation that contains a double integral. I have managed to get a solution but it takes forever. I am wondering if there is a way to speed up numerical integration ...
1
vote
0answers
539 views

Speed up Numerical Integration

EDIT: I need to evaluate a very complicated multi-dimensional Integral. The dimension of the Integral depends on a variable j. Let's make my point clear with the ...
1
vote
0answers
238 views

NDSolve Convergence test failure and significant effect of DifferenceOrder on eventual results

I am solving a non linear partial differential equation with what I call free boundary conditions (solid mechanicists would know this as simply supported). I realized that this boundary condition ...
1
vote
0answers
307 views

singularity in NDSolve and Table command

We are considering the following equations ...
1
vote
0answers
197 views

Integrating over a region without singularity gives an error indicating the function has singularity in that region

I have the following 2D region over which I want to integrate a function: ...
0
votes
0answers
14 views

Calculating the Lypanov Exponent/Spectrum for the Duffing Oscillator

Some fellow students and I are trying to calculate and plot the Lypanov spectrum for the Duffing oscillator (currently a test approach). Each of us has Mathematica knowledge based purely on past ...
0
votes
0answers
58 views

complicated Numerical Integration, FEM application

I am trying to calculate a 2d Integral which has another 2d integral in the integrands. here is the setup: ...
0
votes
0answers
47 views

Numerically Solving Compatible Systems of Overdetermined PDE

Is there an easy way to get Mathematica to numerically solve a compatible system of overdetermined PDE, and plot the solutions? For example, consider the "toy" example $\dfrac{\partial u}{\partial ...
0
votes
0answers
67 views

Loop integrals (quantum field theory)

I am attempting to compute the one loop contribution to the Higgs mass, and the one loop integral is somewhat difficult. I decided to try and get Mathematica to do it, to see if the answer can point ...
0
votes
0answers
33 views

How does NIntegrate evaluate a piecewise range of x,y?

Could someone explain to me how Mathematica evaluates the following integration. ...
0
votes
0answers
40 views

Boundary Value Problem- using NDSolve or another method

I am trying to solve a set of coupled partial differential equations, with defined boundary conditions using mathematica. Here are the equations and the boundary conditions. ...