Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
324 views

What is the correct way to use NIntegrate inside the FindMinimum function?

I'm having minor issues with the FindMinimum function when using NIntegrate inside. The functions work perfectly well but I get ...
1
vote
1answer
223 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 ...
1
vote
1answer
229 views

What do these error messages mean when numerically solving differential equations?

I am using Mathematica to numercially solve the following equations: ...
3
votes
1answer
1k views

NDSolve does not respond

For some sets of constants, NDSolve gives me true solutions, but when I try for example, T = 1/(2*2200), Mathematica does not respond. What can I do? The code below ...
2
votes
1answer
80 views

Numerical integration with OwnValues

Say I have a symbol with an OwnValue a = y And we define an integration like this ...
11
votes
3answers
3k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t) $$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so ...
5
votes
2answers
185 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 ...
1
vote
1answer
203 views

Syntax for integrating over limits specified by a Table

I wish to use NIntegrate to compute multidimensional integrals. However, I don't want to manually input the limits for the dimensions. I want to store the ...
0
votes
1answer
356 views

Integrate on a logarithmic grid

I am trying to solve numerically an integral equation, and from a couple of tests I can see that the result has a strong logarithmic divergence. For my specific problem it is very important to have ...
6
votes
2answers
267 views

Cannot Get Numerical Results to Match

I try this numerical summation (in two parts) ...
0
votes
1answer
351 views

Applying l'Hôpital's Rule to NDSolve with Piecewise Function

OK, so I've been working on this problem for over a week and it's driving me crazy. I'm trying to solve a system of two differential equations in $x(t)$ and $y(t)$ using a "time-elimination method," ...
0
votes
1answer
83 views

Error with minimization of NProbability

I'm trying to solve the following problem: ...
14
votes
1answer
2k views

How to solve a non-linear integral equation?

I have a non-linear integral equation that I'd like to solve with Mathematica: $$ \int_{0}^{1} \mathrm{d}x \frac{B(x) v}{(B(x) + B(v))^2} = 1$$ ...
-1
votes
1answer
108 views

FindFit and Integration errors

First off, appologies for what may sound like a newbie question, as I am very new to using Mathematica. I am trying to find a way to get Mathematica to give me an expression that would describe the ...
4
votes
1answer
193 views

How to find derivative of a numerical solution, where precision is ambiguous?

I am trying to take the derivative of a numerical solution. I am concerned that the way I'm doing this may be problematic due to numerical error; I think there must be a better way but I'm not very ...
2
votes
1answer
134 views

Differences between ParametricPlot3D and NIntegrate

I have a function $f : \mathbb{R} \rightarrow \mathbb{R}^3$ defined in a rather nasty way in mathematica however it's a smooth function and what not. I am interested in $f'[t]$ and when I run it ...
8
votes
4answers
836 views

Numerical integration of a numeric data available as a nested list

I have some numerical data in the form of a list with the following structure: {...{x,y,z},...} defining a surface z=z(x,y) in a 3D space (x,y,z). The data came from a simulation, and I am ...
5
votes
1answer
294 views

Proper use of arbitrary number of variables

So, I'm working on a project where the number of independent variables is not fixed. Consider a problem of $N$ independent variables, $\boldsymbol{r}$. I want to perform different things with them. ...
0
votes
0answers
85 views

NIntegrate, view integration options [duplicate]

The Mathematica manual says: NIntegrate symbolically analyzes its input to transform oscillatory and other integrands, subdivide piecewise functions, and select ...
0
votes
1answer
838 views

Nested Nintegrate - two variable limits of integral

This is, so to say, the next part of the question: Nested NIntegrate - NIntegrate::inum: - error Now I define three functions: ...
0
votes
1answer
713 views

Nested NIntegrate - NIntegrate::inum: - error

I have the problem quite similar as in: Nested NIntegrate I define two functions: ...
0
votes
1answer
381 views

NIntegrate Error-Estimate Question

When I do some complicated 4-dimensional integral numerically, Mathematica tells me its estimate for the value of the integral, and its estimate for the value of the error in the calculation. The ...
2
votes
1answer
258 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 ...
1
vote
1answer
86 views

Get unique values for integration limits

For an multidimensional integration I want to build up the integration limits with the following code. (the length of vars is also variable) ...
0
votes
1answer
120 views

Differential Equation help

I have a differential equation that looks like this: ...
0
votes
1answer
124 views

How to change variable that has been defined in PDE?

I have a PDE function that contains a variable (named ka). I want to plot the result of my PDE in 1 plot using several different ka values. However, I'm not sure about how to write down this equation. ...
4
votes
1answer
358 views

Differential Equations with Matrices

I'm trying to implement the differential equation of a Cellular Neural Network in Mathematica as seen below: ...
2
votes
1answer
313 views

How can I handle curve singularity in this NIntegrate integration?

Yesterday I asked a question about the non converging integral. Woods told me that it is due to the function which has a singularity along a line which passes through the integration region. (Why ...
19
votes
4answers
1k views

How to integrate functions of linearly interpolated data?

At first, consider integration of pure InterpolatingFunction. Importing some data (works in v.9, for earlier versions one can use this link to download zipped ...
1
vote
0answers
630 views

Speed up Numerical Integration

EDIT: I need to evaluate a very complicated multi-dimensional Integral. The dimension of the Integral depends on a variable j. Let's make my point clear with the ...
1
vote
1answer
534 views
2
votes
1answer
270 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 ...
4
votes
1answer
544 views
8
votes
1answer
708 views

Using a compiled function inside NIntegrate gives “CompiledFunction::cfsa” message

The following function is defined for Real input: FFc = Compile[{{x, _Real}, {EF, _Real}},If[x > EF, 0., If[x == EF, 0.5, 1.]]] FFc is now used in the ...
1
vote
1answer
488 views

Problem with NIntegrate in NonlinearModelFit

We are receiving many error messages when using NIntegrate with NonlinearModelFit. Here is a much-simplified version of the code. It arrives at the correct answer after several messages saying that it ...
1
vote
1answer
333 views

NDSolve for PDE with discontinuous initial/terminal condition

I have an issue with NDSolve for the case of a PDE with discontinuous initial/terminal condition. Consider the PDE solution ...
2
votes
2answers
539 views

Making NIntegrate behave like a listable function

I have a function defined by $$f(t)=\int\limits_0^t g(x) dx$$ $g(x)$ is a complicated function (specifically the Mittag-Leffler function which has recently been implemented in Mathematica 9 as ...
2
votes
2answers
819 views

Problem with setting working precision in NIntegrate

I want to obtain a good numerical approximation (up to 10 decimal place would be ok for me) to an integral: $$ \int^{\infty}_{0} f(r)r^2dr $$ I am using the function $f(r)$, which is related to the ...
6
votes
2answers
316 views

Catching only the first event in NDSolve EventLocator

I have a system of ODEs that I solve. During the integration process, there's an event that I want to catch, but I want to (a) continue the integration after the event and (b) catch only the first ...
2
votes
0answers
268 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 ...
3
votes
1answer
497 views

Singular integral: NIntegrate fails to converge

I need to calculate the following singular integral: NIntegrate[Log[1 + y^2]/Cos[Pi y], {y, 0, 1}] However, it is failing to converge. I have tried to specify ...
5
votes
1answer
287 views

NDSolve and WhenEvent Causing Excess Work

When I use the following system model = {x'[t] == x[t] (1 - x[t]) - x[t] y[t], y'[t] == x[t] y[t] - y[t], x[0] == 0.5, y[0] == 0.5} with the ...
0
votes
1answer
342 views

Nested NIntegrate problem

So I've been trying to evaluate the following integral in Mathematica 8.0 Student version: ...
4
votes
1answer
243 views

Integral of integral — it takes too much time

When I evaluate the following expression in Mathematica, it takes so much time that I don't want to wait for the evaluation to complete. So I think that there must be a better approach. ...
2
votes
1answer
584 views

Differential equations with jump conditions

Suppose I want to solve an ODE with a DiracDelta source term. In the following example, DSolve does it correctly while ...
0
votes
2answers
225 views

System of ODEs specified by large coefficient matrices

What is the best way to call NDSolve for solving a system of differential equations of the form ...
7
votes
1answer
540 views

Speeding up numerical Fourier Transform

I wrote this function NFourierTransform, which takes a function $f(k)$ and numerically calculates the fourier transform integral for discrete values of $k \in ...
0
votes
2answers
480 views

Why Can't Mathematica Integrate this?

I have the following problem from a textbook I am trying to integrate: So, following the directions in text, I am required to integrate each function. However, I cannot get Mathematica to integrate ...
2
votes
0answers
543 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: ...
8
votes
1answer
741 views

NIntegrate error bound

I am trying to evaluate a highly oscillatory integral using NIntegrate. I fear that due to limited resources (time and/or memory), I will not be able to evaluate the integral to the desired precision. ...