Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions on the use of numerical functions NIntegrate and NDSolve.

2
votes
0answers
20 views

Monitoring time step manually within RandomFunction

Consider the following stochastic differential equation ...
0
votes
1answer
67 views

Solving self-consistent equation that involve using NIntegrate [on hold]

I am trying to solve numerically in Mathematica self-consistent equation that I have as: NSolve[s == 1 + f[x, y, z, s, 10], s, Reals] where ...
0
votes
2answers
82 views

Integrals of a Fourth order differential equation: Part B

I want to continue this topics (enter link description here): Is it possible for us to get the value for integrals of a Fourth order differential equation (But) which includes a constant parameter? ...
0
votes
2answers
60 views

Integrals of a Fourth order differential equation: Part A

Is it possible for us to get the value for integrals of a Fourth order differential equation in MMA. I attach the code that i have used in MMA: ...
1
vote
3answers
53 views

NDSolve output as input to another NDSolve

I want NDSolve to solve the problem $$y'(x)=0, y(0)=1, x\in[0,1] $$ and then use $y(x)$ to solve $$z'(x)=y(x), z(0)=0, x\in[0,1] $$. This is a toy model of the real problem. In the real problem ...
-4
votes
1answer
80 views

A difficult problem about the “FindRoot”

I use the parameters to calculate the Φ in the final, but I don't know what happen, it shows a lot of information, but I can't understand. I am using this code to solve the problem. This code is ...
0
votes
1answer
55 views

Numerical solution of differential equation with boundary condition at infinity

I have the following ODE for a function $F(x)$: $F''-\frac{1}{x}F'-aF=0$ with the following boundary conditions: $F(x\to0) = 1$, $F(x\to\infty)=0$. It can be solved analytically: $F = \sqrt{a}xK_1(\...
0
votes
0answers
65 views

Plot a function with very small values, close to zero

I want to plot a function with very small values, close to zero, but even though the limit is -3/2 as x->0, I can't get any ...
1
vote
3answers
59 views

Sum of all the n-th numerical evaluation of an integral and its cumulative sum of the square of the n-th value

I wish to compute the expansion coefficient of a wavefunction(i.e. in quantum mechanics) which in itself is an integral, given by $$b_{n00} = \int^{\infty}_{u = 0} \frac{1}{(n)^{3/2}} L^{1}_{n-1}\left(...
0
votes
1answer
62 views

Find Root doesn't work properly

I use a FindRoot that doesn't find the right solution in some range, the FindRoot is the following: ...
0
votes
1answer
53 views

How can I solve this BVP using mathematica?

I need to solve the following BVP: $$(g^{-1/3}f'')'+ff''=0$$ $$(g^{-1/3}g')'+0.71fg'=-1.43775g^{-1/3}(f'')^2$$ With the following constraints: $$f[0]=0,f'[0]=0,f'[20]=1,g[0]=0.944175,g[20]=1$$ I used ...
0
votes
1answer
45 views

How can I compute the derivative of a variable after it is solved using NDSolve?

I have a 4th-order(with respect to x and 2nd-order with respect to t) pde which is solved easily using NDSolve for the variable v[x,t]. Now, I also want the value of 3rd-order partial derivative of v[...
1
vote
1answer
76 views

Stability of the numerical methods for SDE

I've been figuring out with the methods for integrating of stochastic differential equations in Mathematica. I've considered the one-dimensional system: $$dx=-x dt+\sigma x dw$$ with some initial ...
-1
votes
1answer
69 views

nlnum problem of NDSolve

I'm having a difficulty to NDSolve a ODE due to nlnum (according to the error message). Below is the code I have. First of all are functions: ...
1
vote
2answers
67 views

Solving an ODE with a sign/step function which depends on the time derivative

I'm trying to solve a set of ODEs with a Heaviside step function which depends on the sign of the derivative of the function. This is a simplifying example of what I'm trying to do ...
0
votes
1answer
35 views

problem with integration and plot

I have a problem with the following function, I want to integrate my function on r for r between 0 and infinity and then plot it, but I can't compute it, I get the following error... Integrate::...
0
votes
0answers
60 views

Integral evaluating very slowly

I am trying to evaluate the following simple integral: ...
1
vote
1answer
49 views
-1
votes
1answer
83 views

Getting errors NIntegrate::nlim and NIntegrate::slwcon [closed]

Here is the modified question: First: Define phi[x_]:=Piecewise[{{1, 0 <= x < 1}}, 0] ...
0
votes
0answers
50 views

Problem with NIntegrate: it gets stuck when evaluating zero value

I have an integral with complicated function evaluated by MonteCarlo method (please find a folder with two files by the link below). Namely, a function ...
6
votes
3answers
275 views

Find an envelope of the list of points

I have a list of points as you can see in the image below. From this list of points, I want to generate a filtered list of points, which is the envelope. Additionally, calculate the area under the ...
0
votes
0answers
45 views

Unable to Integrate (or NIntegrate) with Piecewise limits

Essentially, I am trying to find the following, either algebraically or numerically, where Z is defined by the piecewise function in the Mathematica code (below): $\displaystyle{\int_0^{\infty } \...
1
vote
0answers
12 views

Convolve[…] behaves differently to that of Integrate[…] when numerically integrating the result

I am performing a convolution between two functions, and then I want to numerically integrate the result. If I go: ...
0
votes
0answers
37 views

Numerically integrating a highly oscillatory multi-dimensional Bessel function with good precision

This is a follow up question to Numerically integrating a highly oscillatory Bessel function with good precision. Now I am considering a three dimensional integral, ...
1
vote
2answers
94 views

Numerically integrating a highly oscillatory Bessel function with good precision

I am trying to evaluate the following integral Integrate[Csch[w]^2 (w BesselJ[1, w Sqrt[y]/π]^2), {w, 0, Infinity}] in an asymptotic large ...
-1
votes
4answers
91 views

Problem with NIntegrate over a highly-oscillatory integrand

I'm trying to numerically evaluate the integral $$\int_{a}^{b}\mathop{\mathrm{d}x}\int_{x}^{b}\frac{\sin(x-y)}{xy}\mathop{\mathrm{d}y}$$ using Mathematica. To do that, I the function ...
4
votes
1answer
124 views

Solve PDEs with finite difference scheme by modifying NDSolve-based solver

Motivation As discussed here, NDSolve uses different difference orders for various spatial derivatives and the implicit design could cause trouble in certain cases....
0
votes
2answers
65 views

Finding a numerical solution and plotting it over a wide range

My problem is that I am trying to find a Numerical solution to a function of the form f(x,c)== K for x for some given values of c, K, and plot this function over a wide range of values of c. My ...
-1
votes
1answer
52 views

Plotting and Finding Area for Discrete Points

I want to plot a graph for following coordinates and then I want to find the area from x = 900 to 1600. What is the correct path to find the area of that limit? ...
0
votes
0answers
15 views

Using RegionPlot with NIntegrate causes symbolic evaluation when integrating

I am trying to plot the regions when a certain integral is positive. Because the function has many parameters I am passing the values through two sets of rules, one containing the pair of values I ...
0
votes
0answers
31 views

Assumptions in integration

I am trying to evaluate the integral $$ \int_0^{2\pi}\frac{D_{11}^2+2D_{12}^2+D_{22}^2+D_{33}^2}{1+e\cos x(t)}dx $$ Where $D_{ij}$ are third derivatives wrt $t$ as defined below. ...
0
votes
2answers
49 views

Want to use NIntegrate with some unknown coefficients associated with the expressions

NIntegrate[C*x^2, {x, 0, 2}] Here is the simple expression I want to use NIntegrate to find the value, but I am getting "The ...
3
votes
2answers
308 views

Help needed to make NIntegrate Converge

I have the following notebook (trying to caclulate the pull-in voltage of a structure): ...
1
vote
1answer
49 views

Help For Solving Complicated Function

I have a piece-wise defined function: ...
2
votes
1answer
206 views

Solve integro-differential equations

I am trying to numerically solve the following integro-differential equation and get some plots for $n(s)$ vs $s$: $$ \dot{n}(s)-\frac{\dot{w}(s)}{2w(s)}\int_{-\infty}^s ds'\frac{\dot{w}(s')}{w(s')}(...
1
vote
0answers
35 views

Different values of the numeric integral evaluated by using different methods

Consider the space of three variables $x,y,z$ defined in the ranges $$ \tag 1 x \in (0,\pi), \quad y \in (0,\pi), \quad z\in (0,2\pi), $$ and the following UnitStep ...
5
votes
1answer
111 views

How to solve this equation numerically or analytically

In the paper, entitled: A Closed Form Solution for the Pull-in Voltage of the Micro Bridge (Link to PDF: https://pdfs.semanticscholar.org/0d31/33707b1243f6b4e3344c4fa19b831b010b8b.pdf) ... the ...
1
vote
2answers
66 views

How to force Mathematica to integrate only over the domain given by (few) step functions?

Consider the function f[x,y,z,...]*UnitStep[g1[x,y,z,...]]*UnitStep[g2[x,y,z]]. the variables x,y,z… are defined into the ranges $\{x_{1},x_{2}\},\{y_{1},y_{2}\},.....
2
votes
1answer
57 views

Quasi Monte Carlo method gives zero for the following example

Consider the example NIntegrate[UnitStep[9-x^2-y^2],{x,0,xmax},{y,0,ymax},Method->"QuasiMonteCarlo"] If xmax = ymax = 3, ...
1
vote
0answers
35 views

How do decrease uncertainty of Monte-Carlo integration?

I have some function of many arguments and need to integrate it over the region given by the products of Heaviside theta functions. Namely, I write, say, ...
5
votes
0answers
48 views

Details of NDSolve calling LSODA

Inspired by my question regarding the computation time of NDSolve using the LSODA backend I was wondering how NDSolve is actually calling LSODA (what arguments are sent to LSODA), i.e. what are the ...
2
votes
1answer
129 views

NIntegrate fails to converge

I am trying to compute this integral for different a with 0.0001<a<0.5, ...
2
votes
2answers
52 views

NDSolve producing message Power::infy

I am trying to solve geodesic equations in some 3D black hole spacetime. It is a coupled ODE system with boundary conditions. Due to the symmetry of the spacetime, I expect the solutions to be even ...
1
vote
2answers
142 views

Numerical integration with Dirac delta

I have some complicated function depending on many arguments $x,y,z$ and parameter $a$ multiplied by Dirac delta of another function, $$ \tag 1 f(a,x,y,z) = g(a,x,y,z)\delta(t(a,x,y,z)) $$ I want ...
1
vote
0answers
34 views
1
vote
1answer
78 views

Simulating a combination of PDEs and ODEs

I am trying to simulate a combination of PDEs and ODEs, given below. $$ \begin{matrix} -L\dfrac{\partial}{\partial t}I(t,z)&=&\dfrac{\partial}{\partial z}V(t,z)+RI(t,z)\\ C\dfrac{\...
0
votes
1answer
89 views

Why does Monte Carlo integration underestimate my integral as integration range increases?

I'm having a huge problem with Monte Carlo integration. This simple example adequately shows the problem. ...
6
votes
2answers
189 views

Conductance from Landauer-Buttiker approach

I have a single-rectangular potential barrier in graphene. The transmission $T(E,\theta)$ is given by $$T(E,\theta) = \left[1+\left(\frac{V}{\hbar v_Fk_x}\right)^2\tan^2\theta\sin^2(k_xD)\right]^{-1}$$...
0
votes
0answers
26 views

NIntegrate failed to perform the integration unless AdaptiveMonteCarlo method is chosen

I have multi-dimensional numerical integration of some function depending on one parameter. If no specification for the integration method is chosen, the output for specific values of the parameters ...