Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

3
votes
1answer
1k views

Can Mathematica solve integro-differential equations?

I have integro-differential equations like this: ...
3
votes
1answer
551 views

How to adjust parameters to experimental data on a NDSolve problem

I have 2 differential equations with 2 variables, x and y,which are a function of t and I have the parameters k1, k2 y k3. ...
3
votes
1answer
199 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
483 views

Second Order Non Linear Differential Equation

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

Using indexed array elements as integration dummy variables with EvaluationMonitor. Bug?

As part of a routine that must cope with integration of varying numbers of dimensions, I would like to use indexed variable names (e.g., x[0], x[1],...) as dummy integration variables. However, it ...
3
votes
0answers
131 views

Obtaining NIntegrate error estimate

Is there a way to extract the error that Mathematica estimates when calculating a numerical integral using NIntegrate? Internally Mathematica must keep track of this error, because it is used to ...
3
votes
0answers
145 views

Numerical integration: complicated 2D integral seems to be poorly estimated

In the course of some physics research I've been working on, a very annoying integral has appeared that I'm having difficulty evaluating numerically. Any help you could offer would be greatly ...
3
votes
0answers
66 views

Integrate yields complex value, while after variable transformation the result is real. Bug?

I have the follwoing integral: Integrate[1/Sqrt[0.7 + 0.3*(1 + z)^3], {z, 0, Infinity}, Assumptions -> z \[Element] Reals] >> -3.36354 - 3.85013 I the ...
3
votes
0answers
282 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
151 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
1k 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
443 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
236 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
0answers
1k 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
441 views

How to calculate this integral?

I am trying to Integrate the following Integral : $\int_1^{\infty } \dfrac{\left(x^2-1\right)^{13/2} e^{-ax} }{x^{10}} \, dx \,\, \,\,\,\,\,\,\,\,\,\,\,\,(a=\textrm{real>0})$ Mathematica didn't ...
2
votes
4answers
284 views
2
votes
2answers
1k 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
219 views

NIntegrate piecewise vector function

Is there a way to numerically integrate a vector function defined via Piecewise? Example: ...
2
votes
2answers
95 views

How should I tweak the options in NIntegrate?

I'm trying to obtain an accurate result from a difficult-to-integrate function and I've thrown in the kitchen sink worth of options in NIntegrate. I think I'm ...
2
votes
2answers
86 views

Calculate area between two multivalued curves

I have to calculate the area between two curves which will give me the result of a particular quantity. However, both the curves are multivalued functions. Here is a data set showing the region where ...
2
votes
2answers
204 views

Plot result of non analytical-integral

I have the following function: h = 1; c = 1; k = 1; B2 = (2*h*c^2)/(x^5 (Exp[(h*c)/(x*k*T)] - 1)); (someone can see that this integral is the Planck function). ...
2
votes
2answers
111 views

FindFit working with Integrate but not NIntegrate - I am using “?NumericQ”

I'm having some syntax problems with finding a fit to an equation that doesn't have an analytical expression for it's integral. Because I think the problem is one of syntax, I am substituting a ...
2
votes
2answers
418 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
1answer
255 views

Syntax for integrating over limits specified by a Table

I wish to use NIntegrate to compute multidimensional integrals. However, I don't want to manually input the limits for the dimensions. I want to store the ...
2
votes
2answers
440 views

Plotting several numerical solutions plus the analytic solution of ODE in one plot

I want to be able to plot several numerical solutions of an ODE, plus its analytical solution in one plot, in order to see how the numerical solutions converge towards the analytical one with respect ...
2
votes
1answer
817 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
3answers
93 views

NIntegrate-ing a compiled function

I'm trying to integrate numerically in 6 dimensions a very long expression and I read about the option to NIntegrate a compiled function which should be faster. ...
2
votes
2answers
238 views

Perturbation theory with Mathematica: Definite integral of polynomial times exponential times hypergeometric function of imaginary argument

I would like to ask also Mathematica users about my question from the math forum. To expand, I'm adding the code which calculates the full double integral for $n=0$ and $\mu=0$ (the second in the ...
2
votes
1answer
178 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
2
votes
1answer
88 views

Numerically integrate and plot $f(x;p)$ for a range of the parameter $p$

Suppose we have an integral of the form $$I = \int_a^b dx \, \sin(px), \tag{1}$$ where I've take $f(x;p) = \sin (px)$ to be specific. I want to plot this integral for a range of values of the ...
2
votes
2answers
303 views

Wolfram Alpha will calculate this definite integral but Mathematica won't

I'm trying to compute a definite integral of the form $$\int_{0.2}^{0.5} \frac{1}{(1 - y)y^2\sqrt{0.5 - y^2 + y^3}}$$ in Mathematica. WolframAlpha will calculate this but Mathematica only outputs the ...
2
votes
1answer
213 views

2-Dimensional NFourierTransform

Mathematica FourierSeries package contains the NFourierTransform function for calculating 1-D Fourier integral numerically. ...
2
votes
2answers
356 views

What is the proper way to operate on interpolating functions?

I am trying to multiply an interpolating function by -1. If I do this Mathematica does not seem to allow any further operations. Bear with me while I generate the Interpolating Function in question. ...
2
votes
2answers
155 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
285 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
1answer
124 views

NIntegrate Warning / Error Messages

I am doing: NIntegrate[Sin[Exp[(x^4)]], {x, 2, Infinity}, PrecisionGoal -> 12] It prints out a host of warnings, but also shows the results as: ...
2
votes
1answer
529 views

Use Euler method to solve differential equation

Use Euler's Method or the Modified Euler's to solve the differential equation ${dy/dt=y^2+t^2-1, y(-2)=-2}$ on $[- 2, 2]$. Take h = 0.2 (...
2
votes
2answers
280 views

Weighted mean of complex exponential function using NIntegrate

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

Creating hexahedral finite elements in Mathematica

Is it possible to do FEM using hexahedral elements in Mathematica? If it possible, is there any help to do that?
2
votes
1answer
684 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
201 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
197 views

(NDSolve) Non-linear 2nd order ODE, regular singular point (looking for good methods for this problem)

I am solving this set of non-linear 2nd order ODE by NDSolve, $$r^2\frac{d^2f}{dr^2} = 2f(1-f)(1-2f)+\frac{r^2}{4}h^2(f-1)$$ $$\frac{d}{dr}\left[r^2\frac{dh}{dr} \right]=2h(1-f)^2+\lambda ...
2
votes
2answers
151 views

NIntegrate over a list of functions

This question is the result of these other two questions. Question 1 and 2. I thought it would be better to ask a new question rather than deleting previous one. I think When ...
2
votes
1answer
75 views

WhenEvent error in NDSolve

I’m trying to solve a discontinuous differential equation where there are lost of energy when the trajectory cross the discontinuous manifold. The code I used was ...
2
votes
2answers
175 views
2
votes
1answer
85 views

How to obtain numerical answer for equation containing integration

Could some one tell me how to obtain numerical value of $a$ and $b$ from equations below: $$\frac{1+exp(b)}{1+exp(0.9a+b)}=0.95$$ $$\int_{0}^{\infty} \frac{1+exp(b)}{1+exp(a x+b)}=1$$
2
votes
1answer
54 views

Double application of NIntegrate produces unexpected error messages [duplicate]

In the course of trying to answer 69601, I encountered unexpected error messages. In highly simplified form, NIntegrate[NIntegrate[z y, {y, 0, 10}], {z, 0, 10}] ...
2
votes
1answer
45 views

Imaginary term in Integration procedure

How do you remove the imaginary term in the integrated output? Compare the outcome from the operations below. The first operation yields an imaginary term, while the second one has none. ...