Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

3
votes
2answers
364 views

How to set the initial condition? (to make IC and BC consistent)

I want to find the initial condition which fits mixed boundary condition of Phi[r, Theta, t]. The original initial condition in text is Phi[r, Theta, 0] == 1 . ...
3
votes
1answer
87 views

Integrating a functional of an InterpolatingFunction

It is straightforward to Integrate an InterpolatingFunction. However, even for a simple functional of an ...
3
votes
1answer
147 views

Surface area of intersecting spheres

Given a sphere of radius 1 centered at the origin and $n$ spheres with radii $r_i$ centered at predefined coordinates, $c_i$, in space, I am after the surface area of the unit sphere that is not ...
3
votes
1answer
194 views

Question on accuracy and precision of NIntegrate

As a Mathematica newbie, I was testing the accuracy/precision of NIntegrate (9.0.1.0 on Mac) and have obtained a very peculiar result. ...
3
votes
1answer
126 views

NDSolve: Reinitialize fails with If condition

I have found a weird problem using If conditions containing an state inequality of the form state<=. First consider the simple ODE with an If condition ...
3
votes
1answer
314 views

Multi-dimensional integral in the complex plane with poles and essential singularity

I've passed the last week searching a way to numerically integrate this multi-dimensional integral in the complex plane at the poles and avoiding the singularity at z=0: $$ \oint_{C}\oint_{C\ auound\ ...
3
votes
1answer
909 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 ...
3
votes
1answer
281 views

NIntegrate inside NSum

Consider the following function with a numerical integration: ...
3
votes
2answers
247 views
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 ...
3
votes
1answer
422 views

Second Order Non Linear Differential Equation

I'm trying to solve the following differential equation numerically: ...
3
votes
1answer
383 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 ...
3
votes
0answers
29 views

What are good/best practices to take the Fourier transform of an InterpolatingFunction?

I have a function which I have obtained from numerical integration of a differential equation, and I would like to take its Fourier transform. What are good practices for doing this? To make things ...
3
votes
0answers
161 views

Function with a sharp resonance which Mathematica fails to integrate. Why?

I'm a new user of Mathematica and I'm trying to use it to calculate the collisional cross-section as a function of energy for a given potential and decay rate. I know that the resulting function ...
3
votes
0answers
88 views

Non-linear integral equation

I'm trying to solve with Mathematica an integral equation. I found this excellent answer (How to solve a non-linear integral equation?) solving with a collocation method a problem which can be ...
3
votes
0answers
503 views

Using NDSolve for Integro-Differential Equations

I have a fairly complicated set of coupled non-linear integro-differential equations that I am trying to solve using NDSolve. The equations are: ...
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 ...
3
votes
0answers
866 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 ...
2
votes
4answers
277 views
2
votes
2answers
776 views

optimization problem with NDSolve

I want to minimize the function fcc. When fcc is calculated for a specified point the answer is correct: ...
2
votes
2answers
426 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 ...
2
votes
1answer
1k views

Methods to speed up numerical NDSolve, NIntegrate,

I am not very used to do numerical simulations on Mathematica. Do you have any ideas how to improve i.e. speed up my code? ...
2
votes
2answers
251 views

How to compute this triple integral? [closed]

In Mathematica how can I compute this integral:$$ \iiint_{D}\sqrt{(1-9z^2)(1-4y^2-9z^2)}\,dx\,dy\,dz$$ where D is the domain: $$D: x^2 +4y^2+9z^2\le1$$ Please I need help!!!
2
votes
2answers
283 views

BC for transport equation using NDSolve

First I can solve a transport equation with a source (Is it still called transport equation?) using DSolve. The form of the source serves only as an example. It can ...
2
votes
2answers
636 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 ...
2
votes
1answer
554 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: ...
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 ...
2
votes
2answers
101 views

NIntegrate - WorkingPrecision

I am trying to NIntegrate this expression. It is very close to zero, and so gives all possible types of errors. More precisely, ...
2
votes
1answer
136 views

Area between Contours in ContourPlot

I feel slightly foolish for asking this because I am so close, but I'm having trouble, so I will anyway. I asked this question two days ago regarding finding the lengths of contours. Now, I'd like to ...
2
votes
2answers
189 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
2
votes
1answer
318 views

NDSolve with vector function

(Possible duplicate yet I still can't understand.) Basic 2D revolving around origin: ...
2
votes
2answers
720 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 ...
2
votes
1answer
507 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 ...
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: ...
2
votes
1answer
113 views

How to do this complex integration on the real line?

$m, r$ are parameters in the following integral: Integrate[z Exp[I z r]/Sqrt[z^2 + m^2], {z, -∞, ∞}] How to do this integration directly? The result should be ...
2
votes
1answer
174 views

Integrate message: can't prove Integration limits are real

I'm working on solving differential equations through Fourier series, I made a function to help me calculate the coefficients that looks like this: ...
2
votes
2answers
537 views

How to integrate a function over a 3D planar polygon?

I am trying to integrate a function over a planar polygon in 3D. In 2D, this is fairly straightforward, using either answer from this question (I use the second answer). If we use an equilateral ...
2
votes
1answer
441 views

Monitoring the Evaluation of NDSolve: time to finish estimation

My problem is quite simple: I run a NDSolve with a system of many ODEs, a calculation that will run for many hours, and I would like to know the progress of the ...
2
votes
1answer
385 views

Infinite Expression Error from NDSolve

I am trying to solve a differential equation numerically. So I have ...
2
votes
2answers
364 views

How to remove a singularity with WhenEvent

Bellow I have a differential equation which hits a singularity at low values of t. What I want to do is somehow utilize the WhenEvent command in order to replace ...
2
votes
1answer
78 views

Numerical integration with OwnValues

Say I have a symbol with an OwnValue a = y And we define an integration like this ...
2
votes
2answers
446 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
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 ...
2
votes
1answer
493 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 ...
2
votes
1answer
478 views

Obtain a stable solution using NDSolve

I am trying to solve a partial differential equation using NDSolve. When I am not specifying any method options with NDSolve, it ...
2
votes
2answers
271 views

Strange Behavior of NDSolve

I am trying to evaluate the following ODE numerically: ...
2
votes
1answer
131 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 ...
2
votes
1answer
272 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 ...
2
votes
1answer
702 views

Calculating volume [closed]

I'm new in mathematica and I'm stucked on how I can get the volume of a solid created by the inequation: ...
2
votes
2answers
558 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 ...