Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

2
votes
2answers
92 views

Plotting NIntegrate

Plot[E^(-0.5 x) NIntegrate[Cos[t] E^(Cos[t] + 0.5 t), {t, 0, x}], {x, 0, 40}] Mathematica evaluates this integral for each point, which takes a long time. It is ...
2
votes
1answer
265 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
450 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
845 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
120 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
258 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
182 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
2
votes
1answer
102 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
332 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
215 views

Catastrophic loss of precision

I am trying to solve a double integral in the range of 0 to Infinity (for both the integrals) and Mathematica is giving me the following error: Catastrophic loss of precision in the global error ...
2
votes
1answer
227 views

2-Dimensional NFourierTransform

Mathematica FourierSeries package contains the NFourierTransform function for calculating 1-D Fourier integral numerically. ...
2
votes
2answers
415 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
165 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
303 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
128 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
548 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
290 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
2
votes
1answer
554 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
699 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
204 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
59 views

Three Dimensional Plot of Numerical Integral with Delta Function

I want to plot the definite integral of the following function ...
2
votes
1answer
247 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
177 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
86 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
187 views
2
votes
1answer
87 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
164 views

Complex Integration

There are some sequential functions: ...
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. ...
2
votes
1answer
429 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
1answer
640 views

Infinite Expression Error from NDSolve

I am trying to solve a differential equation numerically. So I have ...
2
votes
2answers
661 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
83 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
717 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
255 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 ...
2
votes
1answer
877 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
611 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
50 views

Problem with NDSolve and Sign

If c1 cnd c2 are zero, the code responds very well; but if one of c1 or ...
2
votes
1answer
48 views

How should I evaluate the numerical integral of a function with divergent part substracted?

I want to evaluate the following integral numerically in Mathematica, $$\int_0^{\infty}(\frac{1}{(1 - e^t)^{10}} - (\frac{1}{t^{10}} - \frac{5}{t^9} + \frac{145}{12 t^8} - \frac{75}{ 4 t^7} + ...
2
votes
1answer
83 views

Error accumulation in NDSolve?

I'm trying to solve this system of ODEs numerically: $$\vec{Q} = \vec{P} \times \vec{Q}$$ where vectors $\vec{P}, \vec{Q}$ have 3 components: $$\vec{Q} = \left( Q_1, Q_2, Q_3 \right) $$ $$\vec{P} = ...
2
votes
1answer
128 views

Solving an integral equation numerically

my problem is: I get the result of definite integral and now I need to find the upper limit for the same integral but with opposite sign value so f2=-f1. ...
2
votes
2answers
135 views

Approximation of definite integral by parabolas

This question is related to Trapezoid approximation to definite integral. As promised, I am now asking about how to draw approximation of integrals by parabolas. I tried to modify MarcoB's code, and I ...
2
votes
1answer
60 views

How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function?

How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function waited to be solved by NDSolve first? For example, ...
2
votes
1answer
117 views

Evaluate function defined by DifferentialRoot

I have the following sequence of rationals that I want to find the generating function of: ...
2
votes
1answer
96 views

How to tell NDSolve about known relations of the exact solution

The solution to this system of differential equations: ...
2
votes
1answer
231 views

How can I reduce computation time while still obtaining a good approximation for my function?

I am new to any CAS (and Mathematica, for that matter) and new to StackExchange too, so forgive me and correct me on any mistakes. I have this function: $J_p=\sum_{m,n=1}^{\infty} ...
2
votes
1answer
946 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
402 views

Strange Behavior of NDSolve

I am trying to evaluate the following ODE numerically: ...
2
votes
2answers
815 views

Putting NDSolve into ParametricPlot

I am having issues using Manipulate to plot the (numeric) solution to an ODE for different parameter values. I have a code that has several stages, which seem to ...
2
votes
1answer
337 views

Which integration strategy to use for this product of polynomials?

What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...