Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

4
votes
2answers
158 views

How to use NIntegrate when there are symbolic constant coefficients

I would like to numerically integrate an equation such as the one below in which there are symbolic constant coefficients. I used a very simple code but it doesn't work in general, that tried to deal ...
0
votes
0answers
32 views

MathLink wrapper for NIntegrate

I wonder if I can benefit from the Mathematica numerical quadrature routines in a way which integrates completely into an existing C-program. To be more specific I have C-program which does numerical ...
0
votes
3answers
143 views

Solving an Integral Equation Numerically

I have been trying to solve the integral equation below, but cant seem to find a way out of this. Can someone please help me out with suggestion? $f(t)=\int_0^{\infty}\frac{K_1a(t)}{a(t)+K_2}\,dt$ ...
0
votes
0answers
66 views

Can this function be numerically integrated

I need to integrate the function, $f(a,b)=-g(a,b)ln(g(a,b)) = -1/ Pi(( (E^(-((a^2 - E^(-t [Gamma]) [Alpha]^2)/( 1 + 2 [Sigma]^2)))) [Pi] ([Sigma]^2) )/((1 + 2 [Sigma]^2) (E^(2 ...
-1
votes
1answer
84 views

Multiple NIntegrate (again)

Basically I have the same question as here: Multiple NIntegrate but since I don't have enough "reputation" I cannot comment there. I want to solve the following multiple Integral numerically at given ...
0
votes
1answer
114 views

Using NDSolve for three variables as function of time

I want to be able to plot z, and r. Should I be using DSolve, NDSolve or something else? I've tried to clear it up a bit Thanks, Will ...
3
votes
1answer
140 views

Integrate equations of motion when force depends on position

I'm fairly new to Mathematica. I'm trying to test my C++ implementation of a fourth order Runge Kutta method for Newton's equations of motion. I want to test my integrator when the applied force is ...
1
vote
1answer
83 views

Boundary condition is not specified on a single edge of the boundary of the domain

I am attempting to solve a PDE as prescribed in a paper I am reading; however, Mathematica doesn't seem to be happy with the way I am posing the problem. Im my case, r(t,100) is an approximation of ...
0
votes
2answers
107 views

Double integral with variable in the limits

I'm trying to solve this integral: $$ ...
2
votes
1answer
60 views

Numerical Integration with Variable Parameters

So I want to numerically compute the integral of a long complicated expression over a specified domain (in this case an ellipse). I know how to use a Boole function to sample within the ellipse, but I ...
4
votes
1answer
347 views

Is it possible to calculate a Lebesgue integral in Mathematica?

As the title says, I wonder if it is possible to calculate a Lebesgue integral in Mathematica, especially when the domain of integration is $\mathbb{R}^N$, or in other words multivatiate Lebesgue ...
0
votes
0answers
95 views

Using Mathematica to Solve for Electric Field from finite cylinder

For a cylinder that is of length L and radius s and possesses a charge distribution of sigma across only the cylinder part and not the endcaps, I am trying to calculate the Electric-field. The ...
1
vote
2answers
109 views

How to make a single-variable out of a NDSolve solution?

So I've got this line that contains the solution of a partial, non-extraordinary differential equation (because Mathematica doesn't handle extraordinary partial differential equations): ...
2
votes
0answers
86 views

Global vs local adaptive integration: lattice propagator

I was doing the first exercise in the paper Lattice QCD for Novices. This is the expected result: With the default "GlobalAdaptive" method for NIntegrate it threw errors saying that the error had ...
1
vote
0answers
56 views

Choosing PrecissionGoal and AccuracyGoal for decomposed integral with NIntegrate

Assume I have a complicated integral $I$ which can feature all kinds of difficulties like infinite interval, rapidly oscillatory integrand, integrable singularities and numerically almost singular ...
0
votes
1answer
123 views

Error Function Integral (Erf)

Any idea how to solve analytically this integral Integrate[(a Erf[a Sqrt[b/(a^2 + b)] c])/(a^2 + b)^(3/2), a] I tried substitution u=a^2 + b, but it didn't work. ...
1
vote
3answers
151 views

Solve for variable in integral limit when using NIntegrate

I am trying to solve for a variable which appears in the limits of an integral, rather like in the following; ...
0
votes
0answers
62 views

Convergence problems with numerical integration of specific functions

I want to numerically integrate two functions that have several poles inside the integration region. These are the functions: ...
7
votes
1answer
180 views

Is there a way to see the result of NIntegrate's symbolic preprocessing?

NIntegrate can do a number of different types of symbolic preprocessing on the integrand before starting the numerical calculations, including changes of variables. ...
7
votes
2answers
219 views

Why do I get a different value when I change the order of integration?

I think the following two-dimensional integrals should be equal, since they both integrate the function over the half plane defined by $t>\tau$. $$\int_{-\infty}^\infty \mathrm{d}t ...
4
votes
5answers
129 views

NIntegrate::slwcon Problem

I have a problem with numerical integration of this function. Integral value is zero, but NIntegrate[] needs a lot of time to calculate this. Is there any way to ...
4
votes
1answer
171 views

How to choose MaxStepFraction for optimal speed of NDSolve

I'm trying to use NDSolve to solve a 1D Schrodinger's equation, and it seems that MaxStepFraction has huge effect on the ...
3
votes
1answer
251 views

A Bessel & Struve functions related integral

I try to numerically compute this integral and I don't figure out why on earth Mathematica is not able to do it. Is my input correct? Does it possibly have a closed form? ...
0
votes
1answer
73 views

How to use NIntegrate in a function using parameters from a list

I would like to use NIntegrate in a function with some parameters from a list. I simplified my problem for this forum. The list of parameters is as follows: ...
0
votes
0answers
52 views

ParametricNDSolve: Parameter inside UnitStep leads to longer integration times

I have found one of the most annoying issues in ParametricNDSolve. When a parameters occurs inside UnitStep (and Piecewise and If) the integration takes much longer time. I illustrate this by an easy ...
3
votes
1answer
130 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. ...
0
votes
0answers
43 views

PDE syntax question

I am trying to solve a PDE of a reaction diffusion equation, and while I'm getting a decent looking solution, I am also getting inconsistent BC / initial conditions warnings and wanted to check if my ...
0
votes
0answers
70 views

Differential equation with random variable

How can I derive analytically or compute numerically the solution to following differential equation $$ dy/dt = y\cdot X\cdot (y\cdot X - g(y,X))\cdot X $$ where X is a random variable (e.g. from a ...
0
votes
2answers
95 views

NDSolve boundary query / Extracting values from solution

I have a function $O_{2}$ with boundary conditions $O_{2}(r_{o}) = p_{o} $ and $O_{2}(g) = O_{2}'(g) = 0$. I plot it using the solver code below; ...
2
votes
0answers
69 views

Slow integration of interpolating function

I have a large file with irregularly spaced data in the format: ...
5
votes
2answers
164 views

Triple fractional part-related integral

The evaluation with Maple suggests the triple integral is around $1$, but Mathematica tells it's $0.0958758$. When using the code ...
0
votes
2answers
315 views

Kramers Kronig Relation for Phase and Complex Reflectivity

I am a new user to Mathematica and I have been trying to figure out how to find $\Theta(\omega)$ from my 'experimental' values of energy and $\ln(\sqrt{R(\omega)})$ (I am just running a simulation, ...
1
vote
1answer
390 views

shooting method and stifness problem for NDSolve

I'm trying to solve numerically the following differential equation: 1/r[x]^5 + k/Sqrt[1 + r'[x]^2] - (k r[x]r''[x])/(1 + r'[x]^2)^(3/2) == 0 I can set boundary ...
0
votes
0answers
61 views

NIntegrate with an arbitrary number of variables [duplicate]

I need to evaluate NIntegrate with a variable number of variables. Here's a concrete example. I'll accept an answer that finds a way to make the example work. I ...
9
votes
3answers
379 views

Different results for integration using Mathematica and MATLAB

I have the following integration: $$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$ I get different ...
0
votes
2answers
104 views

NIntegrate using Boole doesn't work

This doesn't want to work for me - I don't know why not. It usually gives me 0, but sometimes also a different number. I know it should be a small, non-zero number. ...
2
votes
1answer
59 views

Differentiating a function that has NIntegrate within it

I am something of a novice with Mathematica. I have written the following code; ...
0
votes
0answers
57 views

How to solve initial value problem using Runge-Kutta method? [duplicate]

How to solve the following initial value problem using Runge-Kutta method u''[x] + (2/x) u'[x] + E^(u[x]) == 0, u[0] == 0, u'[0] == 0
1
vote
1answer
157 views

Interpolation of a table with 4 parameters

I have a huge data file which I need to do some analysis on it. The file is built in this way that for each 4 variables, there is a value of the function: ...
2
votes
1answer
127 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: ...
0
votes
1answer
161 views

How to improve the performance of this code

I have implemented a code in Mathematica 9 to simulate a scattering problem, and I got really disappointed about its performance when compared to Matlab. Since I am a newbie in Mathematica, would ...
0
votes
1answer
84 views

Transformation of the NDSolve result into new dependent variables

I have solved a set of coupled differential equations and now I need to convert them into different dependent variables and sketch their trajectories. Here is the code I have written so far: ...
1
vote
1answer
93 views

Numerical integration of Hankel functions

I would like to know how to perform numeric integration for the following type of integrals in Mathematica. For the following integrand, we can not get the symbolic result. ...
1
vote
0answers
42 views

ParametricNDSolve and ProcessEquations

I have a question regarding NDSolve`ProcessEquations and ParametricNDSolve. When using the regular NDSolve we have the option to divide the integration into the three steps ProcessEquations, Iterate ...
4
votes
5answers
332 views

Problem using WhenEvent to constrain solution

Note: This question has also been posted at the Wolfram Community Problem: Simulate pressure in volume 1 and 2 for 1 second. The circuit is as follows: From this I set up the governing DE for ...
0
votes
1answer
120 views

Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
1
vote
0answers
202 views

Differential equations: How do I solve a delay differential equation with 0-1 variables

How do I solve the following non-linear, delay-differential equations using Mathematica under the assumptions $$p(t) = 1 ,\; y(t) > k$$ $$p(t) = 0,\; y(t)<= \ k$$. $$ \frac{dw}{dt} = ...
0
votes
1answer
81 views

PDE plotting assistance needed

...
0
votes
0answers
71 views

Error Interpretation with NIntegrate, max. possible accuracy/precision

I guess the right question to this is: Which method is used at NIntegrate with Mathematica 8 as default and which is used with Mathematica 9 as default? ...
2
votes
2answers
176 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...