Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
0answers
12 views

Again about a function defined by NIntegrate

I've looked on several similar questions but without success. Suppose I need to do the following (this is not a real problem, but only a scetch where an error appears): let $$(Kv)(x,s,t)=\int_s^t ...
3
votes
1answer
58 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 ...
1
vote
0answers
100 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
104 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
48 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
112 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
24 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
83 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
70 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
42 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
35 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
59 views

Evaluate function defined by DifferentialRoot

I have the following sequence of rationals that I want to find the generating function of: ...
-1
votes
0answers
37 views

Mathematica 9 cannot solve definite integration [duplicate]

mathematica 9 cannot solve the definite integration. Is there any command so that it can give a value of the integration
1
vote
1answer
49 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: ...
2
votes
1answer
131 views

Combining Gravity Turn and Orbit Models

I have a mathematical model for the motion of an orbiting spacecraft about Earth: ...
3
votes
1answer
167 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
33 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
57 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 ...
4
votes
2answers
87 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
49 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
98 views

Using `N` gives strange result

Consider these two functions which are almost the same: ...
0
votes
0answers
72 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
36 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
120 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
32 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
15 views

Calculate (designate) area of ​​the largest area [migrated]

The values ​​of a function of two variables z = f (x, y), where x, y, z are float. Calculate (designate) area of ​​the largest area of flat O. By 'flat area' O mean a sub area T wherein for each ...
0
votes
0answers
36 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
56 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
62 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$ ...
1
vote
0answers
25 views

Can NIntegrate be used with the Levin method in several dimensions?

I've got some data in the form of an interpolating function. It's a function of three variables, $\rho(x,y,z)$. I'd basically like to integrate this with some phase over a cube of known size, like $$ ...
0
votes
1answer
39 views

Error messages from NIntegrate [closed]

I've been trying to work on some integrals (Actuarial Science, for those interested) but somehow this always returns an error for me. ...
1
vote
0answers
65 views

Numerical solution to two non-linear coupled differential equations [closed]

I am trying to solve two differential equations representing the position of an object in space. I have specified arbitrary initial conditions. ...
3
votes
0answers
54 views

Integrate yields complex value, while after variable transformation the result is real. Bug?

I have the follwoing integral: Integrate[1/Sqrt[0.7 + 0.3*(1 + z)^3], {z, 0, Infinity}, Assumptions -> z \[Element] Reals] >> -3.36354 - 3.85013 I the ...
0
votes
0answers
50 views

Problems with NIntegrate, levmaxord error

I am trying to integrate some spherical harmonics, for scattering over a sphere, using the SphericalHarmonicY and NIntegrate ...
0
votes
0answers
51 views

Numerical integration with large exponents

To make a long story short, I am doing mostly analytic calculations and therefore do note have good skills in numerical integration. I have to numerical integrate the following integral ...
2
votes
1answer
117 views

2D Fourier transform of a few (4) disjoint discs on a plane

I'd really appreciate some advice. Short Version I'm trying to calculate the following $$ ...
2
votes
0answers
48 views

Number recognition in Mathematica [closed]

Suppose that I have a number $n$ with many decimal digits of precision. What is the code to use to get Mathematica to recognize possible closed-form expressions for that number?
0
votes
1answer
78 views

How to compute an integral with 300 digits accuracy [closed]

I'm new to Mathematica and I would like to ask what is the code to use to calculate numerically an integral with 300 digits precision; also, I would like to know what is the right code to use the ...
1
vote
1answer
71 views

Computer freezes during NIntegrate[]

I have a notebook that freezes the computer every time I run it (I mean the whole computer becomes unresponsive and do not react to ctrl-shift-esc and ctr-alt-delete as well as alt-tab and ...
1
vote
0answers
59 views

PDE with Integral constraint

I am trying to solve the Non-linear Schrodinger equation $-\Delta \psi(r) + \psi(r) - |\psi(r)|^2\psi(r) = 0$ where $r \in \Omega$ In a square domain ($(x,y) \in \Omega$ where $\Omega=[0,1]\times ...
2
votes
1answer
83 views

StateResponse is non-deterministic

I observed non-deterministic behaviour in StateResponse. Let's look at an example. ...
1
vote
1answer
70 views

How to evaluate complex numerical integral in mathematica?

I have an integral of the form \begin{align} F(\omega) = \int_0^{\infty} f(s,\omega) \mathrm{d}s \end{align} which I would like to numerically evaluate and plot for a range of $\omega \in ...
1
vote
1answer
101 views

Solving Fredholm Equation of the first kind [duplicate]

I want to numerically solve Fredholm integral equations of the first kind, equations of the form $$g(t)=\int_a^b K(t,s)f(s)\,\mathrm{d}s$$ where we know the functions $K(t,s)$ and $g(t)$ and seek to ...
0
votes
1answer
75 views

NIntegrate:eincr error

I am trying to solve this expression in Mathematica with the function NIntegrate: ...
0
votes
2answers
72 views

NIntegrate Error

I am trying to solve this expression with the function NIntegrate: ...
3
votes
2answers
91 views

NIntegrate giving message NIntegrate::slwcon:

I got this interesting answer from Mathematica when trying to integrate my function numerically: f[x_] := Sqrt[17*x^2 + x^4] NIntegrate[f[x], {x, -1, 2}] ...
1
vote
1answer
97 views

Definite Integral over Bessel Function

Hello I am interested in evaluating the following integral. ...