Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
30 views

WorkingPrecision causes issue in the NIntegrate

I really can't figure out why my code sometimes is not working. My integrations involve two variables (k and kz). The integration range for both of them are from zero to infinity. I found out that in ...
2
votes
1answer
31 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
58 views

Two dimensional high oscillated numerical integral

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

Complex Integration

There are some sequential functions: ...
0
votes
0answers
64 views

Help with calculation of the matrix element( block matrix) of the energy of a quantum dot using Mathematica [on hold]

best regard I am an undergraduate student in physics, and I'm doing my undergraduate work, I am currently studying the electronic structure of quantum dots using the method discussed in the article ...
0
votes
1answer
56 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
55 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
33 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
62 views

Summand is not numerical at some point

I am trying to do some numerical integration with the following codes: ...
2
votes
1answer
104 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
46 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
50 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
64 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
33 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 ...
-1
votes
0answers
33 views

Mathematica integrations? [duplicate]

New mathematica user here, when integrating (1+lnx)Sqrt(1+(xlnx)^2), when plugging the u and du values into the integral, how should it look exactly? Cheers, -Josh
-3
votes
1answer
98 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
19 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
41 views

nintegrate: greater accuracy possible

I've got the following piece of code: ...
2
votes
1answer
56 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
69 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
174 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
68 views

Output of NIntegrate depends on MaxRecursion

I have an integral in this form: ...
3
votes
1answer
71 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
110 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
114 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
65 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
118 views

Catastrophic loss of precision

while I am trying to solve the double integral in the range of 0 to Infinity (for both the integral) it give me the error Catastrophic loss of precision in the global error estimate due to ...
0
votes
0answers
28 views

Real or Imaginary result of spherical bessel and hankel functions of imaginary arguments

I am trying to calculate a rather complicate expression involving Spherical Bessel and Hankel functions. My problem is that somehow for pure imaginary arguments the functions are not pure real or ...
1
vote
0answers
85 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 ...
3
votes
1answer
77 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
44 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 ...
0
votes
1answer
39 views

Different results for NIntegrate for the same function using cartesian and polar coordinates

This is probably a straightforward question. I have two functions f[x_,y_,z_] and g[r_, theta_, z_] where: g[r_, theta_, z_] returns f[ r Cos[theta], r Sin[theta], z]. For the same points in ...
2
votes
1answer
70 views

Evaluate function defined by DifferentialRoot

I have the following sequence of rationals that I want to find the generating function of: ...
1
vote
1answer
53 views

Increase Precision in Numerical Integration

I need to generate a table of Chebyshev expansion coefficients of trigonometric functions (in this case Cos[2 Pi t] to very high accuracy. Code is: ...
3
votes
1answer
172 views

Combining Gravity Turn and Orbit Models

I have a mathematical model for the motion of an orbiting spacecraft about Earth: ...
3
votes
1answer
181 views

How to numerically integrate this integral

I am unable to do this definite integral in Mathematica 9. Is there any command so that I can get the numerical value of the above integration? Code: ...
-1
votes
1answer
35 views

Numerical integration of modified bessel function

I try to numerically compute this integral but I receive many errors and I end up getting unreasonable answers, I know that there's a closed form answer but I have to compute it numerically. Would ...
0
votes
0answers
78 views

“General” strategy to use NIntegrate for multidimension integrals?

I don't have much experience of numerical methods for multidimensional integrals. Currently, the particular function I want to integrate is: $$f(x,y,z,p_x,p_y,p_z) = \frac{p_x^2(2 p_x x(p_y y + 4 p_z ...
5
votes
2answers
96 views

How to add (energy) constraint when using NDSolve to Equation of Motion

To simplify my problem, I will try and solve the Equation of Motion for a particle in a 1D Harmonic Potential. energy[x_, p_, m_, ω_] := p^2/(2 m) + (m ω^2)/2 x^2 ...
0
votes
1answer
51 views

Multidimensional NIntegrate problem of the function decaying as 1/x^2

The function I am trying to integrate is more complicated but I can simply write the function as (I had made a typo error, sorry. The '+' sign in front of the r should be '-'): $f(\omega ) = \int ...
4
votes
1answer
102 views

Using `N` gives strange result

Consider these two functions which are almost the same: ...
0
votes
0answers
75 views

Unequal behaviour of FindRoot to two similar functions

Unfortunately, I have some difficulties to plot a function. Here is my code: ...
1
vote
0answers
37 views

Using real numbers gives suspicious result

In the code below when I use a real number for number 4 in the exponent in the irf function, it returns wrong result. ...
4
votes
2answers
131 views

Compute the average distance from the base of a rectangular pyramid to its apex

How can I compute the average distance from the base of a rectangular pyramid to its apex? For example, if the base of the pyramid is 30 feet by 8 feet, and the height of the pyramid is 12 feet, then ...
3
votes
1answer
68 views

NIntegrate on tetrahedron

I've been trying to numerically calculate an integral in a tetrahedron of a discretized domain. In some cases when I specify a method I've been getting the error message NIntegrate::femonly ...
0
votes
0answers
33 views

How to tell NDSolve to ignore small values in choosing step size

I have a very large system of first order differential equations, which can be written (on paper) as dX/dt=F(X), where X is a vector and F is a vector function. All elements of X are strictly positive ...
0
votes
0answers
42 views

Mathematica Integrate implicit assumptions returns a function not defined in some points while NIntegrate performs integration safely

Hi guys i'm performing a standard integration with mathematica routine Integrate, the function i'm integrating is the following: ...
0
votes
0answers
58 views

Plotting a Function that contains a Numerical Integration

I'm using mathematica to plot a function that has been defined in the following way: ...
1
vote
1answer
66 views

Mathematica multi-dimensional numerical integration default method

I'm performing multidimensional Numerical integrations with mathematica I was wondering what was the default method that mathematica was using. Also i'm changing some parameter inside the integration, ...
1
vote
1answer
65 views

Strange integration

I tried to evaluate this line Integrate[((-I/2) (E^((-I) x) - E^(I x)) + ((E^((-I) x) + E^(I x)) x)/ 2)/((-1 + E^x) x), {x, 0, Infinity}] Then I get $14$ ...