Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
101 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 ...
2
votes
1answer
123 views

The numerical solution of a nonlinear ODE: boundary value problem

I want to solve the following nonlinear ordinary differential equation with boundary values $f(0)=1$ and $f(1)=1$: $${\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}f \left( x \right) ={\dfrac { \left( 51-51\,x ...
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
58 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
43 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 ...
6
votes
3answers
140 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
807 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
188 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
90 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
44 views
0
votes
1answer
45 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
40 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
520 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
31 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
55 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
62 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
191 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
71 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
69 views
4
votes
2answers
102 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
38 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
55 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
138 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
114 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
85 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 ...
3
votes
0answers
82 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
364 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
904 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
374 views
5
votes
2answers
88 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
104 views
1
vote
2answers
54 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
511 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
294 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 ...
0
votes
0answers
39 views

How to solve equation which has three variables and integration?

My equation is in the form x^2+y^2+50[Integrate[Exp[-P^2/10]*Log[(x + y*p + 1)/(x - y*p - 1)],{p,0,100} The range of x and ...
5
votes
2answers
862 views

Animating the Lorenz Equations

I am trying to use the Animate command to vary a parameter of the Lorenz Equations in 3-D phase space and I'm not having much luck. The equations are: ...
7
votes
0answers
593 views

Modelling Hysteresis with a Differential Equation

I want to implement the bulk ferromagnetic hysteresis model (mostly the Jiles-Atherton Model), see http://drum.lib.umd.edu/bitstream/1903/6043/1/PhD_99-1.pdf page 44 equation (30). The needed ...
7
votes
2answers
121 views

inspecting step size and order of $\tt NDSolve$

I am trying to collect information about what step sizes and what orders is using NDSolve internally. I tried wrapping it into a ...
-2
votes
1answer
66 views

How would I integrate cos (x^2) using the trapezoidal rule with n=4? [duplicate]

I need to integrate the function I stated above, with the trapezoidal and midpoint rule. It has the integration bounds of 0 to 1. N is the amount of rectangles I should be using to find the value of ...
7
votes
1answer
159 views

Numerically evaluating an integral related to Cantor's staircase

Cantor's staircase $F_C(x)$ is a well-known "pathological" function: Plot[CantorStaircase[x], {x, 0, 1}] The MathWorld link given above claims that $$\int_0^1 ...
6
votes
2answers
3k views

Is it possible to compute with the trapezoidal rule by numerical integration?

Is it possible to compute trapezoidal rule numerical integration? I know that Mathematica has Interpolation, and that a list of points can be interpolated and then ...
1
vote
0answers
55 views
5
votes
3answers
181 views

How to integrate a Bézier function?

I have: points = {{0, 100}, {250, 0}, {0, 300}, {500, 500}} And I want to know the area below the curve, so I came to: ...
0
votes
1answer
71 views

Integrate over FindRoot solutions

I have a function of bivariate normal PDF and its marginals defined as ...
7
votes
2answers
332 views

Plotting the image of a curve under a flow

I have some explicit time-independent vector field on the plane, and I would like to study how points evolve under the flow generated by this vector field. The flow is rather complicated and cannot be ...
0
votes
0answers
79 views

NIntegrate non-numerical values error occurs when MaxRecursion is increased

I was doing some numerical integration,and found out when MaxRecursion was low(such as the default 9 times),the integration can have a result with the warning: ...