# Tagged Questions

Questions on the numerical functions of Mathematica, implementing numerical methods and numerical computing with Mathematica.

455 views

### Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
42 views

124 views

### Multiply integrand with -1, and the precision changes?

"After multiplying the integrand of NIntegrate with -1, the Precision of the output will ...
74 views

### Kernel crashes when computing finite difference mixed derivative with respect to y & z but works fine when computing with respect to x & y or x & z?

I am using Mathematica 10.4.0 on Ubuntu 16.04. I am trying to solve a set of differential equations using finite difference method on an NxNxN cubic grid (x, y, z directions). I am getting a weird ...
94 views

### NSolve won't act on very large powers

I noticed that NSolve isn't running properly when I have some seemingly harmless numbers in my expression. Here is a simple example: ...
71 views

### Finding the correct boundary conditions to a specific problem

I want to reproduce the following problem in the figure: $$\phi''+c\phi'\sqrt{m^2\phi^2+\phi'^2}+m^2\phi=0$$ where $\phi=\phi(x)$ with $x \in (-\infty,\infty)$, $c=\sqrt{3/2} \$ and $m=0.2$. ...
72 views

### ComplexInfinity for a convergent product

The infinite product involving the ratio of (n^2)! to its Stirling approximation ...
3k views

### Updating Wagon's FindAllCrossings2D[] function

Stan Wagon's Mathematica in Action (second edition; I haven't read the third edition and I'm hoping to eventually see it), demonstrates a nifty function called ...
1k views

### how to solve second order nonlinear coupled differential equations using NDSolve with hyperbolic function

i have to solve some solitons scattering through this coupled equations. i need to get two different graph, but still the graph did not come out. and also the equations quite complicated containing ...
236 views

### What can one do with extremely stiff problem in NDSolve?

Consider the following illustrative problem: $$\frac {\partial f} {\partial t} = \frac {\partial} {\partial x}(x f) + \frac {\partial} {\partial x}(f \frac {\partial f} {\partial x})$$ This is ...
53 views

### Transform a variable's exponent from an exact rational to an inexact decimal

here is a little problem I could not find a solution for. I have a variable with an exponent represented as a fraction, for example, var = a^(39/106) Now I ...
53 views

### Using Neumann boundary conditions

I had a semi-related physics problem I needed to solve analytically (which I have already done), but I am now curious how I would go about numerically solving the entire system in Mathematica. ...
72 views

### Numerical derivative from data points

I want to take the second derivative of a set of data points (at the point $x = 0$). Let's assume that this set looks like that ...
98 views

### Mathematica Precisions vs Doubles in C/C++

I'm having a bit of an issue regarding numerical precision and I'm not sure how to deal with it. I have a certain randomly generated matrix, say $M$, that I wish to compute the eigenvalues. The ...
34 views

### FindMinimum step size too small

I'm running a simulation of an electromagnetic system using Radia, an external code that is run from Mathematica. I want to use FindMinimum to determine some ...
54 views

### Accuracy limitations of singular value decomposition?

in the process of working on a physics problem I have found the need to use the singular value decomposition function built into Mathematica. I have encountered what seem to be limitations to the ...
43 views

### Problems with numerical solution of differential equation

I'm trying to obtain a numerical solution for my differential equation. But i have the following mistake: Encountered non-numerical value for a derivative at z == 0. Can somebody help with that? ...
466 views

### Problem with FindRoot applied to functions

I am having difficulty with the error "is not a list of numbers with dimensions..." when using FindRoot (and other numerical routines in Mathematica) to solve equations numerically when the argument ...
342 views

### How to calculate accurate answer in Mathematica?

I accidentally discovered for myself, that Mathematica outputs inaccurate answer. For instance, if I take $\sin(2 \cdot \pi \cdot 0.5) = 0$, then in Mathematica it is: But if I calculate it on ...
813 views

### Why can't I change the value of MaxRecursion in NIntegrate when integrating BesselJ?

Bug introduced in 8.0.4 or earlier and persists through 10.4. I am trying to evaluate this integral numerically $$\int_0^{\infty } J_0(q R) \tanh(q) \, \mathrm{d}q$$ for large values of $R$. ...
55 views

### Precision in calculation [duplicate]

I am writing some code to demonstrate the effect of the number of significant figures a coefficient has on the solution of a nonlinear equation. I define the coefficient as follows: ...
91 views

### How to find the eigenvalues of a custom operator using NDEigensystem? [closed]

I would like to solve a Hamiltonian presented by a 2x2 matrix. Hamiltonian is given by: ...
114 views

### How can I solve a Hamiltonian with numerical methods?

Hamiltonian in terms of two level atom's operator (0 is ground state and 1 is excited state) which are 2*2 matrices and cavity modes are given by $a$ and $a^\dagger$. Rest of the parameters are ...
41 views

### Difficulty in replacing variables with list of variables for a function for FindMaximum application

FindMaximum gives incorrect answer when I redefine a function by changing its arguments from variables to a list of variables. The code goes as follows ...
58 views

Given $r = 0.06;\quad \theta = 105;\quad \kappa = 1;\quad x_0 = 100;\quad K = 100;\quad \sigma = 0.10;\quad T = 0.25;$ Define $\nu = -\kappa/\sigma^2 - 0.5;\quad p = \kappa*\theta/\sigma;\quad q = ... 0answers 52 views ### Solving a Volterra type (second) integral I am trying to numerically solve this Volterra type integral equation. The equation I'm plugging in is a simplified version of We will take$H(\eta')$and$q(\eta)$to be 1 for now.$\mu$is = ... 2answers 90 views ### How to find the integrand singularity points when having NIntegrate::slwcon: In order to calculate the closed area of the curve below defined by parametric equation curve02, ... 1answer 43 views ### My NIntegrate expression returns a wildly inaccurate value I am trying to integrate a function using NIntegrate: ... 1answer 90 views ### Results of ArgMax as a function of a parameter with InterpolatingFunctions I would like to obtain a function and its derivatives, where the function is defined as the solution to a maximization problem. The obvious approach ... 0answers 41 views ### EvaluationMonitor and variables with indices + subscripts I have encountered the following problem while using EvaluationMonitor with NMinimize: variables that have both a subscript and an index, e.g. Subscript[x,y][1] do ... 3answers 1k views ### Funny behaviour when plotting a polynomial of high degree and large coefficients I am trying to plot a polynomial of degree$29$on the domain$[0,1]$, with fairly large coefficients: ... 1answer 96 views ### Funny behavior when computing dot product of coefficients with high-order polynomials I have a similar problem to Funny behaviour when plotting a polynomial of high degree and large coefficients. However, the thing being evaluated is not just a polynomial but a dot product of some ... 1answer 135 views ### A weird issue with Interval[$MaxNumber]

From the Interval documentation: For approximate machine- or arbitrary-precision numbers x, Interval[x] yields an interval reflecting the uncertainty in x. ...
114 views

### Numerical approximation using trapezoidal formula [closed]

I have bumped into a problem, that I cannot solve. I have to approximate the value of ln3 using a composite trapezoidal formula, so that the error should be within (10)^-3! How can it be solved?
5k views

### How can I differentiate numerically?

Mathematica has two ways to integrate: Integrate and NIntegrate. But what about D? ...
4k views

### Numerically solving Helmholtz equation in 2D for arbitrary shapes

I would like to solve the Helmholtz equation with dirichlet boundary conditions in 2 dimensions for an arbitrary shape. (for a qualitative comparison of the eigenstates to periodic orbits in the ...
249 views

### How to find the next root larger than a specified value, numerically?

I would want to have a general-purpose, reasonably robust method of finding the next numerical root above a specific value of x. I'm stumped by the fact ...
149 views

### Errors Solving Elliptic PDES with FEM

I am trying to solve the equation below governing transversely isotropic plane strain in cartesian coordinates with the given boundary conditions based on code found here using Mathematica 10.1 on OSX ...
67 views

### strange FullSimplify result, why zero? [duplicate]

This came up looking at this How to speed up calculation of this equation (FindRoot). Is there some sense to why FullSimplify gives zero here? ...
671 views

### How to work with Experimental`NumericalFunction?

This question is intimately connected with previous one: "How to create internally optimized expression for computing with high WorkingPrecision?" Oleksandr R. correctly states in the comment: A ...
120 views

### Solving a nonlinear systems of coupled differential equations with boundary conditions

I am trying to solve the following systems of coupled differential equations with boundary conditions (BC) at $0$ and at $∞$ : ...
614 views

### How to remove duplicates from set of machine precision 2D points?

I have a set of 2D points with machine precision coordinates. I need to remove all duplicates. Performance is important. This is the most obvious fast solution: ...
203 views

### Breaking out of NDSolve

I am solving a coupled set of differential equations with NDSolve for 6 unknown functions of time. At a certain point in time, the system hits a singular point ...
532 views

### Symbolic derivatives are being calculated numerically

Just found the following while debugging a problem. Mathematica is calculating the derivative of IntegerPart[x] in some odd way: ...
### What is the fastest way to compute digits of $\pi$ using Mathematica?
There are a lot of ways to calculate digits of $\pi$ using Mathematica. The most naïve way I can think of is N[π, 100000000] Of course, there are a lot of fast ...
How to evaluate numerically $e^{-4 \cdotp 10^{35}}$ in the form $0,a_1a_2...\times 10^{-n}$ ...