Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

4
votes
1answer
231 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
505 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
210 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
478 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
446 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
455 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
638 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. ...
8
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
255 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
705 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
785 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: ...
1
vote
1answer
230 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
1k 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
280 views

NIntegrate inside NSum

Consider the following function with a numerical integration: ...
1
vote
0answers
273 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
205 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
554 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
352 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
502 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
216 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
369 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
197 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
634 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
162 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
863 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 ...
0
votes
1answer
285 views

NDSolve event handler Question [closed]

I'm trying to plot a ball falling, hitting the ground and coming back up. without air friction, the equations for the system would be ...
6
votes
3answers
927 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
330 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
1k 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 ...
3
votes
1answer
313 views

Integrating over data points from an external source (wolfram|alpha and weather)

I moved to another city and the weather sucks. Sometimes I feel like getting sad and so I go to wolfram|alpha and check for example ${}$ ...
10
votes
3answers
2k views

NDSolve with Euler method

I want to solve this equation with NDSolve[] using the Euler method: x'[t] == 0.5*x[t]-0.04*(x[t])^2 with initial condition ...
-1
votes
1answer
605 views

Need help with solving non-linear differential equation [closed]

I am new to using Mathematica and have a problem at hand: I need to solve $y''(x)+ a \sin(y(x)) = 0$ and plot the output, I need a "manipulate" thingy for the two initial conditions. Help needed.
8
votes
1answer
593 views

1D Euler Equations

Is it possible to accurately solve the 1D Euler equations in Mathematica using NDSolve? For example, let us consider the problem given here: http://www.csun.edu/~jb715473/examples/euler1d.htm Using ...
5
votes
1answer
451 views

Unexpected results from NDSolve

I am trying to solve a stiff reaction diffusion system with NDSolve. However, it does not produce the expected results. My problem is a spherical cell with 5 ...
0
votes
1answer
349 views

singularity in NDSolve and Table command [closed]

We are considering the following equations ...
3
votes
1answer
422 views

Second Order Non Linear Differential Equation

I'm trying to solve the following differential equation numerically: ...
2
votes
1answer
182 views

tricky memoization

Let's say I have the NDSolve example for documentation involving splitting 2nd order into set of 1st order ODEs: ...
3
votes
1answer
382 views

Efficient way to perform elementary integration step with NDSolve internal method

I'm trying to tweak the NDSolve function to perform one elementary integration step (using some explicitly selected stepping algorithm via ...
2
votes
1answer
646 views

Solving a PDE containing DiracDelta

I want to get the answer from a PDE: $$\begin{align*} \frac{\partial \rho(r,t)}{\partial t}&=Dr^{-2}\frac{\partial}{\partial r}r^2h(r)e^{-U(r)}\frac{\partial}{\partial ...
8
votes
1answer
472 views

Animate the scattering of a Wave Packet

I know mathematica is probably not the best choice for intense numerical integration, but its the only software I know. I would like to create an animation (not real-time, but pre-render the ...
2
votes
0answers
176 views

EventLocator with LSODA?

Is the EventLocator option not compatible with LSODA on NDSolve. Below is what I tried to do ...
1
vote
1answer
144 views
4
votes
3answers
277 views

How could I get the value of y[t] at each specific interpolation point?

sol = NDSolve[{Derivative[2][y][t] + Sin[y[t]] == 0, Derivative[1][y][0] == 0, y[0] == 1}, y, {t, 0, 2}] the above-mentioned differential equations can be solved ...
2
votes
4answers
277 views
13
votes
2answers
2k views

Nested NIntegrate

Suppose that we have the given simple integral expression $$ \int_{-5}^{5} x \int_{-\infty}^{x} e^{\int_{0}^{z} -y dy} dz dx $$ Writing this out in Mathematica we obtain: ...
1
vote
1answer
795 views

Problem while solving system of two second order non linear coupled differential equations using NDSolve function

I am a completely new to Mathematica, and I am sorry if this question is dumb. I have to solve a system of two second order non linear coupled differential equations (that I got from the Lagrangian ...
1
vote
0answers
202 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: ...
2
votes
2answers
424 views

How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?

Here I use a one-dimensional heat conduction equation as the example. I found that when the thermal diffusion coefficient is small enough, Mathematica will give a result against the second law of ...
1
vote
1answer
151 views

How to collect q[t] from the following integration

As shown in the following program, the q[t] in a can be collected from the integration by defining the integration of ...