Tagged Questions

Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
1answer
254 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
123 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
349 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
298 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 ...
18
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
615 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
523 views
2
votes
1answer
257 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
521 views
8
votes
1answer
686 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
478 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
326 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
518 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
801 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
289 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
266 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
478 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
286 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
329 views

Nested NIntegrate problem

So I've been trying to evaluate the following integral in Mathematica 8.0 Student version: ...
4
votes
1answer
239 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
567 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
220 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
522 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
468 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
514 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
709 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. ...
9
votes
2answers
1k views

Convolution with interpolated function

I have some problems to calculate in reasonable speed the convolution of an interpolated function with a Gauss function. I have here (ExampleData.txt, alternate Pastebin link) data which I ...
6
votes
2answers
1k views

NDSolve with vectors

I'm stumped. I'm trying to write this using vectors, but the 2nd derivative isn't being expanded like I expected it to be. This is a system of equations for a projectile with quadratic drag and ...
1
vote
1answer
267 views

Table not working with Plot

Because NIntegrate[] does not support parallel computation out of the box, I'm doing a simplified version by breaking the integration limit into pieces and using ...
8
votes
1answer
847 views

Efficient evaluation of functions defined by NIntegrate

I have a complicated function $f$ and I want to plot the function $F(x)$ defined by the definite integral of $f$ from $0$ to $x$: $$ F(x) = \int_0^x f(y)\mathrm dy. $$ Apparently $f$ cannot be ...
5
votes
1answer
879 views

Solve system of ordinary differential equations that doesn't have an initial condition (t=0), but has an inifinity condition (t=infinity)?

I have a question for solving t -> Infinity on Mathematica. First, I have a system of ODEs: ...
2
votes
1answer
237 views

How to solve a system of ordinary differential equations contain a interpolating function?

I'm wondering how I can solve a system of ODE that has a interpolating function? For example, z and y are ...
12
votes
1answer
2k views

Numerically solving an inhomogeneous partial differential equation

I'm trying to solve a cylindrical partial differential equation with boundary conditions. But I got an error message saying ...
3
votes
1answer
299 views

NIntegrate inside NSum

Consider the following function with a numerical integration: ...
1
vote
0answers
298 views

NDSolve Convergence test failure and significant effect of DifferenceOrder on eventual results

I am solving a non linear partial differential equation with what I call free boundary conditions (solid mechanicists would know this as simply supported). I realized that this boundary condition ...
9
votes
1answer
217 views

The only usage for the option InterpolationOrder in NDSolve is to be set to All?

We know that changing the option InterpolationOrder in ListLinePlotListPlot3D、...
2
votes
2answers
649 views

Problem with NDsolve for a system of equations

I want to solve a system of differential equations which is not very complicated, but I cannot handle the problem with mathematica!! Please have a look at the problem and result and help me with your ...
3
votes
0answers
375 views

Numerically solving PDE with high precision

I want to numerically solve the PDE $\partial_t u(t,x)=c\partial_x u(t,x)+(mx-l)u(t,x)$ with some initial and boundary conditions and given parameters $c$, $m$ and $l$. Consider the code ...
4
votes
3answers
548 views

Numerical solution of a differential equation with NIntegrate coefficients

I am trying to solve a linear ODE with a variable coefficient which is given in terms of an integral I can only do numerically. That is, I have an equation of the form $$ ...
2
votes
0answers
222 views

Numerical-Symbolical Integration (Calculus)

I created a simple numeric-symbolic integration. Here you can use symbolical and numerical techniques at the same time. You can also interpolate numerical integrals. The problem with my function is ...
3
votes
1answer
387 views

Solving the Sine Gordon PDE in mathematica

how can i solve this equation in mathematica? this is sine-gordon eq. but the boundary condition can not recognized by mathematica . thank you for you attention. ...
3
votes
1answer
198 views

Construct DifferentialMatrices and Kernel for LevinRule for this integral and ODE set

I've made a lot of progress on my problem the last few days thanks to all the help I've received on here. I think I'm upto the final step of greatly improving the performance of NIntegrate[..] on my ...
2
votes
2answers
730 views

Area or NIntegrate curves defined by points?

Is there a convenient method to compute the AUC (Area Under the Curve) metric that quantifies a Receiver Operating Characteristic (ROC) like shown here? The data used to build the ROC are just ...
4
votes
2answers
166 views

LevinRule and SphericalBessels

I'm currently looking at a simplified problem that approximates another problem I'm looking into. In this simplified problem I at least have an analytic integrand and can easily provide all info on ...
3
votes
0answers
948 views

Solving a system of nonlinear equations self-consistently

I am trying to solve a set of three non-linear equations in Mathematica. I need help with them. The Mathematica code (in plain text format) is attached below. If you copy & paste the code below ...
6
votes
3answers
1k views

Strategies to solve an oscillatory integrand only known numerically

I have an integrand that looks like this: the details of computation are complicated but I only know the integrand numerically (I use NDSolve to solve second ...
0
votes
1answer
391 views

How to build a grid of integrand points and numerically integrate?

If I have some function I know numerically only, say f(x) and each point $x$ takes significant time to compute so I have them all stored in some file as f(1)=0.232423, f(1.1)=0.3243432,....Then is it ...
0
votes
1answer
2k views

Stategies to avoid NIntegrate::slwcon error

I am trying to numerically evaluate an integral whose integrand depends on two parameters, say $(a,b)$ and when $b\gg 1$ I suspect (although it's not guaranteed) that the integrand is very small. Thus ...