# Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

782 views

### NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
260 views

### How to find derivative of a numerical solution, where precision is ambiguous?

I am trying to take the derivative of a numerical solution. I am concerned that the way I'm doing this may be problematic due to numerical error; I think there must be a better way but I'm not very ...
473 views

### Differential Equations with Matrices

I'm trying to implement the differential equation of a Cellular Neural Network in Mathematica as seen below: ...
1k views

### Incorrect solution of diffusion equation with Neumann boundary conditions

I want to set up a PDE model, which takes a two-dimensional diffusion equation into account. The key problem is that I have some trouble in solving the two-dimensional diffusion equation numerically. ...
83 views

### How can I numerically pre-compute an indefinite integral with a parameter?

Suppose I have a function $f(t)$, and I want to compute its indefinite integral $$F(t)=\int_0^tf(\tau)\mathrm d\tau.$$ Moreover, suppose that, for any of a number of reasons, I require this integral ...
131 views

Bug introduced in 10 and persists through 10.3.1 or later I created this InterpolatingFunction, and NIntegrate gives an ...
216 views

130 views

### A 1D numerical integral Mathematica cannot compute, from physics

A well know result in theoretical physics is that a sum over Matsubara fermionic frequencies, i.e.: $$S = \sum_{n=-\infty}^{\infty} h(\omega_n) \hspace{32pt} \omega_n=(2n+1)\frac{\pi}{\beta}$$ can ...
119 views

422 views

### Error Interpretation in NIntegrate

I am using a recursion algorithm developed by Migdal for Lattice Field Theory, and I have the following code: ...
990 views

### How to Solve this ODE with Mixed Boundary condition

I have an ODE equation which is sort of y''[x] + 2 y'[x]/x + .0001 (y[x])^3 ==0 subject to the boundary conditions ...
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 ...
206 views

### Construct DifferentialMatrices and Kernel for LevinRule for this integral and ODE set

I've made a lot of progress on my problem the last few days thanks to all the help I've received on here. I think I'm upto the final step of greatly improving the performance of NIntegrate[..] on my ...
481 views

### Efficient way to perform elementary integration step with NDSolve internal method

I'm trying to tweak the NDSolve function to perform one elementary integration step (using some explicitly selected stepping algorithm via ...
2k views

### PDE Boundary Conditions

I am solving a PDE using Mathematica and I would like to know how to implement the condition that the two-variable function y[t,s] is zero whenever ...
137 views

### Using N gives strange result

Consider these two functions which are almost the same: ...
383 views

### How to choose MaxStepFraction for optimal speed of NDSolve

I'm trying to use NDSolve to solve a 1D Schrodinger's equation, and it seems that MaxStepFraction has huge effect on the ...
672 views

### Multiple simultaneous events in EventLocator method for NDSolve

I'm using NDSolve to integrate a system of ODEs, and EventLocator to stop the integration when it leaves a certain region in phase space. This works perfectly as it should. However, I've also added ...
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 ...
64 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 ...
65 views

### Numerical instabilities of a convection-(non-)diffusion equation when shrinking from a square to a triangular domain

I am trying to evaluate a parameter-dependent indefinite integral using a PDE-based scheme I described here, and I'm having some trouble when I try and cut down the domain from a square to a triangle. ...
72 views

### Avoid Evaluation of Function at NDSolve

I have a huge "black-box" f function, which I want to integrate. Let's define it: f[x_,y_,a_]:=a*Exp[-(a*10000)(x^3+y^3)] as ...
112 views

### Using indexed array elements as integration dummy variables with EvaluationMonitor. Bug?

As part of a routine that must cope with integration of varying numbers of dimensions, I would like to use indexed variable names (e.g., x[0], x[1],...) as dummy integration variables. However, it ...
541 views

### How can I invoke the solution of NDSolve to determine a parameter in my equation just inside NDSlove?

I am trying to solve a differential equation by NDSlove for $h(x,t)$. It reads $$h_t=h_{xx}-V_h-\lambda(t)$$ where $V_h$ is a given function of $h(x,t)$ denoted by <...
90 views

### Integrate yields complex value, while after variable transformation the result is real. Bug?

I have the follwoing integral: Integrate[1/Sqrt[0.7 + 0.3*(1 + z)^3], {z, 0, Infinity}, Assumptions -> z \[Element] Reals] >> -3.36354 - 3.85013 I the ...
419 views

### Solve integral equation for upper bound

I need to find the upper bound of an integral knowing the value of the lower bound and the result of the integral. Here is my function: f[t_] = Sqrt[1 + E^(-2 t)] ...
73 views

### NIntegrate::ncvbr: How should we interpret and handle this error not mentioned in any documentation?

I have some user-defined module describing my integrand which has to be computed numerically (it's much more complicated than this but bear with me): ...
167 views

### How to specify the time variable for NDSolve

I recall that it is possible to specify which independent variable is the "time" variable in NDSolve, but I can't find it documented anywhere. Does anyone recall ...
108 views

### What are good/best practices to take the Fourier transform of an InterpolatingFunction?

I have a function which I have obtained from numerical integration of a differential equation, and I would like to take its Fourier transform. What are good practices for doing this? To make things ...
728 views