Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

3
votes
1answer
313 views

What method does NIntegrate use by default?

There is a variety of algorithms for performing numerical integration (See wiki). What method does NIntegrate use by default? I looked at the documentation page ...
1
vote
3answers
277 views

NIntegrate and Integrate of a Spherical Bessel function

I am trying to integrate a spherical Bessel function. I have used both the Integrate and NIntegrate functions in Mathematica but ...
1
vote
1answer
138 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
94 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
81 views

Finding the true expectation

I have the density function and I want to determine its expected value ...
3
votes
0answers
171 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
93 views

Numerical Integration/Function

I have a problem with a function defined numerically through an integral of the form: ...
0
votes
0answers
35 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
301 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 http://blog.wolframalpha.com/2013/09/10/numerical-methods-runge-...
0
votes
1answer
100 views

NDSolve not able to solve a system of differential equations

Here are some basic equations ...
17
votes
2answers
412 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 x^2}+\frac{\...
0
votes
3answers
140 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 ...
6
votes
2answers
250 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
218 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
1
vote
1answer
305 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. ...
1
vote
1answer
101 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
236 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
312 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 ...
3
votes
1answer
301 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
718 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
143 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
93 views

Integral for piecewise function inconsistent with the usual way

I have the following piecewise function: ...
3
votes
2answers
162 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
61 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
120 views

Two dimensional high oscillated numerical integral

I have some problem with two dimensional integral. I want to calculate such integral. ...
2
votes
1answer
185 views

Complex Integration

There are some sequential functions: ...
0
votes
1answer
88 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]. ...
2
votes
2answers
71 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 ...
1
vote
1answer
161 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
225 views

Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
2
votes
1answer
138 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
98 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. ...
1
vote
1answer
76 views

numerical integration question

The actual expressions is quite complicated so I will use a trivial example. Let In[36]:= f[u_] := 1/3 - (5/18)*(Cos[u]*a[1] + Sin[u]*b[1])^2 Then ...
2
votes
2answers
286 views

FindFit working with Integrate but not NIntegrate - I am using “?NumericQ”

I'm having some syntax problems with finding a fit to an equation that doesn't have an analytical expression for it's integral. Because I think the problem is one of syntax, I am substituting a ...
-3
votes
1answer
160 views

Integration with mathematica? [closed]

I am very new to Mathematica. I am trying to evaluate ∫ (1+lnx)Sqrt(1+(xlnx)^2) using Mathematica. I know a substitution must be done so I have set ...
1
vote
1answer
60 views

NIntegrate is it possible to evaluate the integral using a user-defined grid?

I am using the NIntegrate function and I would like Mathematica to perform the integration in accordance with a grid I define that is sampled uniformly between the boundaries of integration. Let me ...
0
votes
1answer
83 views

nintegrate: greater accuracy possible

I've got the following piece of code: ...
3
votes
1answer
181 views

NIntegrate and Interval regions

NIntegrate does not seem to like Intervals as regions. Consider the following example function defined for a parameter "a" ...
5
votes
1answer
414 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 ...
1
vote
2answers
150 views

Output of NIntegrate depends on MaxRecursion

I have an integral in this form: ...
3
votes
1answer
214 views

List interpolation

Hi mathematica people! So i am looking for the best way to interpolate a function given a list of its values. I have an iterative algorithm which needs high precision otherwise the numerical noise is ...
2
votes
0answers
200 views

Volterra integral equation

I have to find an approximate numerical solution for the equation $$ F(x) - \lambda \int\limits_1^{x} \text{d}s \;s^2 F(s) Z(x-s) = G(x) $$ $$Z(s) = (\psi''(1-2\ h\ i\ s)- 0.5 \psi''(1-2\ h\ i\ s))$$ ...
4
votes
2answers
311 views

How to plot a function that is not defined after certain point

I'm plotting a function that I get after numerically integrating over another function. Something like: f[x_,y_]:=NIntegrate[g[x,y,z],{z,0,1}] I know that above ...
1
vote
1answer
987 views

First::normal: Nonatomic expression expected at position 1 in First[0]. >>

I'm trying to do a numerical integration. The integration is within a function. ...
2
votes
1answer
382 views

Catastrophic loss of precision

I am trying to solve a double integral in the range of 0 to Infinity (for both the integrals) and Mathematica is giving me the following error: Catastrophic loss of precision in the global error ...
9
votes
4answers
617 views

Calculating an integral by the Romberg Algorithm

In my "Numerical Analysis" course, I learned the Romberg Algorithm to numerically calculate the integral. The Romberg Algorithm as shown below: $$T_{2n}(f)+\frac{1}{4^1-1}[T_{2n}(f)-T_{n}(f)]=...
1
vote
0answers
106 views

Is there any way to solve this convex-concave like optimization problem?

This is a bit of a non-standard way of asking a question perhaps but I couldnt even think of writing any code about the following optimization problem. I wonder if it could be at all solvable and if ...
4
votes
1answer
219 views

How to evaluate differential entropy from raw data?

I want to evaluate the differential entropy according to here $$h(X) = - \int f(x) \log{f(x)} dx$$ where $f$ is the probability density function. Lets create some test data (normal distribution): <...
1
vote
0answers
57 views

Is it possible to pipe the output of EvaluationMonitor to Excel?

I have an EvaluationMonitor setup to capture the points processed by NIntegrate. This is a case where the same function, integrated over the same region in cartesian coordinates yields a dramatically ...