Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
1answer
588 views

Optimizing a function involving NDSolve results in error messages

I want to minimize a function f with NMinimize but an error occurs that says: ...
1
vote
2answers
357 views

Numerical Integration in Laplace domain

I need to calculate two different integrals containing a Bessel function in the Laplace domain. I have tried different kinds of quadrature but didn't have any luck. I don’t know how to help ...
8
votes
1answer
1k views

Is it possible to set a variable as a positive one in the whole notebook?

I'm having issues during integration due to the fact that Mathematica doesn't know if an undefined variable is positive or not (it gives me complexes which bothers me in the end). For example I do ...
0
votes
1answer
110 views

NIntegrate failling on floating value

I'm trying to take the following integral NIntegrate[ ((Sin[Q 1]-Q 1*Cos[Q 1])/(Q 1)^3)^2 * S[Q,0.4,2] * Q BesselJ[0,0.5Q] , {Q,0,Infinity}] ...
2
votes
3answers
2k views

Retrieve values of InterpolatingFunction

While analyzing a large system of ODE's, I defined a particular ratio p, which contains some variables that are represented by ...
4
votes
1answer
901 views

Incorrect solution of diffusion equation with Neumann boundary conditions

I want to set up a PDE model, which takes a two-dimensional diffusion equation into account. The key problem is that I have some trouble in solving the two-dimensional diffusion equation numerically. ...
15
votes
1answer
338 views

Why does LogLinearPlot sample its argument outside the specified domain?

I experience a weird bug in the function LogLinearPlot. If the input is an interpolation function, such as the one created like this, ...
2
votes
1answer
210 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 ...
0
votes
2answers
293 views

NDSolve and results of the previous computations

I want to solve following system of ODEs: $ \Bigg\{ \begin{array}{} \frac{\partial C}{\partial t}=\frac{2W_b}{Rsin(\theta)}(1-\frac{C}{\gamma})+\frac{\nu}{\pi R^2}\frac{\partial C}{\partial Z} ...
0
votes
2answers
761 views

nested numerical integration: not valid limits?

I encountered an error when I was hoping for some Mathematica (8.0.4) magic sparing me to code up numerical integration, function approximation and root-finding myself. The broader context and the ...
4
votes
2answers
729 views

How to Solve this ODE with Mixed Boundary condition

I have an ODE equation which is sort of y''[x] + 2 y'[x]/x + .0001 (y[x])^3 ==0 subject to the boundary conditions ...
6
votes
2answers
2k views

Is it possible to compute trapezoidal rule numerical integration?

Is it possible to compute trapezoidal rule numerical integration? I know that Mathematica has Interpolation, and that a list of points can be interpolated and then ...
6
votes
2answers
410 views

Starting NDSolve from intermediate time step?

I always wondered if I could start NDSolve from an intermediate time step. What I mean is, in the code sample below, if I were to run my solution from tmin=0 to ...
2
votes
1answer
510 views

How to use NDSolve to track a deviation from equilibrium?

i have a task to find a event, to achieve this i think need to integrate until a constant function suddenly breaks the equilibrium and give a sharp peak. I think that EventLocator should work, thus ...
5
votes
2answers
315 views

How to find Matano plane

I have discrete collection of data points (10 to 10^4). I want to describe them by a continuous function and find a x value z, ...
13
votes
3answers
2k views

Solving a Volterra integral equation numerically

I would like to solve for $P(t)$, in Mathematica, a Volterra integral equation of the 2nd kind. It is: $$P(t) = R_0(t) + \int_0^t P(t') R_0(t-t')dt'$$ I know the function $R_0$ and would ...
3
votes
1answer
389 views

Solving an ODE numerically

I really appreciate it if anyone helps me with this: How can I solve this ODE and plot the answer for $x$ on $[0.6,5]$: $$ \begin{align*} -2xy'[x] = y''[x]+ 47.21 (-.0025 x^6 & + ...
6
votes
1answer
278 views

Getting Integrate to perform numerical integration

I am trying to calculate the mutual impedance of two antennas which is just a big integral. I defined my function in terms of my variable, but when I execute it, Mathematica runs for a while and then ...
6
votes
0answers
711 views

Controlling the time step in NDSolve?

I generally use NDSolve for stiff non linear partial differential equations of 4th order. I find that a BDF1 method generally does well to placate my beast of a PDE. I've also tried out ...
1
vote
1answer
186 views

NIntegrate is resetting my variables and not giving me a result?

I am trying to check if mass conservation holds by integrating the area under a curve but to no avail. ...
6
votes
1answer
342 views

What does MaxStepFraction do?

I find that with NDSolve[...] while solving a partial differential equation, changing the MaxStepFraction from ...
8
votes
1answer
342 views

Setting the DifferenceOrder Option

I've been playing around with Method in NDSolve[...] and can't quite seem to figure out how to force ...
5
votes
1answer
1k views

NDSolve, Schrödinger equation, and decaying solution

I am trying to solve a Schrödinger equation for a particle hitting a step potential using NDSolve in Mathematica. Here is my code: ...
6
votes
2answers
679 views

How to set the NDSolve method to LSODA

I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...
22
votes
1answer
608 views

Publishing results obtained in Mathematica

I've been using Mathematica to solve nonlinear partial differential equations for my doctoral research for the last 2 years or so. I am not an expert in Mathematica or mathematics and I am an engineer ...
16
votes
3answers
1k views

What is NDSolve`FEM`*?

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

Boosting the performance of expensive NIntegrate by feeding in a cheap approximation of the integrand

I need to integrate an expensive likelihood L[x] over its n-dimensional domain. I know that L[x] is decently approximated by a ...
12
votes
3answers
658 views

NIntegrating within an Ellipsoid

I need to numerically integrate an expensive positive-definite function over a 2D domain. I know by other ways that the function is basically zero for values outside the following ellipse: ...
0
votes
1answer
466 views

NDSolve does not give me the expected solution

I have an assignment where I need to compute chemical reactions by solving ODEs. I use NDSolve to do this. However, for one problem it does not give me the ...
3
votes
1answer
565 views

NDSolve Problem

I am trying to solve a chemical equilibrium ODE with NDSolve where one function is the argument to another. I.E. My equations look like: ...
15
votes
2answers
871 views

Why does Mathematica give the wrong answer when integrating?

I integrate Integrate[Exp[I Cos[b - c]] Cos[b], {b, 0, 2 Pi}] Mathematica gives: 2 I Pi BesselJ[1, 1] Which is indepedent ...
7
votes
4answers
488 views

Conditional numerical integration boundaries

I have a multidimensional integration of the form: ...
4
votes
2answers
1k views

PDE Boundary Conditions

I am solving a PDE using Mathematica and I would like to know how to implement the condition that the two-variable function y[t,s] is zero whenever ...
8
votes
5answers
358 views

How to distinguish between lists and values?

I have a (hopefully small) problem with some numerical integration algorithm, more specifically I want to integrate the imaginary part of a complex valued function, e.g. ...
4
votes
2answers
586 views

How to solve for an Z-Score of a T-Distribution?

I'm looking for the Z-Score for a distribution, where the integrated area sums up to 0.90. Unfortunately I always get an error from Mathematica, ...
3
votes
2answers
659 views

Compute integral symbolically or numerically

I want to compute the integral of the following integrand ...
4
votes
0answers
281 views

Increase precision of custom function

I hope the title is not misleading: Suppose I have a function that is quite complicated, e.g. f[u_] := Exp[-Exp[- Abs[c.u]^a] Sin[d.u] Sin[(Abs[c.u]^a) ... I ...
11
votes
1answer
2k views

Kramers-Kronig in Mathematica

I am trying to calculate the change of the refractive index from the change of the absorption coefficient using the Kramers-Kronig relations, in Mathematica. ...
15
votes
4answers
3k views

Numerical Fourier transform of a complicated function

Say I have a function $f(x)$ that is given explicitly in its functional form, and I want to find its Fourier transform[1]. If $f$ is too complicated to have an analytic expression for $\hat f(k)$, how ...
14
votes
1answer
2k views

Parallelizing Numerical Integration in Mathematica

I have an ugly, six dimensional function that I need to integrate numerically. It works, but it currently take twelve hours to complete the calculation. Is there any good way to parallelize the ...
7
votes
2answers
482 views

How to apply restrictions to the “integrated” variable, when using NDSolve?

I have to integrate an energy along a path. I know the energy at the "beginning" of the path (energy[0]), and I can determine the energy change (gain and loss) ...
23
votes
4answers
919 views

How to use NDSolve to track equilibrium?

I am looking for an extension of NDSolve where integration runs until certain variables are settled at an equilibrium. Now I have a working solution in my sleeves ...
13
votes
1answer
471 views

How to guarantee that NDSolve correctly detects abrupt changes in parameters?

When using NDSolve, I often have parameters that, in most of their domain, have a constant or null variation, but that suffer from abrupt variations on a very small ...
18
votes
1answer
335 views

Is there an NDSolve`ProcessEquations analog for NIntegrate?

NDSolve has an interface for repeatedly solving an equation with different initial conditions without having to analyze the equation and set up the solving algorithm each time. This can improve ...