The Stack Overflow podcast is back! Listen to an interview with our new CEO.

# Questions tagged [numerical-integration]

Questions on the use of numerical functions NIntegrate and NDSolve.

2,199 questions
Filter by
Sorted by
Tagged with
42 views

### Catastrophic loss of precision in numerical integration

I am trying to get the following code running: ...
64 views

### Non-linear differential equation with tricky variable dependence

My problem regards solving a differential equation and can be reduced to the problem of finding $f(x)$ such that $\frac{df}{dx}=\frac{dh}{df}$, with $h(f)$ a known function. I have this list of data,...
33 views

### Solving Integration with exponentials

I am trying to solve this integration : Integrate[(1 - Exp[-a*x])* (1 - Exp[-b*x])*(1 - Exp[-c*x]), {x, 0, t}] I get the result. But when I use the below ...
123 views
+100

### Where is the numerical solving breaking down?

I am working with a set of three coupled reaction-diffusion PDEs, and for some parameter values I am getting some not so great solutions. I have been searching documentation and tutorials, and I have ...
39 views

### Solving numerically an equation with an integral

I am trying to solve the following equation numerically: Equation to solve for $y$: $$na(ay-y)^{n}\int_{ay}^{+\infty} \frac{(x-y)^{-n}}{x-ay}dx=b$$ with for example $a=4$, $n=1.25$ and $b=1.6$. I ...
191 views
+100

### Finding local minima of an energy defined by integration

This question is also asked here and here. I would like to reproduce the two solid curves in Fig. 1a of this paper. The total energy is given in Appendix A, and the curve is obtained by minimizing ...
118 views

### How to include conditional statements in NIntegrate?

I have a function g which is the result of another integrated function f. This function (f) ...
62 views

### How to solve this equation in Mathematica?

I wonder what is the best way to solve this equation in MA? $$y= \frac{\partial}{\partial x} ~ \frac{\partial}{\partial x^*} f$$ where y and ...
57 views

### Computing the definite integral of a fractional polynomial containing sin(x) and x^n

I need to compute the definite integral defined as $$\int_{-\infty }^{+\infty } \frac{\sin ({x_0}\, \omega )-\sin (x \omega )}{(\sin (x \omega )-\sin ({x_0}\, \omega ))^2+(x-{x_0})^2} \, dx\,.$$ When ...
43 views

### Integrating a function with Max function

I'm trying to evaluate the triple integral $$\int_{0}^{1} \int_{0}^{1-x} \int_{0}^{1-\max(x,y)}1 dzdydx$$ in Mathematica. The code I'm using is simply ...
69 views

### Want help with handling error messages from NDSolve [closed]

I'm trying to solve a system of two differential equations with NDSolve and mathematica gives error. I have functions in ...
26 views

### Help with NIntegrate with singularity and variable integration limit

I have a function of the type: $$F(x,z)= \int_{-\infty}^{\infty} dx' \int^{z}_{-\infty} dz' f(z,z',x,x')\frac{\partial g(z',x')}{\partial z'}$$ where the integration order may be interchanged. I ...
29 views

### NIntegrate user defined function

I have the the function f[a_] := Module[{solution, ans, x}, solution = NSolve[x + a == 4]; I want to integrate it by writing ...
35 views

### How to stop NIntegrate if the integral appears to be smaller than certain value?

I have a number of integral to compute numerically. The values of some of them are small as those take NIntegrate very long to compute according to its internal goals. Now, I care only about the ...
40 views

### How to resolve underflow occurrences?

I am solving a second order differential equation described by odey below. For the asymptotics, I have the following code which will be used as initial conditions for NDSolve. ...
101 views

### Numerical resolution of non-linear coupled ODEs

I have problem with my code in Mathematica. I have introduced the set of coupled non-linear ODES. This is the resolution part: ...
48 views

### Can't solve for y in a fairly simple work done by magnetic field equation

The equations below are essentially calculations for a railgun-type mechanism (here is a good image description). I also drew an image using my own variables as definitions: I assumed that ...
51 views

### Hybrid ODE simulation with very small parameters

I am trying to solve a Hybrid dynamical system using NDSolve and WhenEvent. I am able to simulate when the parameters are close ...
77 views

### About some hypergeometrical formulas for roots of trinomial and quadrinomial

Please correct my interpretation of formulas by Pietro Majer from post. For equation $a=x+x^p$ one root is $x=a\sum\limits_{k=0}^{\infty}\frac{(-a)^{(p-1)k}}{(p-1)k+1} {{pk}\choose{k}}$ Wolfram ...
112 views

48 views

### Elimination of numerical error in initial data

Elimination of numerical error in initial data can be crucial for its subsequent evolution. In the following simple example ...
43 views

### TemporalDiscretization in MethodOfLines

When solving ODE's one can use options like MaxStepFraction to control the number of grid points. When solving PDE's ...
783 views

### Integration of Interpolated function take an unacceptable amount of time

I have a simple integration which, when using an interpolation function, is taking too long to calculate: ...
82 views

### Solving system of PDEs with NDSolve

I am trying to solve a system of coupled PDEs with zero-flux boundary conditions on a large domain. I have two problems: 1) Is there a possibility to use results of NDSolve as inititial conditions? ...
93 views

### Solving a stiff nonlinear ODE system

The system I am trying to solve is simple, but looks pretty stiff and I have unsuccessfully tried to solve it with StiffnessSwitching. It is the following one: <...
72 views

I must find a poincaré section of a Hénon-Heiles system as described in Hénon-Heiles 1964 paper. The Hénon-Heiles Hamiltonian is the following, $$H = \frac{1}{2}(p_{1}^{2}+p_{2}^{2}+q_{1}^{2}+q_{2}^{... 1answer 613 views ### Correct way of simplifying the result of an integral Many times Mathematica gives enormous results to simple problems. One uses the program more for trouble than for not knowing how to solve the problem. As an ejemplo I present this integral that ... 0answers 70 views ### Solving 2D Integro-Differential equation numerically The following problem was given to me by a friend, so I can't really guaranty that a solution exists, but if, I certainly can't find it myself... Let us consider the following Integro-differential ... 0answers 46 views ### NDSolve 1/0 error I'm having trouble to solve a differential equation with NDSolve. Does anyone knows how can I get rid of this problem? ... 2answers 75 views ### Getting an empty plot after plotting the solution of a differential equation I am facing problem to plot this ... 1answer 166 views ### How to increase NDSolve accuracy for 2nd order ODE? My attempt to NDSolve a 2nd order nonlinear ODE ... 0answers 53 views ### Computing a system of ordinary differential equations with initial condictions over a continuous range [closed] I have some questions about Mathematica programming and would appreciate if you could help me. I want to solve a system of ordinary differential equations μ '[t] ... 1answer 40 views ### Plotting a function on the different axis I've solved the DE:$$a\cdot x(t)+b\cdot\ln\left(1+c\cdot x(t)\right)=-p\cdot x'(t)\tag1$$Where x(0)=k And I got the following solution:$$t=\int_{x(t)}^k\frac{p}{a\cdot z+b\cdot\ln\left(1+c\...
I am trying to verify the following inequality using Mathematica, but without any success.  \lim_{a\rightarrow0^{+}}\frac{\intop_{0}^{1}e^{\frac{-30}{\sqrt[15]{a^{16}*\log\left(\frac{1}{x}\right)}}}...