Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
1answer
74 views

gaussian integration

I'm new on Mathematica and I am an engeneer with only a little base of numerical computation. I have to integrate a trigonometrical function numerically with a Gauss integration. The function is: ...
2
votes
1answer
60 views

Why isn't Table iterator value inserted in failed NIntegrate arguments?

Consider this simplest example: Table[{z, NIntegrate[f[x], {x, 0, z}]}, {z, {1}}] Here f is not defined, so ...
2
votes
1answer
122 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 ...
2
votes
1answer
95 views

StateResponse is non-deterministic

I observed non-deterministic behaviour in StateResponse. Let's look at an example. ...
2
votes
1answer
104 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 ...
2
votes
1answer
351 views

How to use NIntegrate in a purely numerical mode?

I have a function that is defined as the smallest root of a given polynomial. Something like this: ...
2
votes
1answer
185 views

Plotting Laplace's equation on an infinite domain

I am trying to plot my solution to a Laplace equation on an infinite domain. However, when I try to plot it, Mathematica just runs with nothing happening. ...
2
votes
1answer
432 views

Avoiding zero (empty set) solution with NDSolve

I'm trying to use NDSolve for a chemical kinetics equation where the rate of conversion is given by this relationship as typed in Mathematica: ...
2
votes
1answer
346 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 ...
2
votes
1answer
360 views

How to integrate ParametricNDSolve solution with respect to a parameter?

I have just upgraded to the new version of Mathematica because of its new built-in ParametricNDSolve function. I need to solve a first-order non-linear ordinary ...
2
votes
1answer
318 views

Using NDSolve solution as initial condition for another NDSolve

I have solved a PDE numerically using NDSolve, and I now need to be able to use that solution as an initial condition for another ...
2
votes
1answer
246 views

how to nest parallelized computations on a cluster?

I am lucky to have access to a computational cluster and I could submit my job to many-many cores. As I need to evaluate a numerical integral within a numerical integral, I would like to know if I can ...
2
votes
0answers
69 views

How can I get constant of integration? [closed]

When using Integrate, Mathematica sets a constant of integration automatically. But sometimes we are given that constant already and it should be used in order to ...
2
votes
0answers
90 views

Different solutions for seemingly same Integral

I want to evaluate the following integral: $$\int_{\left(1-\sqrt{a}\right)^{2}}^{\left(1+\sqrt{a}\right)^{2}} \frac{1}{2\pi ...
2
votes
0answers
48 views

Better to have infinities in limits or integrands (`NIntegrate`)? [closed]

I'm using ListPlot to plot the integral of a function with respect of the function's second variable: ...
2
votes
0answers
54 views

The idea behind Stiffness switching method with NDsolve [closed]

Does the Stiffness switching method with NDsolve switch just between multiple variants of 4th order Runge Kutta method or it uses also other methods?
2
votes
0answers
60 views

Want NIntegrate to catch error message

Really stuck with this. When I use NIntegrate, it sometimes prints a message like NIntegrate::ncvb: "NIntegrate failed to converge to prescribed accuracy ...
2
votes
0answers
122 views

Problem solving a nonlinear partial differential diffusion equation [closed]

EDIT: actualy the nonlinear partial differential equations for interacting density distributions, including boundary conditions, should be given as $$ \frac{\partial\phi}{\partial t} = D ...
2
votes
0answers
53 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 ...
2
votes
1answer
178 views

How can I invoke the solution of NDSolve to determine a parameter in my equation just inside NDSlove?

I am trying to solve a differential equation by NDSlove for $h(x,t)$. It reads $$h_t=h_{xx}-V_h-\lambda(t)$$ where $V_h$ is a given function of $h(x,t)$ denoted by ...
2
votes
0answers
100 views

Position from 3 dimensional acceleration data? [closed]

Per a previous post on Mathematica StackExchange here I'm trying to utilize 3-axis accelerometer data to determine approximate 3D position. I wanted to start with a simple case. To this end I've ...
2
votes
0answers
159 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))$$ ...
2
votes
0answers
53 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?
2
votes
0answers
114 views

Puzzling NDSolve[] behavior for PDE (smooth solution, inconsistent with boundary conditions)

Consider the following: NDSolve[{D[z[x, y], x, x] + D[z[x, y], y, y] == 0, z[x, 0] == Sin[x], z[0, y] == Cos[y]}, z[x, y], x, y] {{z[x, y] -> ...
2
votes
0answers
259 views

Solve integral equation for upper bound

I need to find the upper bound of an integral knowing the value of the lower bound and the result of the integral. Here is my function: ...
2
votes
0answers
77 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 ...
2
votes
0answers
124 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 ...
2
votes
0answers
174 views

Global vs local adaptive integration: lattice propagator

I was doing the first exercise in the paper Lattice QCD for Novices. This is the expected result: With the default "GlobalAdaptive" method for NIntegrate it threw errors saying that the error had ...
2
votes
0answers
176 views

Slow integration of interpolating function

I have a large file with irregularly spaced data in the format: ...
2
votes
0answers
115 views

Constrain integration to be over real domain

I am trying to integrate the following: Integrate[(2*Cos[Sqrt[F]*z - G])/E^(D*(p + z)^2), {z, -(h/2), h/2}] I am getting solution in complex domain: ...
2
votes
0answers
119 views

Whether NIntegrate evaluation is multithreaded or not?

About MultiThread evaluation I am talking about here, see this post I am NIntegrate the function grarm[e, 3, dimension, 1, 1, 0.005]. There is matrix operation in ...
2
votes
1answer
497 views

Crank-Nicolson with NDSolve?

As far as I understand, the Crank-Nicolson method (a.k.a. trapezoidal method) can be expressed as a second order implicit Runge-Kutta method. It's Butcher tableau is: ...
2
votes
0answers
67 views

Are FEM methods integrated in NDSolve yet? [duplicate]

About a year ago there was a discussion on these forums as to whether FEM methods have already been integrated into NDSolve in Mathematica. The answer back then was ...
2
votes
0answers
47 views

NIntegrate/NSum with parameters [duplicate]

I'm trying to calculate a continuous integral within a discrete integral. Something similar to this (yet more complex): ...
2
votes
0answers
284 views

Is mathematica storing information it shouldn't store?

I'm seeking to find solutions to a numerical integration with a large set of parameter combinations (basically, I'm doing a brute parameter sampling). Yet, I believe the memory of the computer is ...
2
votes
0answers
339 views

Adapting NDSolve to circumvent NDSolve::bdord: error for 1-D Euler Equations

I attempted to use NDSolve for the 1-D isentropic unsteady flow equations with low subsonic inflow velocity and prescribed inflow total enthalpy; along with a ...
2
votes
1answer
349 views

Directional derivative of SiegelTheta

I'm working on a problem where I have to integrate both the Mathematica function SiegelTheta and some of its second order directional derivatives. Using the function works well but something goes ...
2
votes
0answers
324 views

FindRoot - Speed and errors

I am using FindRoot[] to solve a complicated equation. It seems I get the correct answer even though I get errors about an ...
2
votes
0answers
736 views

Inconsistent boundary and initial conditions: BC ignored altogether

Consider the following diffusion-decay equation with von Neumann b/c in the origin and Dirichlet at the other boundary: ...
2
votes
0answers
191 views

EventLocator with LSODA?

Is the EventLocator option not compatible with LSODA on NDSolve. Below is what I tried to do ...
2
votes
0answers
219 views

Integrating over a region without singularity gives an error indicating the function has singularity in that region

I have the following 2D region over which I want to integrate a function: ...
1
vote
2answers
669 views

Computing 10-dimensional volume of a 9-sphere [closed]

I'm trying to compute 10-dimensional volume of a 9-sphere with radius r using Monte Carlo. ...
1
vote
3answers
239 views

plotting an Integration output

How to solve this integral by Mathematica even by numerical methods (plotting the solution) Integrate[(Cos[x] - a)/(1 + a^2 - 2*a*Cos[x])^1.5, {x, 0, 2*Pi}] It ...
1
vote
3answers
101 views

I know the lower limit of an integration as well as the integral. How to find the upper limit of the integration?

I used the following code. NV[x1_, x2_] := NIntegrate[3 x^2, {x, x1, x2}] FindRoot[NV[0, t] == 3, {t, .001}, PrecisionGoal -> 20] Output: ...
1
vote
2answers
249 views

Real integral evaluates to imaginary number

The following integral:Integrate[Exp[-2/3 Log[1 + x^3]], {x, 0, 1}] is evaluating to an imaginary number. Its closed-form expression should be ...
1
vote
2answers
95 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
106 views

How to prevent tiny complex errors in Integrate?

Integrate is adding a tiny imaginary error to an easy result. Why? And how can I stop it? ...
1
vote
2answers
100 views

Evaluation of a large integral

I have a complicated large integral I want to evaluate (does not have a closed form, need an approximation), but Mathematica seems to keep "Running...". Is there any way to make Mathematica use more ...
1
vote
2answers
339 views

intersection between function and plane

I try to solve a ODE system of equations and i want to plot the intersection of the 3D solutions with a costant plane. To do this i use the follow code: ...
1
vote
2answers
81 views

Plotting NIntegrate

Plot[E^(-0.5 x) NIntegrate[Cos[t] E^(Cos[t] + 0.5 t), {t, 0, x}], {x, 0, 40}] Mathematica evaluates this integral for each point, which takes a long time. It is ...