Questions on the use of numerical functions NIntegrate and NDSolve.

learn more… | top users | synonyms

0
votes
1answer
55 views

How to evaluate integrals over matrices [on hold]

Is it possible at all to evaluate integrals with respect to a matrix (dA, where A is a matrix) in Mathematica?
0
votes
1answer
85 views

Plotting an function defined by an integral [closed]

How can I plot a function defined by an integral. More specific, I have the following equation: $$ T = ...
1
vote
2answers
620 views

Computing 10-dimensional volume of a 9-sphere [closed]

I'm trying to compute 10-dimensional volume of a 9-sphere with radius r using Monte Carlo. ...
0
votes
0answers
38 views

NDSolve::derarg error: requiring pure function in solving differential equations

I'm trying to numerically solve 2 partial differential equations eq1 and eq2 given the boundary conditions in ...
2
votes
1answer
88 views

How to tell NDSolve about known relations of the exact solution

The solution to this system of differential equations: ...
5
votes
2answers
131 views

Example of Integrate applying a numerical evaluation N

Here is a minimal example: Integrate[(a[1] + x)^2, {x, 1., 2.}] 2.33333 + 3. a[1.] + 1. a[1.]^2 The problem is that ...
6
votes
1answer
91 views

How do I speed up a plotting of NIntegrate when repeated multiple times inside Plot?

I am studying a set of functions (many of which I know only as a definite integral) and I have assembled into a list. Here is a sample: ...
2
votes
1answer
41 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. ...
6
votes
3answers
78 views

Numerically integrating a list-valued function [duplicate]

I want to NIntegrate a List valued function foo[x] which is only defined for numerical ...
0
votes
0answers
41 views

NIntegrate with and without MaxRecursion

Ran a mathematica code using NIntegrate containing an integration over spherical and normal bessel functions. 1.Would the answer in the two cases change if I use MaxRecursion with some number of ...
0
votes
0answers
35 views

Difficult to solve the equation using FindInstance and not able to solve it numerically

I hope to find the range of a which leads to non-zero solution of H when you are given a specific value of B. And I hope to get ...
-4
votes
1answer
235 views

Test a wooden board's vibration mode

Here is a wooden board, with dimensions shown on the picture below. How we can use Mathematica's newly build-in finite element analysis features to show the different modes of its vibrations. Assuming ...
7
votes
2answers
161 views

Why is mathematica giving wrong and incomparable results for the integral?

1) Integration of Gaussian Distribution with $(x,y,z)$ ranging from $-\infty$ to $\infty$ gives 1 as expected using this command in mathematica. (Total Probability = 1) $\sigma = 200000$ and ...
2
votes
1answer
115 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} ...
6
votes
2answers
138 views

Problem when defining function through NIntegrate and NDSolve and Interpolation - Bug?

More than a single question, I have some doubts about the output of certain functions when defined through the result of other calculations. I am an active user of Mathematica, but maybe I haven't ...
13
votes
5answers
271 views

Mismatch between numerical and analytic evaluation of an integral

I evaluated the following integral NIntegrate[Sqrt[r] Abs[Cos[(k + 1/2) Pi r]], {r, 0, 1}] getting as a result 0.413232 for ...
1
vote
2answers
77 views

How to integrate a function which is only known at discrete points

I have an integration to do. I want to integrate. $\int_0^\infty sin^2(2\pi t)f(t)dt$ where $f(t)$ takes values from an array in the form $\{t,f(t)\}$ The time steps in the array is 1.1s. Can you ...
2
votes
2answers
106 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. ...
0
votes
2answers
127 views

Integral with unreliable result

I want to calculate $\int_R^1 \sqrt{r} |\cos((k+\frac{1}{2})\pi r)|dr $ and I get a result from Mathematica. Then I try to check the result putting the value of $k$ and $R$, (k=1 and R=0.5) in the ...
0
votes
1answer
32 views

Using ImplicitRegion to define an ellipse around Multinormal distribution for integration

I have both a 2D 'MultinormalDistribution', and also a single xy point, and I would like to be able to calculate the probability of this point (given the multinormal distribution) and also plot an ...
1
vote
2answers
88 views

Evaluation of a large integral

I have a complicated large integral I want to evaluate (does not have a closed form, need an approximation), but Mathematica seems to keep "Running...". Is there any way to make Mathematica use more ...
1
vote
0answers
38 views

NDSolve PDE, not enough boundary condition?

The PDE that I want to solve is: $$ \frac{\partial f}{\partial t} + \frac{1}{m} \left( p_x \frac{\partial f}{\partial x} + p_y \frac{\partial f}{\partial y} + p_z \frac{\partial f}{\partial z} \right) ...
1
vote
1answer
51 views

Numerically Integrating to find a Maximum using NDSolve

I am trying to numerically find an equilibrium (maximum) of a function using its differential. The following is a simplified version. ...
2
votes
1answer
86 views

Finding a root of a parameterized integral

I have a function given as a parameterized definite integral: f[a_] := Integrate[BesselJ[0, x - a] BesselJ[0, x + a], {x, -∞, ∞}] I suspect it has a root near ...
0
votes
0answers
57 views

How to calculate the analytical result of this double integral?

I'm trying to solve this double integral: $I(a,b)=\displaystyle{\int_{-1}^{1}dy\int_1^{\infty } \dfrac{y\left(x^2-1\right) e^{-ax} }{b-\frac{\sqrt{x^2-1}}{x}y} \, dx} \,\, ...
1
vote
0answers
57 views

Numerically solving a 2D oscillating integral

I'm having trouble solving this integral numerically: ...
-3
votes
1answer
80 views

My code is not converging using NIntegrate. Why? Help please [closed]

I have been trying to see why this integration is not converging but to no avail. The output gives only the y-values but fail to give any real value for x-values. Rather I always have something like ...
0
votes
0answers
18 views

NDSolve break condition

I'm solving a differential equation numerically by NDSolve[{p'[r] == -function[r,p[r]], p[0] == pcenter}, p,{r, 0, rmax}] with function>0. At some r, p[r] ...
1
vote
3answers
88 views

NIntegrate Trapezoid rule with even subdivision producing poor results

NIntegrate[x^2, {x, 5, 9}, Method -> {"TrapezoidalRule", "Points" -> 2, "RombergQuadrature" -> False}, MaxRecursion -> 1] returns the ...
0
votes
1answer
57 views

Compute integral symbolically

I want to compute the following integral: ...
0
votes
0answers
27 views

Pass model parameters to NDSolve'Reinitialize

I am wondering if there is a way to pass parameter values during the NDSolve'Reinitialize step of the NDSolve process? I've read that one way to possibly speed up repeated calls to NDSolve is to ...
0
votes
1answer
139 views

Numerical solution of the hyperbolic equation

I am trying to solve the following hyperbolic equation with given boundary conditions: I choose as initial condition $u=1$, and evolve the above hyperbolic equation until reaching a stationary ...
0
votes
0answers
39 views

Resolving initial / boundary condition conflicts ?

This is likely very simple, but I often run into trouble with inconsistent boundary conditions for PDEs; While I know Mathematica sometimes produces "false" errors for spatial derivative conditions, ...
0
votes
2answers
151 views

Problems with NIntegrate

I'm having trouble to do the following numerical integrations: ...
0
votes
3answers
110 views

How to display the value of a very small number instead of “0.” [duplicate]

I need to perform an integration. There is one particular value, which may be very small that is showing up as 0.. Is there any command in Mathematica 9 that will ...
0
votes
0answers
82 views

To solve an equation

I am trying to solve the equation: Solve[Re[Integrate[(2 c - (r^2) Exp[- I 1.4746])^(0.5), {r, 0, 31.7576}]] == 2.1216, c] I want to integrate an expression in ...
1
vote
0answers
27 views

Nested NIntegrate of vector function

I am performing a nested integration where the upper limit of the inner integral depends on the value of the outer integral, like in the question [Nested NIntegrate]. As in this question my function ...
1
vote
2answers
84 views

Problem evaluating a complicated integral

Apologies for stating my problem poorly in the first instance, thank you for the help in narrowing down the issue. Problem For those interested, it's for the exact unbiased inverse of the ...
1
vote
0answers
86 views

How to specify the time variable for NDSolve

I recall that it is possible to specify which independent variable is the "time" variable in NDSolve, but I can't find it documented anywhere. Does anyone recall ...
1
vote
0answers
73 views

Speeding up the numerical integration of a certain function

I'm using the following function f[t_] := 3/4 t^-3 NIntegrate[(x^4*Csch[x/2]^2), {x, 0, t}, Method -> {Automatic, "SymbolicProcessing" -> 0}]; I ...
0
votes
1answer
57 views

How to get correct numerical integration which should be zero? [duplicate]

I want to numerically integrate function berrycur over kx and ky. The definition of berrycur is given at the end of the ...
0
votes
1answer
79 views

wolfram mathematica intersection of two surfaces [duplicate]

I use wolfram mathematica. There is a function of two variables which defines the surface z = f(x,y), the second surface is defined as z = const. How to find the line of intersection of these two ...
0
votes
0answers
32 views

NIntegrate Issue: Changing integration limits makes calculation time extremely long

After a long time developing some code in mathematica and finally getting it to work, I have unfortunately encountered an odd problem: When I change the limits of integration (and shift the function ...
-1
votes
2answers
66 views

Strange numerical integration result

I write a function called berrycur[kx,ky] which I will give at the end of the question, and want to numerically integrate this function over {kx, -2π, 2π]}, {ky, 0, ...
0
votes
0answers
37 views

Comparing NIntegrate with definite integration

I want to calculate without error a sum of double integrals with the following definitions for the functions within them: ...
0
votes
1answer
55 views

Numerical integration with purely numerical integrand

I'm trying to perform a numerical integral with an integrand that should not be manipulated with any symbolic preprocessing whatsoever. Consider the following simple test : ...
0
votes
0answers
72 views

NIntegrate: integrand has evaluated to non numerical values

I have pasted a code that has been giving me some trouble and errors when I try to compute. ERROR: "The integrand 1435.1232 E^(-6.4703566*10^6 s^2) deEntrance[s,phi]^2 has evaluated to ...
1
vote
0answers
75 views

NIntegrate (multi-dimensional integral)

I am interested in the numerical evaluation of the following integral: $\int \prod_{i=1}^n dx_i \delta(\sum_{i=1}^n x_i) \prod_{i=1}^n f_i(x_i)$ where $f(x)$ is a complicated function. Unfortunately ...
3
votes
2answers
179 views

Integration and Fourier transform

I would like to calculate the distribution function from the characteristic function. There is a formula given as $$F_X(x)=\frac{1}{2}+\frac{1}{2\pi}\int_{0}^\infty \frac{e^{i w x}\phi(-w)-e^{-i w ...