Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
7 views

EventLocator EventAction list specification using Table versus explicit list

I have an NDSolve problem that needs a list of a large number of events that are generated programmatically. Here is a simple example that demonstrates the problem on Mathematica 7 and 8 (the versions ...
2
votes
3answers
554 views

How to integrate a function over a 3D planar polygon?

I am trying to integrate a function over a planar polygon in 3D. In 2D, this is fairly straightforward, using either answer from this question (I use the second answer). If we use an equilateral ...
0
votes
0answers
26 views

NDSolve PDE, not enough boundary condition?

The PDE that I want to solve is: $$ \frac{\partial f}{\partial t} + \frac{1}{m} \left( p_x \frac{\partial f}{\partial x} + p_y \frac{\partial f}{\partial y} + p_z \frac{\partial f}{\partial z} \right) ...
1
vote
1answer
42 views

Numerically Integrating to find a Maximum using NDSolve

I am trying to numerically find an equilibrium (maximum) of a function using its differential. The following is a simplified version. ...
1
vote
1answer
48 views

Finding a root of a parameterized integral

I have a function given as a parameterized definite integral: f[a_] := Integrate[BesselJ[0, x - a] BesselJ[0, x + a], {x, -∞, ∞}] I suspect it has a root near ...
0
votes
3answers
254 views

Solving an Integral Numerically

I have been trying to solve the integral equation below, but cant seem to find a way out of this. Can someone please help me out with suggestion? $f(t)=\int_0^{\infty}\frac{K_1a(t)}{a(t)+K_2}\,dt$ ...
0
votes
0answers
34 views

How to calculate the analytical result of this double integral?

I'm trying to solve this double integral: $I(a,b)=\displaystyle{\int_{-1}^{1}dy\int_1^{\infty } \dfrac{y\left(x^2-1\right) e^{-ax} }{b-\frac{\sqrt{x^2-1}}{x}y} \, dx} \,\, ...
1
vote
0answers
55 views

Numerically solving a 2D oscillating integral

I'm having trouble solving this integral numerically: ...
17
votes
4answers
727 views

How to calculate the volume of a convex hull?

Given a spatial curve represented by a parametric equation, is it possible in Mathematica 9 to calculate symbolically (or at least numerically) the volume of its convex hull?
1
vote
1answer
255 views

Numerical integration involving Inverse Normal CDF

I'd like to evaluate the following numerical integration using Mathematica $$ \ \int_0^T\int_0^\infty xe^{-0.04 s}g(x,s) dxds\ $$ where g(x,s) is a Gaussian copula function with say, marginal ...
0
votes
0answers
25 views

Calculating Muliti-integral Time-Ordering operator [migrated]

I am trying to solve the time-ordering operator Like this: $S(t)=\mathcal{T}e^{\int_0^tduA(u)\int_0^udvB(v)}S(0)$. How can I calculate S(t) with minimum error?
-3
votes
1answer
78 views

My code is not converging using NIntegrate. Why? Help please [closed]

I have been trying to see why this integration is not converging but to no avail. The output gives only the y-values but fail to give any real value for x-values. Rather I always have something like ...
2
votes
2answers
242 views

Numerical Integration with InverseErfc

I am trying to numerically integrate an equation that involves InverseErfc (embedded in the copula defined). The equation looks like the following: $$ \int_0^T \int_0^\infty \int_0^\infty ...
5
votes
2answers
162 views

Integrating a list of functions

For the purpose of this minimal example, let's say we have a list of functions, like this: f[y_?NumericQ] := {NIntegrate[z*y, {z, 0, 1}], a y} I want to ...
0
votes
1answer
117 views

Help using NIntegrate

I need some help with NIntegrate. I pasted the code that I wrote below; I know that up to "de" is correct. What I would like to do is NIntegrate de w.r.t phi{0,0.1} and curlE{-10,10}. The final ...
0
votes
1answer
66 views

NIntegrate returns zero for non zero integrand, 4d Integration

I am trying to calculate the following integral. ...
0
votes
0answers
29 views

Getting NIntegrate::inumr: from NIntegrate [closed]

I tried to numerically calculate the following integral: ...
1
vote
3answers
82 views

NIntegrate Trapezoid rule with even subdivision producing poor results

NIntegrate[x^2, {x, 5, 9}, Method -> {"TrapezoidalRule", "Points" -> 2, "RombergQuadrature" -> False}, MaxRecursion -> 1] returns the ...
0
votes
0answers
17 views

NDSolve break condition

I'm solving a differential equation numerically by NDSolve[{p'[r] == -function[r,p[r]], p[0] == pcenter}, p,{r, 0, rmax}] with function>0. At some r, p[r] ...
1
vote
1answer
82 views

NIntegrate failed to converge?

Hey guys I have a pretty simple code that consists of an RMS calculation. The issue is that I am getting quite a few error messages when I run it. The following equations are highly published physics ...
12
votes
1answer
1k views

Numerically solving an inhomogeneous partial differential equation

I'm trying to solve a cylindrical partial differential equation with boundary conditions. But I got an error message saying ...
16
votes
3answers
1k views

What is NDSolve`FEM`*?

I stumbled on this: ?"NDSolve`FEM`*" ...
0
votes
1answer
52 views

Compute integral symbolically

I want to compute the following integral: ...
7
votes
0answers
2k views

Integro-differential equation

I have to numerically solve a nonlinear partial integro-differential equation using Mathematica. This is my equation, $$\frac{\partial y(x,t)}{\partial t}=\int_{-\infty}^\infty K_0(|x-u|) ...
0
votes
1answer
128 views

Numerical solution of the hyperbolic equation

I am trying to solve the following hyperbolic equation with given boundary conditions: I choose as initial condition $u=1$, and evolve the above hyperbolic equation until reaching a stationary ...
0
votes
0answers
22 views

Pass model parameters to NDSolve'Reinitialize

I am wondering if there is a way to pass parameter values during the NDSolve'Reinitialize step of the NDSolve process? I've read that one way to possibly speed up repeated calls to NDSolve is to ...
0
votes
0answers
37 views

Resolving initial / boundary condition conflicts ?

This is likely very simple, but I often run into trouble with inconsistent boundary conditions for PDEs; While I know Mathematica sometimes produces "false" errors for spatial derivative conditions, ...
0
votes
2answers
129 views

Problems with NIntegrate

I'm having trouble to do the following numerical integrations: ...
0
votes
3answers
104 views

How to display the value of a very small number instead of “0.” [duplicate]

I need to perform an integration. There is one particular value, which may be very small that is showing up as 0.. Is there any command in Mathematica 9 that will ...
0
votes
0answers
76 views

To solve an equation

I am trying to solve the equation: Solve[Re[Integrate[(2 c - (r^2) Exp[- I 1.4746])^(0.5), {r, 0, 31.7576}]] == 2.1216, c] I want to integrate an expression in ...
1
vote
0answers
80 views

How to specify the time variable for NDSolve

I recall that it is possible to specify which independent variable is the "time" variable in NDSolve, but I can't find it documented anywhere. Does anyone recall ...
1
vote
2answers
84 views

Problem evaluating a complicated integral

Apologies for stating my problem poorly in the first instance, thank you for the help in narrowing down the issue. Problem For those interested, it's for the exact unbiased inverse of the ...
1
vote
0answers
23 views

Nested NIntegrate of vector function

I am performing a nested integration where the upper limit of the inner integral depends on the value of the outer integral, like in the question [Nested NIntegrate]. As in this question my function ...
1
vote
0answers
70 views

Speeding up the numerical integration of a certain function

I'm using the following function f[t_] := 3/4 t^-3 NIntegrate[(x^4*Csch[x/2]^2), {x, 0, t}, Method -> {Automatic, "SymbolicProcessing" -> 0}]; I ...
0
votes
1answer
54 views

How to get correct numerical integration which should be zero? [duplicate]

I want to numerically integrate function berrycur over kx and ky. The definition of berrycur is given at the end of the ...
0
votes
1answer
53 views

wolfram mathematica intersection of two surfaces [duplicate]

I use wolfram mathematica. There is a function of two variables which defines the surface z = f(x,y), the second surface is defined as z = const. How to find the line of intersection of these two ...
0
votes
0answers
27 views

NIntegrate Issue: Changing integration limits makes calculation time extremely long

After a long time developing some code in mathematica and finally getting it to work, I have unfortunately encountered an odd problem: When I change the limits of integration (and shift the function ...
-1
votes
2answers
63 views

Strange numerical integration result

I write a function called berrycur[kx,ky] which I will give at the end of the question, and want to numerically integrate this function over {kx, -2π, 2π]}, {ky, 0, ...
0
votes
0answers
36 views

Comparing NIntegrate with definite integration

I want to calculate without error a sum of double integrals with the following definitions for the functions within them: ...
0
votes
1answer
52 views

Numerical integration with purely numerical integrand

I'm trying to perform a numerical integral with an integrand that should not be manipulated with any symbolic preprocessing whatsoever. Consider the following simple test : ...
0
votes
0answers
59 views

NIntegrate: integrand has evaluated to non numerical values

I have pasted a code that has been giving me some trouble and errors when I try to compute. ERROR: "The integrand 1435.1232 E^(-6.4703566*10^6 s^2) deEntrance[s,phi]^2 has evaluated to ...
3
votes
2answers
167 views

Integration and Fourier transform

I would like to calculate the distribution function from the characteristic function. There is a formula given as $$F_X(x)=\frac{1}{2}+\frac{1}{2\pi}\int_{0}^\infty \frac{e^{i w x}\phi(-w)-e^{-i w ...
1
vote
0answers
65 views

NIntegrate (multi-dimensional integral)

I am interested in the numerical evaluation of the following integral: $\int \prod_{i=1}^n dx_i \delta(\sum_{i=1}^n x_i) \prod_{i=1}^n f_i(x_i)$ where $f(x)$ is a complicated function. Unfortunately ...
4
votes
2answers
152 views

Calculating the area under a curve, but above a certain threshold value

so here I am with a time series of data (hours (t) and corresponding measurements (a)). ...
0
votes
1answer
86 views

NIntegrate: Catastrophic loss of precision

Below is a simplified code that I am trying to evaluate. I am basically getting the rms value of a Wakefield function. When I finally try to evaluate the rms, I get an error. Any help would be greatly ...
5
votes
3answers
273 views

RK4 Gravity Simulator

I have the following RK4 solver which splits the two 2nd order ODEs, used to calculate x and y positions under the influence of a gravitating body where $$x''(t)=\frac{G m ...
0
votes
1answer
55 views

Integrating function can't be epressed? [closed]

Hi I have a function in a form of $$\frac{a}{x}exp(\frac{b}{\sqrt{3}-x})$$ The code is Integrate[a/x*E^(b/(3^0.5 - x)), {x, 1, 3^0.5}] But it can't work ...
1
vote
1answer
195 views

Which integration strategy to use for this product of polynomials?

What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...
0
votes
0answers
43 views

Code for solving numerically an integro-differential equation

First of all, I want to greet the community. This is my first question, but I hope I will be able to help answering others members questions, although I am quite new working with Mathematica. I would ...