Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
50 views

How to solve this integral equation?

I am trying to solve for x the integral equation : ...
0
votes
0answers
58 views

an NIntegrate inside a manipulate in mathematica was working and suddenly won't work now. it says indeterminent and it doesn't make any sense why

my title says pretty much everything heres what I'm entering. NumericQ returns a false value but it was true before. Im loosing my patience because this is so ...
3
votes
1answer
99 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 ...
2
votes
0answers
50 views

Understanding of method for NDSolve

I used automatic method for NDSolve. Then I asked myself - which method Mathemathica prefered? I got an answer for this question on this forum, that I need to use: ...
1
vote
0answers
69 views

Find lengths of contours in a ContourPlot

I am trying to find the lengths of different contours in the following plot: It is a complicated piecewise function evaluated on the unit disk. I am hoping there is an easy, generalized way to ...
0
votes
0answers
80 views

Calculating the Lyapunov Exponent/Spectrum for the Duffing Oscillator

Some fellow students and I are trying to calculate and plot the Lyapunov spectrum for the Duffing oscillator (currently a test approach). Each of us has Mathematica knowledge based purely on past ...
0
votes
0answers
69 views

complicated Numerical Integration, FEM application

I am trying to calculate a 2d Integral which has another 2d integral in the integrands. here is the setup: ...
1
vote
0answers
29 views

An example of how to compute numerically the KL-divergence in mathematica [on hold]

I wanted to compute an exact number for two probabilities that I am comparing. These are two normal distributions as: $$Normal(\mu = 5, \sigma = 4)$$ $$Normal(\mu = 5, \sigma = 5)$$ I decided to ...
1
vote
2answers
124 views

Making mathematica do regulated integrals

Consider the integration, $\int _0 ^\infty dx\ x \tanh( \pi x) \sqrt {x^2 + a^2 } $ where $a$ is a real number. This integral is divergent. We note that an asymptotic expansion of the integrand ...
0
votes
0answers
47 views

Numerically Solving Compatible Systems of Overdetermined PDE

Is there an easy way to get Mathematica to numerically solve a compatible system of overdetermined PDE, and plot the solutions? For example, consider the "toy" example $\dfrac{\partial u}{\partial ...
1
vote
0answers
67 views

Imaginary number appears in Integrate [closed]

I had a problem in the following code because when I use Integrate, there will always be imaginary number in the result. I put my code here. The satisfactory result should look like eq 9.138, which I ...
0
votes
1answer
36 views

How can I fix my code so NIntegrate doesn't produce error message?

I get this error when trying to integrate a seemingly simple expression: ...
0
votes
1answer
61 views

Mathematica Compute Time Is Extremely Long (Integrate simple function with parameter scan)

I was wondering if you can help. I have a set of equations I need to solve for a list of parameters; entering each parameter value and solving anew each time is simply not economical. I found a way ...
1
vote
2answers
72 views

NIntegrate piecewise vector function

Is there a way to numerically integrate a vector function defined via Piecewise? Example: ...
1
vote
1answer
72 views

Solution of Coupled Second Order ODEs with Boundary Conditions

D[Tu1[x], {x, 2}] qu - Tu1[x] (fu0 + I w p) == Tou[x] f1 D[T1[x], {x, 2}] q - T1[x] (f0 - b g0 + I w p)== To[x] (f1 - b g1) - g1 For T1 , ...
7
votes
1answer
184 views

Fitting a numerical integral via NonLinearModelFit to magnetic data

I'm new to Mathematica and I'm currently trying to fit $$m_T (H,T) = N_T \int\limits_0^{\infty} \frac{x k_\text{B} T}{\mu_0 H} \mathcal{L}(x) \text{pdf}(D_\text{mag}) \text{d}D_\text{mag}$$ with ...
1
vote
0answers
44 views

How to find out how Mathematica performed an integration? [duplicate]

In terms of integration, I usually utilize Mathematica 9 to compute scattering amplitudes in quantum field theory. Recently, I employed it to compute a particularly difficult integral, and it ...
1
vote
0answers
61 views

Monte Carlo integration with random numbers generated from a Gaussian distribution

I want to do numerical integration of some functions using the Monte Carlo method. The default setting for the Monte Carlo method is to use a uniform distribution as far as I know. How can I change ...
0
votes
1answer
57 views

NDSolve accuracy related problem

I want to solve this equation: ...
0
votes
0answers
69 views

Loop integrals (quantum field theory)

I am attempting to compute the one loop contribution to the Higgs mass, and the one loop integral is somewhat difficult. I decided to try and get Mathematica to do it, to see if the answer can point ...
0
votes
1answer
43 views

Discrete sampling of interpolating function returned by NDSolve

When solving an ODE with NDSolve, Mathematica returns an interpolation function. I need a discrete sampling of this function however. Naively, I can write this as (example): ...
0
votes
0answers
47 views
-2
votes
0answers
47 views

periodicity of a solution of ndsolve pde

I am solving a pde with NDSolve and the solution is like U(x,t) which seems to be periodic and I am trying to find an algorithm to find the periodicity of such numerical solution. my code is like ...
0
votes
1answer
116 views

I integrate a real function, I want a real result [closed]

I want to count some integral in Mathematica (actually, check that this integral is zero...) I arrive to an answer which has a zero real part but has some imaginary part! Why? This could be a mistake ...
0
votes
0answers
33 views

How does NIntegrate evaluate a piecewise range of x,y?

Could someone explain to me how Mathematica evaluates the following integration. ...
1
vote
1answer
82 views

Problem with numerical integration

I am not very used to do numerical simulations on Mathematica. I have a problem with numerical integration of this function. Is there any way for this calculation? Input: ...
0
votes
0answers
44 views

Boundary Value Problem- using NDSolve or another method

I am trying to solve a set of coupled partial differential equations, with defined boundary conditions using mathematica. Here are the equations and the boundary conditions. ...
1
vote
1answer
74 views

How to calculate the following integral of the multiplication of two Bessel functions?

This integration has an analytical solution and its behavior is described by 1/r^2 function, but Mathematica gives some weird oscillating answer. Can anybody explain this and help me overcome this ...
0
votes
0answers
54 views

Mathematica exit when calling plot. Bug?

I'm currently studing the behaviour of some integral for which I cant find an analytic solution. As this function depend on a vector on the unit sphere, I first defined it with 3 parameters before ...
1
vote
1answer
54 views

NIntegrate(with singularities) gives different results, which one should I trust?

I am doing an Numerical integral with sigularities. ...
1
vote
0answers
31 views

Integration of any interpolation generates invalid comparison errors [duplicate]

Integrating a simple interpolated function as follows generates invalid comparison errors. ...
0
votes
0answers
51 views

An error message with NIntegrate and inability to plot the integrand

I took a function of x which depended on parameters on m,n,a,y and then first summed up the n from -Infinity to Infinity and then I set the other parameters to some random values and then I asked it ...
5
votes
1answer
84 views

Finding minimum fly-by radius between Mars and spacecraft from interpolating function

I've written an interplanetary trajectory solver/plotter that plots the path taken by a spacecraft on an Earth-Mars mission, but have run into a little trouble when the spacecraft actually reaches ...
1
vote
1answer
42 views

Invariant error plot for an arbitray system of ODE

i try to use InvariantErrorPlot command for a generic system of ODE but i find only example with pre-building equations from Mathematica Packages. This is one of ...
0
votes
0answers
67 views

Integrate double definite integral [duplicate]

I am trying to evaluate an integral numerically and plot its result. My mathematica code is: ...
0
votes
0answers
105 views

Mapping the imaginary axis of the complex (s) plane

In this problem is very difficult to analyze the roots s. Firstly I thought that the problem is in precision, but I am not sure. The criterion which I want to obtain is that one of these roots has a ...
0
votes
0answers
17 views

NDSolve_ODESolve_Plotsolution [duplicate]

I am trying to use mathematica to solve this problem. Thank you! Given the ODE $$ -\frac{a^2 V_0}{2} f''(x)-V_0\cos\big(\frac{2\pi x}{a}\big) f(x)=E f(x) $$ (a,V_0) are positive real constants. Find ...
0
votes
0answers
29 views

trying to speed up sequential use of NDSolve for large system of ODEs

I don't have a basic example just yet but I'll describe the problem for now. I have a large system (>100) of coupled first order ODEs. Where the output from one solution becomes the ICs for the next ...
3
votes
1answer
131 views

Convergence in NIntegrate vs Integrate

I am faced with this situation that for a certain integration, $\int _0 ^\infty \frac { \tanh (\pi \sqrt{x} )} {\sqrt{x+10} } dx$ - the command Integrate returns ...
0
votes
1answer
46 views

Strange result using NIntegrate with Max and PDF

This is really trivial and I appologise in advance if I have made a stupid error somewhere. I have been chasing down some strange results when using NIntegrate with ...
1
vote
1answer
200 views

Euler's method for system of differential equation

I need to program Euler's method to solve a system of two diffferential equations of first order. Fist, I have programmed the Euler's method for just one differential equation: ...
2
votes
1answer
102 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 ...
0
votes
1answer
40 views

NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...
0
votes
1answer
69 views

Multiple NIntegral with singularity

I need to compute the following integral FF[0]. When evaluating FF[0] Mathematica simply takes too much time. The problem may ...
0
votes
1answer
86 views

Initial and boundary value errors

NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >> I keep getting this, ...
-5
votes
1answer
83 views

Poincaré section for 3BP

I try to plot the Poincaré section for the 3BP i use the following code that works very well: ...
0
votes
2answers
88 views

How to numerically integrate this integral?

I want to integrate the function funcin (spherical coordinates). ...
1
vote
1answer
52 views

Integrate with FunctionInterpolation differs from NIntegrate

In working with interpolating functions and integration, I noticed a lot of differences between NIntegrate and Integrate in the ...
1
vote
2answers
90 views

intersection between function and plane

I try to solve a ODE system of equations and i want to plot the intersection of the 3D solutions with a costant plane. To do this i use the follow code: ...
3
votes
0answers
79 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 ...