Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
65 views

NIntegrate producing SetDelayed::write message [closed]

I used NIntegrate to calculate an integral with the final limit as a variable, which later will be listed in a table, ...
0
votes
1answer
77 views

Plotting results of NIntegrate with variable integration limit

I have tried to use NIntegrate with variable limits and compute the following ...
7
votes
1answer
139 views

Difficulty in getting correct Gaussian curve for diffusion of point source

I want to solve diffusion of a point source numerically and check it against analytical solution. first I define initial profile, ...
5
votes
1answer
262 views

Numerical solution of IVP for linear ODE with variable coefficient runs wild soon

Cross posted in scicomp.SE. A friend of mine showed me this initial value problem (IVP) for a linear ordinary differential equation (ODE) with variable coefficient: $$y''(x)=\left(x^2-1\right) ...
0
votes
0answers
89 views

Volume by NIntegrate gives zero

I want to Integrate the following expressions for different p < n and 2 < n with p and n both natural numbers: ...
5
votes
1answer
172 views

How to plot the solution of a Partial Differential Equation?

My attempt. I need to solve numerically the Complex Ginzburg-Laudau Equation (CGLE): $$ \frac{\partial A}{\partial t}=\epsilon A-(1+i\beta)|A|^2A+(1+i\alpha)\nabla^2A $$ I'm using a uniform initial ...
1
vote
1answer
85 views

Plot a numerical integration as a function of a variable

Suppose we have a function that is hard to evaluate analytically but a numerical estimate suffices. For example consider the $f(x,\Lambda) = \Lambda\cdot \sin(x)$ where $\Lambda$ is some parameter I ...
7
votes
2answers
296 views

Integrating a function over a surface integral

From a first principles bandstructure calculation I get an energy scalar field in three dimensions $E(x,y,z)$. It's now easy to plot a constant energy (contour)-surface for dedicated values ...
4
votes
2answers
125 views

Coarse-graining in numerical integrations

I have been working recently in a coarse-graining problem I found when using NIntegrate: I am trying to evaluate the function $$f(a)=\int_0^{\infty}x\,e^{-(a^2+b^2)x^2}\text{d}x$$ numerically as a ...
4
votes
2answers
302 views

Approximate value for the area between the curve

I've got this task: Use Mathematica to obtain an approximate value for the area between the curve $y=1/4$ and the x-axis over the interval $[1,2]$ with $50$ subintervals using the left ...
7
votes
1answer
120 views

Detecting nearly simultaneous WhenEvents in NDSolve

I am trying to solve a system of (many) coupled nonlinear ODEs. I need to decouple some of the equations (i.e. set the time derivatives of some of the dependent variables to zero) at various points in ...
3
votes
2answers
472 views

BC for transport equation using NDSolve

First I can solve a transport equation with a source (Is it still called transport equation?) using DSolve. The form of the source serves only as an example. It can ...
1
vote
2answers
75 views

Confusion in Numerical Integration while using FindRoot

I used this code for numerical integration NIntegrate[(x^2 - .0015 x^4)/D[(x^2 - .0015 x^4), x], {x, 1.414, 13}] when upperlimit of x is 13, the integral value ...
2
votes
1answer
76 views
0
votes
1answer
140 views

Time evolution of a wave packet from the time-independent Schroedinger equation [duplicate]

Starting off with the time-independent Schroedinger equation (TISE) $\quad \quad -\frac{\hbar^2}{2m} \nabla^2 \psi + V(r, \theta) \psi = E\, \psi,$ I would like to study the time evolution of an ...
0
votes
0answers
29 views
16
votes
2answers
3k views

Nested NIntegrate

Suppose that we have the given simple integral expression $$ \int_{-5}^{5} x \int_{-\infty}^{x} e^{\int_{0}^{z} -y dy} dz dx $$ Writing this out in Mathematica we obtain: ...
0
votes
0answers
47 views

Integro differential eq boundary difficulties

I'm trying numericaly solve simple integro-differential equation, but have some problems with boundary conditions. System: ...
0
votes
0answers
46 views

What is the right way to combine a Package, Module, ParallelTable and NIntegrate?

I am stuck with a curious problem. I would like to to have a package from which i can call a function test[path], which then performs a time consuming numerical ...
0
votes
1answer
55 views

How can I perform this integration in Mathematica? [closed]

I am new to Mathematica. I want to find the integration of the following expression: $H(f)=T\left(\frac{sin(\pi f T)}{\pi f T}\right)^2$ Here, $T=1.127e-7$ I want to integrate this function for a ...
3
votes
1answer
106 views

Evaluating a numerical integration with infinity as limit

I am trying to evaluate a numerical integration (to get an expression of the constant Ω) Suppose that h[x_] := 1/(1 + a x^2) ...
-3
votes
1answer
109 views

How can I evaluate this function in Mathematica? [closed]

I am very new to Mathematica. Today I have got my license. Can someone help me to evaluate the following expression in Mathematica. I want find the values of $P$ for different $n$ $S=129$; ...
0
votes
3answers
77 views

How do I integrate this function?

I am very new to mathematica and also new to this community. I have a problem given below, How to express this in Mathematica? $H=[2,4,10,5,12,34,42,\cdots 12]$ is a vector of size $N$. $h_n$ is the ...
0
votes
0answers
49 views

Passing integration constants to self defined function

I would like to evaluate an integral I am taking in cylindrical coordinates, in which the integrand contains a previously defined function. I need to pass the r and phi integrand values to this ...
0
votes
2answers
117 views

Numerical 3D Integration in Mathematica [closed]

My question in short is: Is it possible to make numerical 3D integration in mathematica efficiently? Or am I gonna have to move this to C++? I feel this problem is way too trivial to go to C++, so ...
3
votes
2answers
152 views

Integrate and NIntegrate not the same

Why am I getting two different results here? ...
0
votes
0answers
47 views

Parallel calculation with SetOptions

Is it possible to distribute the effect of SetOptions to parallel kernels? Here is how I encountered the problem: I am trying to calculate a lot of numerical ...
10
votes
1answer
658 views

Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?

Bug introduced in 8.0.4 or earlier and persists through 10.0.2. I am trying to evaluate this integral numerically $$ \int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q $$ for large values of $R$. ...
9
votes
1answer
224 views

Is this a bug in NIntegrate?

Fixed in 10.1 Bug is present as of version 10.0.2 checked on windows 7, 64 bit Is this a bug or I missed something? NIntegrate seems to give a different ...
0
votes
0answers
66 views

Stress calculation for stokes equation in 2D

I am solving the Stokes equation for the creeping flow, in a particular geometry, using the stream function formulation. This is my domain: ...
0
votes
1answer
56 views

Difference between NIntegrate and Integrate results

I want to integrate a function of two variables that is defined via a piecewise function. I can compute the integral analytically as follows: ...
1
vote
1answer
266 views

4th-order Runge-Kutta method to solve a system of coupled ODEs [duplicate]

I am a beginner at Mathematica programming and with the Runge-Kutta method as well. I'm trying to solve a system of coupled ODEs using a 4th-order Runge-Kutta method for my project work. I have ...
1
vote
0answers
43 views

Speeding Up the Numerical Integration of a Product of Numerical Integrands with NIntegrate

I need to solve a set of coupled integral equations within a self-consistent cycle. The final result will be functions, say $A(x)$ and $B(x)$, which are related to each other by some integrals which ...
1
vote
1answer
129 views

How to modify a PDE inside NDSolve according to an if condition

I need to solve this PDE $$\partial_tf(t,x)+\partial_xf(t,x)+k\partial_{xx}f(t,x)-xf(t,x)=0 $$ with $k\in\mathbb{R}$ and final condition $f(T,x)=1$ with $0<t<T$. My problem is how to solve ...
2
votes
1answer
232 views

(NDSolve) Non-linear 2nd order ODE, regular singular point (looking for good methods for this problem)

I am solving this set of non-linear 2nd order ODE by NDSolve, $$r^2\frac{d^2f}{dr^2} = 2f(1-f)(1-2f)+\frac{r^2}{4}h^2(f-1)$$ $$\frac{d}{dr}\left[r^2\frac{dh}{dr} \right]=2h(1-f)^2+\lambda ...
0
votes
2answers
129 views

Multidimensional Numeric Integration

I can't manage to calculate numerically the following multidimensional integral: ...
1
vote
2answers
134 views

Solving for the limits of an integral

I am trying to get Mathematica to solve for the symmetric limits of an integral of a Square Wave. ...
0
votes
1answer
126 views

NdSolve problem :NDSolve::ndode: Input is not an ordinary differential equation

I am new to Mathematica. I am working on solving the following different equations numerically written in the code as below. Not so sure about the boundary values that depends on R (M(0)=0, n(1)=0) ...
2
votes
0answers
54 views

Enforcing WorkingPrecision in NIntegrate

I have a very complicated 2D integral that I need to calculate repeatedly, and I'm trying to speed it up a bit, since at the moment it's taking a couple of days to complete. One thing I've noticed is ...
0
votes
1answer
97 views

NIntegrate vs. summation

I' m interesting in distributions of points on sphere, plane figures etc. Especially for small number of points: 1, 3, 7, ... It seems that good criterion for uniformity of distribution is some ...
1
vote
2answers
96 views

Simple integration with assumption

I would like to evaluate the following simple expression NIntegrate[Re[Exp[I*Omega*t]], {t, 0, 2 Pi}] for Omega real, but ...
1
vote
1answer
104 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 ...
0
votes
0answers
29 views

Solving Couples Integrations with Product

I have a set of four coupled integrated equations given below. I was wondering how to go about solving them; since using NDSolve doesn't help. $d(d)/dv= \sin[i]*\cos[i]* ...
3
votes
1answer
288 views

Numerical integration's speed

Consider this numerical integration of Bessel function: Do[NIntegrate[BesselJ[2, x], {x, 0, 10000}], {i, 1, 100}] // AbsoluteTiming {4.033403, Null} This is ...
1
vote
1answer
179 views

Slow evaluation of NIntegrate when used as a pure function

I asked a perhaps related question here. Here is my code in below. The goal is that to define a function which must be integrated numerically. The function itself first is calculated over different ...
0
votes
1answer
78 views

Numerical integration and plotting

New to Mathematica, and trying to numerically evaluate two integrals: ...
5
votes
1answer
169 views

Slow exponential evaluation over lists

This question,which is still unanswered, might be relevant because it involves NIntegrate over lists and it also has Exp. In ...
0
votes
0answers
39 views