Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
49 views

Problem with NIntegrate over a user-defined region

I define a region as follows: ...
3
votes
0answers
111 views

Obtaining NIntegrate error estimate

Is there a way to extract the error that Mathematica estimates when calculating a numerical integral using NIntegrate? Internally Mathematica must keep track of this error, because it is used to ...
0
votes
1answer
92 views

NIntegrate vs. summation

I' m interesting in distributions of points on sphere, plane figures etc. Especially for small number of points: 1, 3, 7, ... It seems that good criterion for uniformity of distribution is some ...
0
votes
0answers
31 views

Tricks to speeding up optimisation of a function involving a heavy integration

This is the code, and energycoeffs[] is the function that takes in a dxd matrix and spits out a scalar value. ...
0
votes
1answer
66 views

Integration does not give real value

The code below must be obvious. We are trying to integrate a complicated function from 0 to 1. ...
1
vote
2answers
156 views

Problem with FindMinimum

I am struggling with a problem on fitting a function to my data using FindMinimum. The problem is related to small angle x-ray scattering and my approach is the following: I define the electron ...
0
votes
1answer
42 views

Problems using a complicated function within a LogLinearPlot [duplicate]

my problem is that I have a rather large function which I'm trying to plot, which looks something like this: ...
2
votes
1answer
129 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 ...
3
votes
1answer
112 views

What boundary is added when NDSolve::bcart pops up?

When insufficient boundary conditions are given to NDSolve for solving PDE, the warning NDSolve::bcart pops up: ...
1
vote
2answers
97 views

optimization of CountourPlot with NIntegrate

I have to use ContourPlot with a complicated function depending on 2 parametrs (that I cannot report here) that contains numerical integrations. Here is a simple ...
2
votes
3answers
146 views

Inefficient NIntegrate and Which

In version 10 a simple numerical integraton of piecewise function is highly inefficient: ...
2
votes
1answer
96 views

NIntegrate and Integrate giving different results for ill-behaved function

I'm trying to integrate the following function with Mathematica 8: $$ I(a,b)= \int_0^1 \mathrm{d}x\int_0^1\mathrm{d}y \,\theta(1-x-y) \frac{1}{x a^2-y(1-y)b^2},$$ where $\theta$ is the Heaviside ...
1
vote
1answer
93 views

Implicit region misses subset?

Context I am interested in integrating a 2D function over lines defined implicitely Attempt Let me just start by integrating the identify on such sets of lines which a defined using ...
5
votes
1answer
99 views

Integrate over implicit 1D region: works for algebraic but not transcendental equation?

QUESTION How come this works: NIntegrate[1, {x, y} ∈ ImplicitRegion[{x == y^3, x <= 1, x >= 0}, {x, y}]] But this fails: ...
6
votes
1answer
120 views

Numerical Integration different in Mathematica version 9 and 10 with same options

I have noted that the same function with the same settings gives me different results in Mathematica version 9 and 10. This involves integrating numerically interpolating functions and so on. Here a ...
1
vote
1answer
151 views

Solving a nasty partial differential equation

I have a differential equation that I would like to solve numerically in the region $z \in [0,L]$ and $t \in [0,t_{max}]$: $$ \partial_t S(z,t) = f(z)S(z,t) + \int_0^L \text{d} z'g(z,z') S(z',t), $$ ...
3
votes
1answer
201 views

What method does `NIntegrate` uses by default?

There is a variety of algorithm for performing numerical integration (See wiki). What method does NIntegrate uses by default? I looked on the documentation page and I saw that the function ...
0
votes
2answers
99 views

NIntegrate and Integrate of a Spherical Bessel function

I am trying to integrate over a spherical bessel function. I have used both the Integrate and NIntegrate functions in Mathematica but the values given by each do not match. Any reason why this ...
1
vote
1answer
98 views

How to prevent tiny complex errors in Integrate?

Integrate is adding a tiny imaginary error to an easy result. Why? And how can I stop it? ...
2
votes
1answer
85 views

How to obtain numerical answer for equation containing integration

Could some one tell me how to obtain numerical value of $a$ and $b$ from equations below: $$\frac{1+exp(b)}{1+exp(0.9a+b)}=0.95$$ $$\int_{0}^{\infty} \frac{1+exp(b)}{1+exp(a x+b)}=1$$
1
vote
1answer
69 views

Finding the true expectation

I have the density function and I want to determine its expected value ...
3
votes
0answers
137 views

Numerical integration: complicated 2D integral seems to be poorly estimated

In the course of some physics research I've been working on, a very annoying integral has appeared that I'm having difficulty evaluating numerically. Any help you could offer would be greatly ...
0
votes
0answers
81 views

Numerical Integration/Function

I have a problem with a function defined numerically through an integral of the form: ...
0
votes
0answers
28 views

What means the definition F[t_?NumericQ] :=…? [duplicate]

I've come along a function defined in this way: F[t_?NumericQ] := NDSolve[{-u''[x] - u[x]/x == -t^2 u[x], u[x0] == x0, u'[x0] == 1}, u, {x, x0, x1}] What does ...
1
vote
1answer
166 views

Runge-Kutta Butcher tables

I like to have the Butcher's table for Explicit (or implicit as well) Runge-Kutta method of a fixed order. I do not understand reading ...
0
votes
1answer
69 views

NDSolve not able to solve a system of differential equations

Here are some basic equations ...
16
votes
2answers
255 views

Least effort to handle a point source inside the domain of PDE(s)

By point source I mean a constrained condition at one point inside the domain of PDE(s). For example: $$\frac{\partial ^2u(t,x,y)}{\partial t^2}=\frac{\partial ^2u(t,x,y)}{\partial ...
0
votes
3answers
92 views

Calculate this integral returns undefined

Limit[ (Integrate[Sqrt[Exp[3 t + 2] + 3] , {t, 0, x}]^2) / Integrate[Sqrt[Exp[6 t - 2] + 5] , {t, 0, x}] , x -> Infinity] This can be solved but ...
0
votes
0answers
63 views

Locating Periodic Orbits - Part II

In a previous post Part I I asked how could I locate the x0 position of a periodic orbit. I got only one possible solution but it does not work as I want. Let me be ...
4
votes
2answers
177 views

When analytical and numerical methods do not agree - Case study with Maximum Likelihoods methods

Here is the probability distribution I am interested in: $$P(q)=C e^{4 n s q} q^{4 n \nu - 1} (1 - q)^{4 n \mu - 1}$$ , where $e$ is the constant of Euler and $C$ is constant so that the whole thing ...
2
votes
1answer
172 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
1
vote
1answer
185 views

Locating Periodic Orbits

Here is the code for the numerical integration of an orbit. First the module for the definition of the equations of motion. ...
0
votes
1answer
86 views

InterpolatingFunction used to work with mathematic 7 but not working with mathematica 10

This code is used to work perfectly with Mathematica 7 and now it is not working with Mathematica 10. Any help is appreciated. CL05 = InterpolatingFunction[{{0.5, 11.99999999999999}}, {1, ...
2
votes
2answers
196 views

Plot result of non analytical-integral

I have the following function: h = 1; c = 1; k = 1; B2 = (2*h*c^2)/(x^5 (Exp[(h*c)/(x*k*T)] - 1)); (someone can see that this integral is the Planck function). ...
1
vote
3answers
108 views

Speed up NIntegrate, which takes eigenvalues from another function

I have simplified my problem here, in my actual problem the matrix is much bigger which makes it impossible to find eigenvalues analytically. So, I chose standard BCS problem (2x2 matrix) to ...
2
votes
1answer
207 views

Approximate $h$ in $F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$

Consider $$F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$$ $$|z|\le L$$ $$0 \le \theta \le \pi$$ By having knowledge of $F(\theta)$, how can one approximate $h(z)$? In ...
1
vote
2answers
320 views

NDSolve with Explicit, Implicit Euler and Trapezoidal method

I am using Mathematica 9.0 both on Linux and Windows and I would like to integrate the Van der Pol equation numerically using various techniques such as Explicit and Implicit Euler and Trapezoidal ...
2
votes
0answers
91 views

Position from 3 dimensional acceleration data? [closed]

Per a previous post on Mathematica StackExchange here I'm trying to utilize 3-axis accelerometer data to determine approximate 3D position. I wanted to start with a simple case. To this end I've ...
0
votes
1answer
56 views

Integral for piecewise function inconsistent with the usual way

I have the following piecewise function: ...
2
votes
2answers
116 views

WorkingPrecision causes issue in the NIntegrate

I really can't figure out why my code sometimes is not working. My integrals involve two variables (k and kz). The integration ...
2
votes
1answer
54 views

Double application of NIntegrate produces unexpected error messages [duplicate]

In the course of trying to answer 69601, I encountered unexpected error messages. In highly simplified form, NIntegrate[NIntegrate[z y, {y, 0, 10}], {z, 0, 10}] ...
1
vote
1answer
89 views

Two dimensional high oscillated numerical integral

I have some problem with two dimensional integral. I want to calculate such integral. ...
1
vote
1answer
126 views

Complex Integration

There are some sequential functions: ...
0
votes
1answer
76 views

How to ensure efficient order of operations for rules, slots, substitutions?

I need to calculate several functionals Q[[t]] of a pdf f[x]. ...
1
vote
2answers
57 views

Incomplete Integration in Area

Area[2 Sqrt[(1 - p^2)^2 - r^2], {p, 0, 1}, {r, 0, 1 - p^2}] is able to perform only the integral over r, leaving the integral ...
0
votes
1answer
75 views

NIntegrate with units: unable to determine the units of quanitites that appear in the input

I want to integrate Planck's law of radiation in a certain wavelength intervall with units. I define some constants: ...
1
vote
1answer
114 views

Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
2
votes
1answer
119 views

How to use slots and patterns to reduce repetitive calculation?

This is kind of complicated... How can we make MMa calculate values of a function before doing multiple pattern or slot substitutions? Answers to similar questions didn't cover the case where the ...
1
vote
0answers
61 views

Numerical integration with symbolic coefficients

Thanks to Michael and its reply here I managed to deal with some of the more complicated integrals. But still there are some even more complicated ones. Let give a specific example. ...