# Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

45 views

151 views

### Can Mathematica solve this integral numerically?

I need to evaluate numerically the following ...
117 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 ...
36 views

### NIntegration and NDSOLVE and Interpolation [closed]

I am working on the Duffing equation to calculate the residual error from the x'[t] solution after integrating the Duffing once but the accuracy is not good I ...
170 views

### Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
227 views

70 views

### NDSolve DAE solution order is mixed up

Compare the two solution sets below: in the first one (x == False), there are only 3 dependent variables while in the second one (...
67 views

### Integrate function over a 2D implicit surface

I have the following problem. Let's say we have a 2D region, let me be very explicit: ...
5k views

### Solving a time-dependent Schrödinger equation

I want to solve the time-dependent SchrÃ¶dinger equation: $$i\partial_t \psi(t) = H(t)\psi(t)$$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so that ...
486 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 ...
43 views

### Nintegrate until a certain value is reached

I need to launch a Nintegrate command to integrate a function on a domain $(0,x_{b})$ where the value $x_{b}$ is determined by the fact that the integral reach a ...
96 views

### NDSolve with coupled ODE's and unknown singularities

I have two coupled ODEs that I am trying to solve numerically. It appears that there is a singularity in the solution to the equations which I am unsure how to get past. Both functions $\alpha$ and ...
105 views

### Empty WhenEvent action crashes kernel

Bug introduced in 9.0 and persisting through 10.4.1 WhenEvent is new in 9.0. This is an example from the docs, slightly modified (action is wrapped in ...
284 views

### Follow up: how to plot a function under NDSolve domain

Here is the details of the code to plot. ...
112 views

### Mathematica Newmark Optimization

Here is my Mathematica code which implements the Newmark method to solve a equation of motion. The variable "ag" contains the accelerations from an earthquake record. Is it possible to optimize this ...
73 views

### Does NDSolve iterate faster in a region where the system being solved is in equilibrium?

I was wondering how exactly the time it takes for NDSolve to iterate through a certain region of the domain depends on the local behaviour of the given system being solved. My guess would be the ...
42 views

### NDSolve kernel crash, affected by variable naming

The following isolated example cannot be further simplified much to reproduce a crash. I've already submitted the issue to TechSupport, but it seems this is not an easily reproducible case, so I'm ...
69 views

### Force NDSolve to use finite difference

How to force NDSolve to use finite difference instead of FEM. I have the following code: ...
477 views

### Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
70 views

### Boundary conditions for NDSolve

I get the following message: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> from ...
216 views

### NDEigensystem returns incorrect eigenvalues for 2D coulomb problem, eigenfunctions contain discontinuity

I posted a similar question a short time ago regarding the 3D Coulomb problem. Jens' excellent answer to this thread allowed me to obtain the correct eigenvalues and eigenenergies for that system. I ...
73 views

### Issues with modeling pulses in a very simple system of DAEs

Some time ago I had asked this question about evaluation difficulties using Euler Integration to solve a system of ODE where discrete pulses occur. While I have now abandoned Euler integration and ...
135 views

### Strange behaviour of integrals with Cos, Sin, and Exp

During the study of the problem How to solve this integration? I have discovered a strange behaviour of some integrals. I would consider it a bug. ...
104 views

85 views

### Average function value over an Interval [closed]

What is the best way to find the average value of a function over a specific interval in Mathematica? I can not figure it out. I have two points on the interval and need to find the average value.
201 views

### NDEigensystem cannot solve numerically the 3D Coulomb problem, while DSolve returns the right answer

After having derived by hand the eigenvalues and eigenfunctions for the 3D and 2D hydrogen atom, I want to solve the systems numerically using Mathematica. I need to do this because my next step is to ...
255 views

### What can one do with extremely stiff problem in NDSolve?

Consider the following illustrative problem: $$\frac {\partial f} {\partial t} = \frac {\partial} {\partial x}(x f) + \frac {\partial} {\partial x}(f \frac {\partial f} {\partial x})$$ This is ...
46 views

### Performance of numerical integral over piecewise function

Using mathematica version 10.3, I observe that an integral over a piecewise function evaluates a factor 10 slower than the same integral without the piecewise distinction. Here is the code: ...
39 views

...
37 views

119 views

### Differential Equation with Numerically Integrated Boundary Conditions

I have a second order differential equation that I'd like to solve numerically, and then integrate its solution twice to get the parametric equations of a curve. The ODE is: \$2 ...