Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
1answer
209 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 ...
1
vote
2answers
157 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 ...
6
votes
1answer
270 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
265 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 ...
4
votes
0answers
129 views

Artifacts in Line Plot from InterpolatingFunction

I have a periodic solution from an NDSolve that is producing an InterpolatingFunction. With the default plot settings, there is not enough PlotPoints/MaxRecursion to resolve the peaks in the function: ...
2
votes
0answers
193 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: ...
3
votes
1answer
199 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. ...
6
votes
2answers
606 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 ...
3
votes
1answer
483 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
0answers
118 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 ...
7
votes
1answer
308 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 ...
4
votes
1answer
380 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
179 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 ...
9
votes
1answer
639 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
149 views

NIntegrate inside NSum

Consider the following function with a numerical integration: ...
1
vote
0answers
111 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 ...
7
votes
1answer
142 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
297 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
226 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 ...
3
votes
3answers
246 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
163 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
259 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
182 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
204 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 ...
3
votes
2answers
109 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
364 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
155 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 ...
1
vote
0answers
131 views

Issue concerning stopping NDSolve through EventLocator

Greetings. As the question-title is written I am having some trouble with getting a numerical integration stopped at a certain event. This integration is done through the use of NDSolve and I have ...
6
votes
3answers
361 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
132 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
438 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
116 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 ${}$ ...
5
votes
3answers
770 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
301 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.
1
vote
0answers
197 views

About doing an integral

For a given integer $N$ and some function $f(x,y)$ I want to be able to do an integration of the kind, $\int_{0} ^{\infty} \prod_ {i=1}^N da_i e^{[\sum_{n=1}^{\infty} \frac{1}{n} \left[ N + ...
8
votes
1answer
342 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
228 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 ...
1
vote
0answers
195 views

singularity in NDSolve and Table command

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

Second Order Non Linear Differential Equation

I'm trying to solve the following differential equation numerically: ...
3
votes
1answer
142 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
253 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 Method option). Such a possibility is crucial for me, since ...
3
votes
1answer
409 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
308 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
125 views

EventLocator with LSODA?

Is the EventLocator option not compatible with LSODA on NDSolve. Below is what I tried to do ...
1
vote
1answer
126 views
4
votes
3answers
133 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 ...
3
votes
4answers
269 views
11
votes
2answers
621 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
491 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
171 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: ...