Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

1
vote
1answer
224 views

Solving wave PDE

I am trying to solve the wave PDE with NDSolve. Below is the equation: ...
7
votes
2answers
180 views

Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
18
votes
1answer
506 views

Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
-3
votes
1answer
42 views

Method to compute NIntegral of Trigonometric functions

I don't know which method to adopt for computation of the following integrand on the unit sphere in $R^6$: $ 2 r^9 \sin ^5(\text{$\theta $1}) \sin ^3(\text{$\theta $2}) \sin2(\text{$\theta $3}) \sin ...
8
votes
2answers
162 views

How to improve accuracy of NIntegrate over ImplicitRegion

I'm trying to compute the area of a implicit region given as ...
14
votes
2answers
323 views

What can one do with extremely stiff problem in NDSolve?

Consider the following illustrative problem: $$ \frac {\partial f} {\partial t} = \frac {\partial} {\partial x}(x f) + \frac {\partial} {\partial x}(f \frac {\partial f} {\partial x}) $$ This is ...
3
votes
1answer
55 views

Performance of numerical integral over piecewise function

Using mathematica version 10.3, I observe that an integral over a piecewise function evaluates a factor 10 slower than the same integral without the piecewise distinction. Here is the code: ...
1
vote
1answer
44 views

Using NIntegrate on a joint CDF without getting an error

I am trying to calculate the area under a constrained part of a function built from the empirical CDFs of two distributions. When I calculate the area of either CDF using NIntegrate it works fine, ...
0
votes
0answers
37 views

Stable numeric integration of multidimensional step function

I am trying to integrate numerically a two-dimensional function (a SmoothKernelDistribution) with a step. I tried a few different settings for the parameters of <...
0
votes
1answer
93 views

How to omit the corrupt value in a program?

I've such errors: Coordinate .. is not a floating-point number and can't correctly fix it. The problem occures when x==Log[2] The program works correctly ...
2
votes
1answer
127 views

Differential Equation with Numerically Integrated Boundary Conditions

I have a second order differential equation that I'd like to solve numerically, and then integrate its solution twice to get the parametric equations of a curve. The ODE is: $2 \kappa''(s)+\kappa^3(s)...
1
vote
0answers
67 views

How to do numerical line integral? [closed]

I have a 2D numeric (interpolating) function J that represents the current density of a square plate. I'd like to integrate J along one edge to find the total current coming out of that side. I'm ...
1
vote
1answer
52 views

AbsoluteTiming of nested integration gives strange result

I found somewhat strange behaviour of nested integration timings. Consider the following code: ...
1
vote
1answer
65 views

Getting an error with NIntegrate due to insufficient WorkingPrecision or divergent integral

Hello I have the following problem. But when I try to solve it, I get an error saying 'Catastrophic loss of precision in the global error estimate due to \ insufficient WorkingPrecision or divergent ...
2
votes
0answers
59 views
0
votes
1answer
94 views

NDSolve for a system of nonlinear coupled pde

I try to solve a system($n$) of coupled nonlinear 1-d PDE's which is basically coupled sine-Gordon equations (through 2nd spatial derivative) in time and space. I am interested in the dynamics when I ...
0
votes
0answers
31 views

Optimizing NMinimization and NIntegration with a Nested List-Valued Function

I want to use NMinimize and NIntegrate on each element of a nested list-valued function. Here's a simple example of what I'm ...
1
vote
1answer
79 views

Numerical integration plot

I am trying to do a numerical integration plot in Mathematica. Specifically, I want to plot $r$ versus $\tau$ where, $$\frac{dr}{d\tau}=\sqrt{2F(r)}$$ $F$ being a quartic polynomial. The limit of $r$ ...
0
votes
1answer
88 views

difficulty in numerical estimate of double integral

I entered the following simple integral in mathematica: ...
0
votes
1answer
70 views

Why does Mathematica 10.3.1 fail me on : Integrate[(x^3) [Log[2 Sin[x]]]^8, {x, 0, Pi}] [closed]

All it gives me is a pretty restatement of my original request. When I use WolframAlpha PRO, I get a result of 624510 and a visual representation of the area in question. I know the ends of the ...
10
votes
0answers
161 views

Strange behaviour of integrals with Cos, Sin, and Exp

During the study of the problem How to solve this integration? I have discovered a strange behaviour of some integrals. I would consider it a bug. ...
4
votes
3answers
195 views

How to solve this integration? [closed]

I need to find the integration of the following expression $$H(k)=\frac{\tau_0}{\pi}\int_0^{\infty}\exp\left(-u^{\delta}\cos\left(\frac{\delta\pi}{2}\right)\right)\cos\left(u^{\delta}\sin\left(\frac{\...
1
vote
1answer
85 views

numerical integration over divergence

Consider the following function g1: ...
2
votes
1answer
173 views

The numerical solution of a nonlinear ODE: boundary value problem

I want to solve the following nonlinear ordinary differential equation with boundary values $f(0)=1$ and $f(1)=1$: $${\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}f \left( x \right) ={\dfrac { \left( 51-51\,x ...
3
votes
3answers
64 views

Replace variable with value prior to evaluating NIntegrate

The title says it all. Reading posts such as this however, I'm not seeing how to do this. This is the simplest example that can show my problem. ...
2
votes
1answer
52 views

Numerical Integration with absolute value [duplicate]

I want to find the area enclosed by the fourth heart curve (http://www.wolframalpha.com/input/?i=fourth+heart+curve). Since both $y(t)$ and $x(t)$ are given and I know that $t$ is in the range $[0,2\...
0
votes
0answers
64 views

Another question about inverse Laplace transform

Given $r = 0.06;\quad \theta = 105;\quad \kappa = 1;\quad x_0 = 100;\quad K = 100;\quad \sigma = 0.10;\quad T = 0.25;$ Define $ \nu = -\kappa/\sigma^2 - 0.5;\quad p = \kappa*\theta/\sigma;\quad q = -\...
0
votes
0answers
25 views

Nested Numerical Integration [duplicate]

So I am trying to evalute the following Integral Numerically: $$\int_{\mathcal{J}^+(x_0)\cap\mathcal{J}^-(x_f)}^{}A(x_0,x_1)\int_{\mathcal{J}^+(x_1)\cap\mathcal{J}^-(x_f)}^{}A(x_1,x_2) dx_1dx_2$$ ...
2
votes
2answers
101 views

How to find the integrand singularity points when having NIntegrate::slwcon:

In order to calculate the closed area of the curve below defined by parametric equation curve02, ...
3
votes
1answer
50 views

My NIntegrate expression returns a wildly inaccurate value

I am trying to integrate a function using NIntegrate: ...
0
votes
1answer
47 views

ND on a function using NIntegrate

I need to numerically differentiate a function that takes a list as an argument and that uses NIntegrate in its definition. A simple example is ...
1
vote
0answers
44 views

Numerical Integral with Boolean as part of argument

I am trying to numerically calculate a partial surface area integral of an oblate spheroid in spherical coordinates. The area I want to calculate is determined by a boolean function in the argument of ...
3
votes
0answers
56 views

Singularity treatment in a simple problem [duplicate]

With a simple search, several posts can be found on treating singularities encountered while using NDSolvefamily of numerical methods. However, most of them involve ...
1
vote
0answers
35 views

How can I automatically set an NIntegrate call to zero if NIntegrate::slwcon is observed?

This is a generic question about the NIntegrate function. I am attempting to numerically integrate a function which may or may not be highly oscillatory, based on it's inputs. For a certain sets of ...
1
vote
2answers
123 views

Discontinuous boundary condition in NDSolve

Assume we have any PDE to be solved on the rectangular domain $0<X<4$ and $0<y<2$ How do we tell Mathematica to impose the following boundary conditions? $\cases{ U[0,y,t]=0,& if $0&...
0
votes
0answers
65 views

Switching from Integrate to NIntegrate

I'm trying to decrease the amount of time that it takes to run the following code: ...
0
votes
0answers
34 views
6
votes
3answers
157 views

Force WhenEvent to respect default stepsize

I have to numerically integrate an equation system and monitor the accumulating datapoints. For example, I fit a line to a subsample of the points and terminate via ...
2
votes
3answers
195 views

What's the proper way to 'cut out' an irrelevant part of an integral, so I don't run into problems with precision?

I'm doing a numerical integration that involves an integrand with a few exponentials whose values over the integration region range enormously. I'm really only interested in the part of the range that ...
6
votes
0answers
258 views

Problems with NDSolve for solving coupled Schrödinger-like PDEs with perfectly matched layer boundary condition

I'm trying to solve a full-vectorial wave equation for an arbitrarily shaped wave guide, by using NDSolve and perfectly matched layer (PML) conditions. The PML ...
0
votes
1answer
83 views

Difficulty using NDSolve

I am tying to solve two differential equations with two delays numerically. The result didn't come out and it was written that “NDSolve::ndsz:...step size is effectively zero; singularity or stiff ...
1
vote
1answer
78 views

NFourierTransform do not show all points, even change PlotPoints and Exclusions

Needs["FourierSeries`"] I try solve the numerical Fourier transform of this function: ...
0
votes
0answers
41 views

NIntegrate a function in a circular segment

I am trying to integrate numerically a function over a circular segment surface using polar coordinates. In the following example I am using the zero order Bessel function, but any cylindrical ...
4
votes
2answers
119 views

Integrating an interpolating function

I have been using the following NDEigensystem command to generate the eigenfunctions of the laplacian with a square domain: ...
0
votes
1answer
96 views

WorkingPrecision and AccuracyGoal for using with NIntegrate

I'm modeling a quantum tunneling barrier. Because I want to express my quantities in mks units, that means that some of the variables I'm using are pretty small (10^-9). I use NIntegrate for part of ...
-1
votes
2answers
120 views

Numerical approximation using trapezoidal formula [closed]

I have bumped into a problem, that I cannot solve. I have to approximate the value of ln3 using a composite trapezoidal formula, so that the error should be within (10)^-3! How can it be solved?
3
votes
1answer
95 views

Trying to find a temperature profile with a nonlinear 2nd order ODE. NDSolve very sensitive to seemingly arbitrary constant

I am trying to solve this differential equation for a heat transfer problem: \begin{equation} kt\frac{\partial^2 T}{\partial x^2} = \epsilon \sigma T^4, \ \ \ T(0) = T_0, \ \ \ \frac{\partial T}{\...
4
votes
1answer
56 views

NIntegrate crashes without error message when using high precision integrand with non-zero tailing digits

I have a numerical integral that evaluates fine for floating point arguments with low precision (e.g., 4 digits), with argument where only zeros follow the first, e.g., 4 non-zero digits, or with ...
6
votes
1answer
112 views

How do I extract the weights used by NIntegrate?

I'd like to use NIntegrate to adaptively integrate an expression, then use the same points and weights to integrate that expression with some parameters changed. I ...