# Tagged Questions

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

299 views

633 views

281 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 ...
672 views

### Why is Poisson Random Deviate Generation so slow?

I am generating Poisson deviates for some numerical work. Mathematica 9.0.1 is very slow in generating these random numbers, as can be seen below. ...
400 views

### Bug: Wrong results from NSolve on coupled polynomials. WorkingPrecision->Automatic fails

OP UPDATE: I received an email from WR on 1-18-2016: "...It does appear that the NSolve function is not behaving properly in this case and I have forwarded an incident report to our developers with ...
141 views

### Chopping matrix elements, real or imaginary

An undesired shape of a matrix has the following form: which is created by ...
1k views

### why there is a small imaginary part [closed]

I encountered a problem. I have a eigenvector eigvsI[1] ...
7k views

### Understanding differences between Maple and Mathematica in examples picked by Maplesoft

I am reading the document How Maple Compares to Mathematica. On page 15 there is an example where Mathematica produces wrong results. Does anybody know why? MAPLE: MATHEMATICA: Also on page 17 ...
2k views

### How to use NDSolve to track equilibrium?

I am looking for an extension of NDSolve where integration runs until certain variables are settled at an equilibrium. Now I have a working solution in my sleeves ...
3k views

### How to discretize a nonlinear PDE fast?

I wish to numerically solve the following PDE. Although there are some complete discussions for solving PDEs in tutorial/NDSolvePDE, there is no hint for the nonlinear case by discretization. Thus, I ...
483 views

### How to implement custom integration rules for use by NIntegrate?

How can NIntegrate be extended with custom implementation of integration rules? This answer of the question "Monte Carlo integration with random numbers generated ...
473 views

### How to improve performance of BesselJ to the level of GSL?

Consider the following code: zs = N /@ Range[0, 12, 10^-5]; AbsoluteTiming[bessels = BesselJ[1, #] & /@ zs;] Length @ zs I've tried to measure only ...
2k views

### AccuracyGoal, PrecisionGoal, WorkingPrecision and NDSolve

I'm trying to understand exactly what WorkingPrecision, AccuracyGoal and PrecisionGoal mean ...
2k views

Finding a global minimum for this problem (non-linear optimization by the Nelder-Mead downhill simplex method) may not be possible, but by finding local minimum, I am expecting the value of the ...
1k views

### Implement the Bisection algorithm elegantly and easily

Description: Rencently, I have finished my course Numerical Analysis, so I'd like to implement many algorithm that I have learned from that course.By this practice, I hope that I can improve my ...
429 views

### Very different results from evaluating same expression with different precisions

When I evalute the following expression, ...
1k views

### Strategies to avoid LessEqual::nord in NMinimize?

When using NMinimize on functions with complex intermediate expressions (but a real end result), quite often one gets the error ...
141 views

### Derivation of numerical scheme for linear transport equation on a variable stencil

The question is about automatica derivation of coefficients of numerical scheme on a variable stencil. So, lets consider 1d transport equation $$(1)\qquad u_t+u_x=0.$$ To ...
2k views

750 views

### Finding differences between Pi with varying number of decimals

I have the following code In[32]:= N[Pi, 2] Out[32]= 3.1 In[33]:= N[Pi, 1] Out[33]= 3. In[34]:= N[Pi, 2] - N[Pi, 1] Out[34]= 0.*10^-1 Why can't Mathematica ...
147 views

### Why don't 1. (0. + a) or (0. + 1. a) simplify?

I'm handling some mixed-numeric-analytic expressions, and I feel I'm missing some subtleties of how Mathematica handles simplification of such expressions. In particular, I was initially puzzled by ...
697 views

### Semidefinite Programming

I want to solve a numerical optimization problem using semi-definite programming. Is there a package or add-on that equips mathematica with this functionality?
83 views

### N not behaving in the way I expected it would

I'm trying to use the N function to find the percent error between a function and a rounded value of that function. The code looks something like this. ...