# Tagged Questions

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

533 views

### NDSolve and memory usage

After some googling, i've found similar problems around, but didn't find a 100% satisfactory answer, so let me ask here: I'd like to solve a 1+1 problem using the method of lines. In spherical ...
130 views
+50

### How do I numerically evaluate and plot the Fabius function?

The Fabius function is a well-known example in analysis of a non-analytic function that is infinitely differentiable. I want to be able to numerically evaluate the function for any real argument, as ...
57 views

### Underflow occurring in computation

I've got an "Underflow occurred in computation" problem. Here's a simplified version of the code: ...
56 views

### Rationalize error

The docs state that "Rationalize[x,dx] yields the rational number with smallest denominator that lies within dx of x." However, testing this out it appears to be false. ...
63 views

### A simple syntax does not work

The code below does not work. Can anyone tell me why? Thanks! ...
51 views

### NSolve and FindRoot failing to evaluate

So I am integrating a Piecewise function and then using NSolve to find out where the limits of integration lie to satisfy an ...
254 views

### Incorrect numerical derivative of function that uses FindRoot

I am trying to plot the derivative of function g[x] below where g[x] is defined as the root of another equation. However, I am ...
49 views

### Optimization: Area of solvable constraints

I need some support with the following problem: In a polar-type problem, I hand over a list of variables rlist and a numerical optimization function (e.g. ...
419 views

### Confused by (apparent) inconsistent precision

$$e^{\pi \sqrt{163}} \approx 262537412640768743.99999999999925$$ E^(Pi Sqrt[163.0]) N[E^(Pi Sqrt[163.0]), 35] NumberForm[E^(Pi Sqrt[163.]), 35] returns <...
538 views

### A problem about function N

Toady,I have a problem about N,described as below: For example N[1/3, 5] (* ==> 0.33333*) and ...
50 views

### Error “Summand (or its derivative)…is not numerical at point m = -85.” on a simple sum

I'm a beginner on mathematica.. I'm trying to calculate a simple sum of a function, ...
37 views

### Why FinancialDerivative fails for the Spread case?

According to the documentation center for FinancialDerivative in version 10.4, when there are multi assets, we still may use ...
57 views

### How can I make NIntegrate aware of a singularity along a curve, e.g. a circle in a 3D integral?

I am having some trouble trying to get Mathematica to do a numerical integral over three dimensions which contains a singularity of dimension 1, and I would like some pointers to solid resources on ...
82 views

### Why do these calculations 'stop'? [duplicate]

Question 1: If I change guess to a integer, for example guess = 1 then ListPlot already stops at $n=50$. This seems strange to me, any ideas on why this happens? ...
77 views

### Can I use operators of the form $\frac{d^2}{dx^2}+i\frac{d}{dx}$ inside NDEigensystem?

I am currently trying to find the eigenfunctions of Hamiltonians of the form $\hat H=\frac12 \hat p^2 +a\hat p +f(\hat x)$, and I thought I would give NDEigensystem ...
35 views

### Changing variable in numerical solution

I solved numerically the differential equation: ...
58 views

### Proper way to create plot of equation with parameter solutions

for example I am trying to execute this code: ...
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 ...
180 views

### How to implement custom NIntegrate integration strategies?

How can new integration strategies algorithms be used with NIntegrate? This is a different type of extension than the extensions with new integration rules, as ...
56 views

### What does it mean that “there are no significant digits to display”? [closed]

So I substitued with the following values in my function T(x,n) and it gave me this red box with the value in the picture. When I hover over it, it tells me that there are no significant digits to ...
42 views

### Numerical derivative step size

I am trying to perform a numerical derivative of some function using ND. I want to know if there is a way to set the step size of differentiation to the specific ...
50 views

### Chains of approximate numeric equalities

Mathematica considers two numbers equal if "at most their last seven binary digits" differ. For example: ...
95 views

### difference between FullSimplify and Simplify

I have a problem to dinstinguish the following two mathematica codes, the only difference is the first use FullSimplify and the second is Simplify. but the results are totally different. what is wrong,...
82 views

### Using Associations and Pattern matching in numerical functions possibly broken

It looks like the very young feature of pattern matching (/replacing) within Associations (http://mathematica.stackexchange.com/a/119542/6804), with or without ...
301 views

### Numerical comparisons of matrices

I have a matrix which should be equal to a null matrix. However due to the numerical precision, a brutal equality test with a matrix initialized with zeros does not work. How should I perform the ...
76 views

### Finding and plotting a parametric solution to a complicated equation (transcendental, log-polynomial)

I am trying (desperately) to find a way to solve a transcendental equation whose solution $x$ depends on non-numerical parameters $a$ and $b$. And then to produce a ...
46 views

### NSolve and domain specifications

I am using NSolve to find roots to a system of polynomials that describe some chemical reactions. However, I am seeing some odd behavior when I restrict the domain. First, the basic setup: ...
97 views

### Union sorting after ignoring some digits

I have a list with its bellow elements: {-0.7071067811865476, -0.7071067811865475, 0.7071067811865475, 0.7071067811865476} If I use ...
2k 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 ...
96 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 ...
45 views

### How can I do numerical calculation directly without any symbolic calculation? [duplicate]

Here I define a set of functions: ...
138 views

### Machine-Precision and Arbitrary Precision [closed]

What is meant by a machine number in the Mathematica documentation? What is the difference between machine-precision and fixed-point precision? What is arbitrary precision?
54 views

### Evaluation of Element?

What is the Mathematica reasoning behind the result of the first two elements on the second row of the following table? ...
202 views

I bought the Home Edition of Mathematica online 0.5 G of memory and costs \$150 per year. When I calculated the median of outputs from$[0,1]$with an interval of$.000001$I ended up with the ... 2answers 133 views ### Multiplication non-deterministic? I have two vectors of 134 elements each ($mu$, and$gt$).$mu$contains Integers, and$gt$contains machine precision Reals. I execute the following simple expression multiple times without changing ... 0answers 60 views ### Numerically parameterize portion of$F[x,y]==0$[duplicate] I have a relatively complicated function of two variables F[x,y] whose zero locus contains a number of intersecting paths in the$x,y$-plane. A problem I've been ... 0answers 271 views ### Problem with NDSolve in Mathematica 9 / 10 I'm having trouble by solving the following differential equation in Mathematica 9 and 10, where the code works fine in version 7: ... 2answers 909 views ### Numerical solution of Bessel-like equation using NDSolve I need to calculate solution of Bessel-like equation having general form:$\frac{d^2F}{dr^2}+\frac{1}{r}\frac{dF}{dr}+Q(r)F(r)=0$. Problems come from the points near$r=0$leading to numeric errors. ... 0answers 31 views ### Copy-pasting a floating point number [duplicate] Here is a behavior of the Mathematica front end which confuses me. Type N[Sqrt[2]] The displayed output is 1.41421 ... 0answers 184 views ### Is manual adjustment of AccuracyGoal and PrecisionGoal useless? This is a problem confusing me for years. AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to ... 1answer 102 views ### Understanding difference between NIntegrate result and home-cooked Simpson's rule In this question I am asking about the different results I get between NIntegrate-ing a function of two variables vs. "doing it myself" with my own implementation ... 0answers 58 views ### Numerical fitting trajectory to model that has NDSolve I have a model which describes the motion of an object on a plane. ... 2answers 162 views ### Accuracy and WorkingPrecision Observe that ... 1answer 120 views ### How to calculate this complex expression? I have a complex expression as follows, ... 4answers 298 views ### Does Mathematica have an equivalent of C's nextafter? In C (and many other programming languages), there is a function double nextafter(double x, double y) which takes two (IEEE 754) floating-point numbers and ... 2answers 85 views ### Determining the value at which a function becomes non-real or undefined If I have a function$f(x)$that I only know numerically and that returns a real value for some range of values$-\infty < x \leq a$and complex values for$a < x < \infty$, how can I ... 1answer 104 views ### Using loops to draw multiple polygons and discretizing them I am trying to plot the first eigenvalue of the Laplacian operator with zero Dirichlet condition on following figure against decreasing values of$\varepsilon$. I used ... 1answer 60 views ### MachinePrecision versus$MachinePrecision in NDSolve

I'd like to understand why one of these inputs gives me an error and the other doesn't: ...
I'm interested in defining three input vectors: $L=\{L_{1}, \ldots, L_{N} \}$ $W=\{W_{1}, \ldots, W_{N} \}$ $Q=\{Q_{1}, \ldots, Q_{N} \}$ and I'm hoping to be able to input a number for each of ...