Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
57 views

Getting an error with NIntegrate due to insufficient WorkingPrecision or divergent integral

Hello I have the following problem. But when I try to solve it, I get an error saying 'Catastrophic loss of precision in the global error estimate due to \ insufficient WorkingPrecision or divergent ...
0
votes
1answer
89 views

NDSolve for a system of nonlinear coupled pde

I try to solve a system($n$) of coupled nonlinear 1-d PDE's which is basically coupled sine-Gordon equations (through 2nd spatial derivative) in time and space. I am interested in the dynamics when I ...
5
votes
1answer
408 views

How to solve this Integral equation

D[x[t] - x[t - 1]/(2 E), {t, 3}] + Integrate[E^(-δ)*x[t - δ]/5^t, {δ, 2, 2.5}] == 0 I found solve this problem is hard with Mathematica. I also find a article ...
6
votes
1answer
105 views

How do I extract the weights used by NIntegrate?

I'd like to use NIntegrate to adaptively integrate an expression, then use the same points and weights to integrate that expression with some parameters changed. I ...
0
votes
0answers
26 views

Optimizing NMinimization and NIntegration with a Nested List-Valued Function

I want to use NMinimize and NIntegrate on each element of a nested list-valued function. Here's a simple example of what I'm ...
1
vote
1answer
78 views

Numerical integration plot

I am trying to do a numerical integration plot in Mathematica. Specifically, I want to plot $r$ versus $\tau$ where, $$\frac{dr}{d\tau}=\sqrt{2F(r)}$$ $F$ being a quartic polynomial. The limit of $r$ ...
0
votes
1answer
87 views

difficulty in numerical estimate of double integral

I entered the following simple integral in mathematica: ...
17
votes
2answers
1k views
6
votes
0answers
235 views

Problems with NDSolve for solving coupled Schrödinger-like PDEs with perfectly matched layer boundary condition

I'm trying to solve a full-vectorial wave equation for an arbitrarily shaped wave guide, by using NDSolve and perfectly matched layer (PML) conditions. The PML ...
0
votes
1answer
68 views

Why does Mathematica 10.3.1 fail me on : Integrate[(x^3) [Log[2 Sin[x]]]^8, {x, 0, Pi}] [closed]

All it gives me is a pretty restatement of my original request. When I use WolframAlpha PRO, I get a result of 624510 and a visual representation of the area in question. I know the ends of the ...
4
votes
3answers
193 views

How to solve this integration? [closed]

I need to find the integration of the following expression $$H(k)=\frac{\tau_0}{\pi}\int_0^{\infty}\exp\left(-u^{\delta}\cos\left(\frac{\delta\pi}{2}\right)\right)\cos\left(u^{\delta}\sin\left(\frac{\...
1
vote
1answer
78 views
0
votes
1answer
103 views

Integrating high oscillatory function - triple integral - error message

I am working in a triple integral, but the second integral (qQ) and the first too ( aA ) is a oscillatory funcion. The third integral ( os11 ) is like a gaussian, and is easy to integrate. i am ...
3
votes
3answers
63 views

Replace variable with value prior to evaluating NIntegrate

The title says it all. Reading posts such as this however, I'm not seeing how to do this. This is the simplest example that can show my problem. ...
0
votes
0answers
64 views

Another question about inverse Laplace transform

Given $r = 0.06;\quad \theta = 105;\quad \kappa = 1;\quad x_0 = 100;\quad K = 100;\quad \sigma = 0.10;\quad T = 0.25;$ Define $ \nu = -\kappa/\sigma^2 - 0.5;\quad p = \kappa*\theta/\sigma;\quad q = -\...
2
votes
1answer
51 views

Numerical Integration with absolute value [duplicate]

I want to find the area enclosed by the fourth heart curve (http://www.wolframalpha.com/input/?i=fourth+heart+curve). Since both $y(t)$ and $x(t)$ are given and I know that $t$ is in the range $[0,2\...
6
votes
3answers
148 views

Force WhenEvent to respect default stepsize

I have to numerically integrate an equation system and monitor the accumulating datapoints. For example, I fit a line to a subsample of the points and terminate via ...
8
votes
2answers
842 views

Numerical contour integrations in the complex plane - contour deformation gives different answer for analytic kernel

I am trying to do a contour integration in Mathematica numerically. In particular, I'm checking the identity: $$ H_m^{(1)}(z) =\frac{i^{-m}}{\pi}\int_{-\pi/2 + i \infty}^{\pi/2 - i \infty} \exp[i m \...
0
votes
0answers
23 views

Nested Numerical Integration [duplicate]

So I am trying to evalute the following Integral Numerically: $$\int_{\mathcal{J}^+(x_0)\cap\mathcal{J}^-(x_f)}^{}A(x_0,x_1)\int_{\mathcal{J}^+(x_1)\cap\mathcal{J}^-(x_f)}^{}A(x_1,x_2) dx_1dx_2$$ ...
2
votes
3answers
193 views

What's the proper way to 'cut out' an irrelevant part of an integral, so I don't run into problems with precision?

I'm doing a numerical integration that involves an integrand with a few exponentials whose values over the integration region range enormously. I'm really only interested in the part of the range that ...
2
votes
2answers
93 views

How to find the integrand singularity points when having NIntegrate::slwcon:

In order to calculate the closed area of the curve below defined by parametric equation curve02, ...
3
votes
1answer
50 views
0
votes
1answer
46 views

ND on a function using NIntegrate

I need to numerically differentiate a function that takes a list as an argument and that uses NIntegrate in its definition. A simple example is ...
1
vote
0answers
44 views

Numerical Integral with Boolean as part of argument

I am trying to numerically calculate a partial surface area integral of an oblate spheroid in spherical coordinates. The area I want to calculate is determined by a boolean function in the argument of ...
0
votes
1answer
558 views

Applying l'Hôpital's Rule to NDSolve with Piecewise Function

OK, so I've been working on this problem for over a week and it's driving me crazy. I'm trying to solve a system of two differential equations in $x(t)$ and $y(t)$ using a "time-elimination method," ...
1
vote
0answers
34 views

How can I automatically set an NIntegrate call to zero if NIntegrate::slwcon is observed?

This is a generic question about the NIntegrate function. I am attempting to numerically integrate a function which may or may not be highly oscillatory, based on it's inputs. For a certain sets of ...
3
votes
0answers
56 views

Singularity treatment in a simple problem [duplicate]

With a simple search, several posts can be found on treating singularities encountered while using NDSolvefamily of numerical methods. However, most of them involve ...
0
votes
0answers
64 views

Switching from Integrate to NIntegrate

I'm trying to decrease the amount of time that it takes to run the following code: ...
0
votes
0answers
193 views

Maximum of NDSolve output. Problem with interpolating function

I solve a NonLinear PDE and get a solution (which for other reasons I put into a vector): SolVec1[1][[2]][x,t], where x and t are the indipendent variables. Now, I would like to get a distribution ...
0
votes
1answer
82 views

Difficulty using NDSolve

I am tying to solve two differential equations with two delays numerically. The result didn't come out and it was written that “NDSolve::ndsz:...step size is effectively zero; singularity or stiff ...
1
vote
1answer
74 views
4
votes
2answers
116 views

Integrating an interpolating function

I have been using the following NDEigensystem command to generate the eigenfunctions of the laplacian with a square domain: ...
0
votes
0answers
41 views

NIntegrate a function in a circular segment

I am trying to integrate numerically a function over a circular segment surface using polar coordinates. In the following example I am using the zero order Bessel function, but any cylindrical ...
0
votes
1answer
75 views

WorkingPrecision and AccuracyGoal for using with NIntegrate

I'm modeling a quantum tunneling barrier. Because I want to express my quantities in mks units, that means that some of the variables I'm using are pretty small (10^-9). I use NIntegrate for part of ...
0
votes
2answers
159 views

How can I perform NIntegrate with NDSolve?

I'm a new user and I have no idea how to perform NIntegrate by using NDSolve. For example consider following differential equation (DE): ...
-1
votes
2answers
117 views

Numerical approximation using trapezoidal formula [closed]

I have bumped into a problem, that I cannot solve. I have to approximate the value of ln3 using a composite trapezoidal formula, so that the error should be within (10)^-3! How can it be solved?
3
votes
1answer
93 views

Trying to find a temperature profile with a nonlinear 2nd order ODE. NDSolve very sensitive to seemingly arbitrary constant

I am trying to solve this differential equation for a heat transfer problem: \begin{equation} kt\frac{\partial^2 T}{\partial x^2} = \epsilon \sigma T^4, \ \ \ T(0) = T_0, \ \ \ \frac{\partial T}{\...
3
votes
0answers
104 views

Implementing the Numerov method for solving ODEs with NDSolve

I'd like to implement the Numerov scheme for solving an ODE (Scroedinger Eq time-independent) with NDSolve. I tried in analogy with the Runge Kutta example in the ...
1
vote
1answer
79 views

NIntegrate discrepancies

I want to compute a numerical integral for a gaussian trivariate distribution. Say ...
20
votes
2answers
2k views

Determining which rule NIntegrate selects automatically

I need to numerically integrate a highly oscillatory function over the semi-infinite domain $(0,\infty)$: $$\int_0^\infty \frac{\sin^2(x) \sin^2(1000 x)}{x^{5/2}}\mathrm dx$$ Since the Levin rule (...
7
votes
3answers
365 views

Where did I go wrong with my implementation of the trapezoidal rule?

One method for doing quadrature, called the trapezoidal rule, improves accuracy by connecting the points on the curve corresponding to the points of subdivision with line segments, forming trapezoidal ...
1
vote
0answers
906 views

Integro-differential eqn with double integral

I am looking at the following variation of a integro-differential, with y[0]=1. The output is not great, any solutions to this? ...
1
vote
1answer
381 views
5
votes
2answers
98 views

Convergence data for Monte Carlo NIntegrate

I am using NIntegrate with Method -> "MonteCarlo" to evaluate a high dimensional integral. Is there a way I can obtain a list ...
0
votes
1answer
109 views
1
vote
2answers
65 views

Export NDSolve data

I have calculated a solution of a system of differential equations using NDSolve and generated a plot. How could I extract the data of the solutions? The input is ...
8
votes
2answers
576 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 ...
2
votes
1answer
310 views

NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...