Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
1answer
110 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
101 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
105 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
128 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
171 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
210 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
112 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
105 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
86 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
72 views

Finding the true expectation

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

NDSolve not able to solve a system of differential equations

Here are some basic equations ...
16
votes
2answers
284 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
96 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
69 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
182 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
178 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
1
vote
1answer
202 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
89 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
205 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
126 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
233 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
340 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
97 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
62 views

Integral for piecewise function inconsistent with the usual way

I have the following piecewise function: ...
2
votes
2answers
132 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
92 views

Two dimensional high oscillated numerical integral

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

Complex Integration

There are some sequential functions: ...
0
votes
1answer
77 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
59 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
85 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
129 views

Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
2
votes
1answer
121 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
63 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
63 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
111 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 ...
0
votes
0answers
49 views

Order of evaluation when using Solve and Minimize

I have to solve numerically an integral, that ends up being more or less as follows: Solve[f[x]==a*Sum[Sin[x-i]*(f[i]-f[i-1]),{i,1,x}],f[x]] (not actual ...
-3
votes
1answer
119 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
36 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
55 views

nintegrate: greater accuracy possible

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

NIntegrate and Interval regions

NIntegrate does not seem to like Intervals as regions. Consider the following example function defined for a parameter "a" ...
0
votes
1answer
88 views

Mathematica answers `Solve[Integrate[f, x] == x^4, f]` wrong [closed]

The input Solve[Integrate[f, x] == x^4, f] ouputs {{f -> x^3}} Why?
4
votes
1answer
266 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
91 views

Output of NIntegrate depends on MaxRecursion

I have an integral in this form: ...
3
votes
1answer
123 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 ...