Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
0answers
66 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: ...
0
votes
1answer
55 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 ...
5
votes
1answer
111 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 ...
3
votes
1answer
103 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) ...
4
votes
2answers
106 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 ...
1
vote
2answers
75 views
6
votes
2answers
137 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 ...
-3
votes
0answers
74 views

Using a For-loop to do numerical integration [closed]

I was wondering if anyone can help to find the numerical integrating for the following function with respect to xd along the line x [-2,2] with incriment 1/100. $Failed
2
votes
1answer
66 views

Forcing Exact Outputs for Integrate [closed]

I'm trying to compute the following triple integral: ...
0
votes
0answers
29 views

Roots of two Functions containing integrals, with two parameters [duplicate]

I want to find the values of l1 and l2 from the following two equations: ...
0
votes
1answer
106 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
1answer
47 views
0
votes
0answers
39 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
26 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
44 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 ...
5
votes
1answer
94 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
1answer
79 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
99 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
66 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
1answer
48 views

Adapt the code to produce a three column table containing the values of n, etc. (Numerical integration)

Here is a “procedural” program that we wrote in my class, implementing the rectangle rule of numerical integration: ...
0
votes
0answers
43 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
86 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 ...
0
votes
0answers
56 views

NIntegrate Polynomial of high degree

I want to integrate a polynomial of degree 100 and higher over a domain that is the intersection of two balls like ...
3
votes
2answers
141 views

Integrate and NIntegrate not the same

Why am I getting two different results here? ...
0
votes
0answers
34 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 ...
-1
votes
1answer
34 views

Not plotting elliptic intgrals

Integrate[1/Sqrt[mu^2 - Cos[t]^2], t] CenAng[t_, mu_] := EllipticF[t, 1/(1 - mu^2)]/Sqrt[mu^2 - 1] ParametricPlot[CenAng[t, mu], {t, 0, Pi/2}, {mu, 1.01, 3}] ...
0
votes
0answers
51 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
48 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
133 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
33 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
82 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 ...
1
vote
2answers
181 views

Perturbation theory with Mathematica: Definite integral of polynomial times exponential times hypergeometric function of imaginary argument

I would like to ask also Mathematica users about my question from the math forum. To expand, I'm adding the code which calculates the full double integral for $n=0$ and $\mu=0$ (the second in the ...
1
vote
2answers
63 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 ...
1
vote
2answers
114 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
2answers
88 views

Multidimensional Numeric Integration

I can't manage to calculate numerically the following multidimensional integral: ...
0
votes
1answer
46 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
1answer
124 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 ...
2
votes
0answers
45 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 ...
1
vote
2answers
86 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 ...
0
votes
0answers
27 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]* ...
1
vote
1answer
81 views

NIntegrate over a list of functions

This question is the result of these other two questions. Question 1 and 2. I thought it would be better to ask a new question rather than deleting previous one. I think When ...
0
votes
1answer
70 views

Numerical integration and plotting

New to Mathematica, and trying to numerically evaluate two integrals: ...
5
votes
1answer
148 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
32 views

A problem about NIntegrate the smaller eigenvalue for a matrix

Define a matrix and a function as ...
1
vote
1answer
103 views

Quantum Physics question [closed]

I'm not sure if anyone here would be able to help me. But if you know a more appropriate place where I could ask for help, please let me know. So here's the question: And here's my attempt at ...
1
vote
2answers
69 views

Initial Step Size for NIntegrate

I am using Mathematica to numerically integrate a numerically-defined function (from an interpolation and data). This function has a sequence of somewhat unevenly spaced sharp peaks which dominate ...
1
vote
1answer
140 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 ...
3
votes
1answer
223 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 ...
6
votes
2answers
163 views

How to force Mathematica to throw an error for NIntegrate

Consider this: NIntegrate[BesselJ[2, x], {x, 0, Infinity}] 0.9999999999904574 This is the correct answer. Now: ...