# Questions tagged [numerics]

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

1,590 questions
Filter by
Sorted by
Tagged with
350 views

### Numerical problems with calculation of function

I have a problem with a calculation which I try to do with Mathematica (8.0.1). I have the following function which describes a cone (with half opening angle theta)...
11k views

### About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
759 views

### Dr. StrangeNumbers or: How I Learned to Stop Worrying and Love Floating Point Arithmetic

The following is the program. ...
4k views

### Finding a fit to a multi-dimensioned function

I have a model function $f:\mathbb{R}^2\rightarrow\mathbb{R}^2$, and a bunch of data points for which I'd like Mathematica to fit for me. Unfortunately FindFit ...
996 views

### Output of NonlinearModelFit differs from the correct result

I'm having a bad time dealing with the NonlinearModelFit in Mathematica 8, since the result given is a bit imprecise. An example is given on potential regression, ...
412 views

I was wondering how to approximate or tabulate values for this numeric approximation: It is the following: The confusing part is how to implement the subscripts in mathematica. $y_{i+1} = (t_i - y_i)... 2answers 6k views ### Numerically obtaining the inverse Laplace transform of data I have been using several Mathematica packages to do numerical inverse Laplace transforms on known (expressible in closed form) expressions,$\tilde{f}(s)$. I am now being confronted with the more ... 3answers 6k views ### Solving a Volterra integral equation numerically I would like to solve for$P(t)$, in Mathematica, a Volterra integral equation of the 2nd kind. It is: $$P(t) = R_0(t) + \int_0^t P(t') R_0(t-t')dt'$$ I know the function$R_0$and would ... 2answers 1k views ### Number of iterations in NSolve In Excel's solver, one can define how many iterations are to be done, to one's liking. I am wondering if this is possible to do with NSolve in Mathematica? Code ... 6answers 10k views ### Finding real roots of negative numbers (for example,$\sqrt[3]{-8}$) Say I want to quickly calculate$\sqrt[3]{-8}$, to which the most obvious solution is$-2$. When I input$\sqrt[3]{-8}$or Power[-8, 3^-1], Mathematica gives the ... 5answers 4k views ### Numerical underflow for a scaled error function I calculate a scaled error function defined as f[x_] := Erfc[x]*Exp[x^2] but it can not calculate f[30000.]. ... 6answers 4k views ### Annoying display truncation of numerical results I have a lot of data to inspect. An example of a number in my program is 123.189094 This gets displayed as 123.189 ... 1answer 2k views ### Handling failed FindRoot calls I want to handle FindRoot calls which did not converge (e.g "thrown" error message FindRoot::cvmit) ... 2answers 1k views ### Obtain approximate Hessian using FindMinimum According to the documentation, when FindMinimum is told to use the method "QuasiNewton" on a unconstrained problem, it uses the ... 2answers 406 views ### Wrong computation with N I was trying to solve this problem using Mathematica 8.04. I did this: ... 3answers 2k 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: ... 2answers 3k views ### Meaning of backtick in floating-point literal If I compute, say, 1/3//N, Mathematica displays 0.333333 as the result. When I copy that output to use elsewhere, the paste ... 3answers 481 views ### How to cancel floating point factors? I am currently having problems with some floating points. I have a function, which gives as an intermediate result (for example) ... 1answer 1k views ### Numerics with Mathematica From time to time, I would like to use Mathematica purely numerically, e.g., plotting a function which is defined as an integral which cannot be solve analytically or a solution of a differential ... 4answers 39k views ### Why round to even integers? According to the Mathematica help: Round rounds numbers of the form x.5 toward the nearest even integer. For example: Round[{0.5, 1.5, 2.5, 3.5, 4.5}] gives ... 2answers 2k views ### Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function? I have a black-box multiargument multiparametric function of the type SRD[dataPoint_List,params_List] which accepts experimental data along with the parameters of ... 2answers 2k views ### RootSearch for complex or multiple equations First the background. I'm trying to solve for the roots of a rather messy complex equation. This is not the exact equation, but it's a decent (simpler) stand in: ... 1answer 1k views ### Is there any automatic differentiation package? I'm wondering if an automatic differentiation package exists for Mathematica. This is what I mean by automatic differentiation. 1answer 4k views ### Kramers-Kronig relations I am trying to calculate the change of the refractive index from the change of the absorption coefficient using the Kramers-Kronig relations, in Mathematica. ... 1answer 5k views ### Parallelizing Numerical Integration in Mathematica I have an ugly, six dimensional function that I need to integrate numerically. It works, but it currently take twelve hours to complete the calculation. Is there any good way to parallelize the ... 2answers 795 views ### How to apply restrictions to the “integrated” variable, when using NDSolve? I have to integrate an energy along a path. I know the energy at the "beginning" of the path (energy[0]), and I can determine the energy change (gain and loss) ... 1answer 403 views ### How to fix errors in Gram-Schmidt process when using random vectors? I first make a function to get a random vector on unit sphere in a swath around the equator. That is what the parameter$\gamma$controls; if$\gamma = 1/2$, the vectors can be chosen anywhere on the ... 1answer 584 views ### Why is MainEvaluate being used when LinearSolve can be compiled? According to this question LinearSolve can be compiled. However, CompilePrint[] shows a call to ... 1answer 2k views ### MaxSteps and Computing time issue for Solving Differential equation in Mathematica When we solve differential equation numerically using NDSolve then sometimes we get error like NDSolve::mxst: Maximum steps reached According to Mathematica docs ... 1answer 1k views ### Using Mathematica to help to determine the consistency of and numerically solve systems of non-linear equations The formal problem The question I am about to ask is applicable to many scientific and engineering problems. In short, I am bout to ask for pointers and practical advice for Mathematica beginners who ... 3answers 659 views ### What determines the value of$MaxNumber?

What determines the value of $MaxNumber?$MaxNumber 1.233433712981650*10^323228458 ...
2k 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 ...
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 ...
682 views

### How to guarantee that NDSolve correctly detects abrupt changes in parameters?

When using NDSolve, I often have parameters that, in most of their domain, have a constant or null variation, but that suffer from abrupt variations on a very small ...
3k views

### Combined numerical minimization and maximization

I want to numerically calculate the maximum of a function defined by the minimization of another function, like the following: ...
5k 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 ...
3k views

### Adaptive sampling for slow to compute functions in 2D

EDIT: Although I have posted an answer based on my current progress, this in incomplete. Please see the "open issues" section in the answer. Most plotting functions in Mathematica adjust the ...
740 views

### Is there an NDSolve`ProcessEquations analog for NIntegrate?

NDSolve has an interface for repeatedly solving an equation with different initial conditions without having to analyze the equation and set up the solving ...
5k views

### Can Mathematica propose an exact value based on an approximate one?

Sometimes, I use Mathematica to do some hypothesis on homework to make the question easier. For instance, when I have to compute big sums when $n\to\infty$ and Mathematica can't give the exact answer, ...