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

learn more… | top users | synonyms (1)

1
vote
1answer
24 views

Chains of approximate numeric equalities

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

What does it mean that “there are no significant digits to display”?

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 ...
2
votes
1answer
71 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,...
2
votes
1answer
70 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 ...
0
votes
2answers
59 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 ...
1
vote
2answers
44 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: ...
17
votes
1answer
163 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 ...
0
votes
0answers
45 views
3
votes
1answer
127 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?
1
vote
1answer
53 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? ...
5
votes
1answer
198 views

Is there an alternate way to calculate beyond the memory limit of the home edition?

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 ...
3
votes
2answers
132 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 ...
1
vote
0answers
59 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 ...
0
votes
0answers
30 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 ...
24
votes
2answers
431 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 ...
3
votes
1answer
101 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 ...
16
votes
0answers
176 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 ...
0
votes
0answers
57 views

Numerical fitting trajectory to model that has NDSolve

I have a model which describes the motion of an object on a plane. ...
3
votes
1answer
120 views

How to calculate this complex expression?

I have a complex expression as follows, ...
1
vote
2answers
80 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 ...
2
votes
1answer
84 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 ...
3
votes
1answer
58 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: ...
0
votes
1answer
33 views

SetPrecision on a decimal gives imprecise result [duplicate]

I noticed that SetPrecision doesn't actually guarantee that my number is as precise as I want: ...
0
votes
0answers
31 views

Use “FindFit” for Multi-variable Polynomial Fit

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 ...
3
votes
1answer
74 views

Implementing the Cimmino method [closed]

What am I doing wrong? I am trying to implement the Cimmino method, an iterative method for the solution of linear algebraic systems. The final output should be a vector. Here is a description of the ...
15
votes
0answers
161 views

FindMinimum doesn't increase step size when necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated ...
0
votes
1answer
44 views

Evaluating Root forms in a Table [closed]

When I put a Root form in table, the parameters of the Root form don't evaluate. I don't know how I can indexed values substituted into root form in the table to get have numeric output. ...
2
votes
1answer
91 views

Round off in Mathematica Built-in functions [duplicate]

Is there a way to force Mathematica to use its Built-in functions instead basic functions? For instance, the Hypergeometric1F1[a,b,x] function has a exponential form when its firsts parameters are ...
0
votes
1answer
58 views

Solution of Coupled second-order ODEs and plot the diagram

We have two second-order Coupled differential equations as the followings: $$\left\{\begin{array}{lr} \displaystyle \frac{{{d^2}{y_1}}}{{d{x^2}}} = \{ \frac{{\sqrt {\frac{{1 - {\varepsilon ^2}}}{{{{(...
0
votes
2answers
72 views

Wrong numerical results from LegendreP

{Cos[Pi/180] // N, LegendreP[46, 0.9998476951563913`], LegendreP[46, Cos[Pi/180]] // N} give ...
10
votes
1answer
247 views

Vastly incorrect answers obtained by increasing WorkingPrecision with modified Bessel functions

Bug introduced in 7.0 or earlier and persisting through 10.4.1 This is a follow-up to this question regarding numerical instabilities occurring with modified Bessel functions. In trying to explore J....
9
votes
3answers
1k views

Why does N[1.000 01, 10] return 1.00001, but N[1.000 001, 10] returns only 1.?

Why is it so? When I ask for N[1.00001, 10] I get quite reasonably 1.00001 But when I ask for ...
2
votes
1answer
79 views

Why does NDSolve and NIntegrate not give the same result? [closed]

I have plotted solution of two equivalent equations one in Integral form (right chart) the other in Differential form (left chart) using NDSolve and NIntegrate but they give me completely different ...
5
votes
2answers
262 views

Strange phenomenon occurring in analytic integration result involving Bessel functions

For the following integral, Integrate[x^2 Exp[-a x^2 - b x^4], {x, -∞, ∞}, Assumptions -> {a > 0, b > 0}] Mathematica gives the following analytic ...
1
vote
1answer
56 views

How can use Table for two functions obtained from NDSolve? [closed]

I have obtained a numerical solution using NDSolve for two functions a(x) and b(x). how do I use Table to make a list of a(x) vs b(x) values. is it simply Table[{a(x),b(x)},{x,0,100}] or should I use ...
10
votes
2answers
745 views

Why is Mathematica destroying this graph?

Here I have a picture of a function I graphed: reg[x_,y_]:=(x^2+y^2)Cos[4ArcTan[y/x]]; Plot3D[reg[x,y],{x,-2,2},{y,-2,2},AxesLabel->Automatic] And here is ...
0
votes
1answer
47 views

Find numerical solution to this system of DE

I am trying to solve this system $$\left( \begin{array}{ccccc} 2 k & -k & 0 & 0 & 0 \\ -k & 2 k & -k & 0 & 0 \\ 0 & -k & 2 k & -k & 0 \\ 0 & 0 &...
1
vote
0answers
47 views

High Precision Plots of Eisenstein Series [closed]

When plotting the Eisenstein Series (great information here Eisenstein Series in Mathematica?) you observe highly non-trivial branch cut behavior close to the real axis. This makes the numerics break ...
2
votes
2answers
54 views

How do I overcome an Overflow?

I'm trying to calculate entropies for an absolutely giant system by counting states, and this means I have to use some obscenely large numbers. I'm running ...
0
votes
1answer
59 views

Unexpected result: Numerical and analytical results do not match! [closed]

I am calculating the eigenvalues and eigenvectors of a matrix. This is my code: ...
0
votes
0answers
36 views

Is it possible to get the error estimates of predicted values computed by FindMinimum using the Levenberg Marquardt method?

I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). This residual function is computed from experimental data and the solution ...
1
vote
1answer
145 views

NDSolve with coupled ODE's and unknown singularities

I have two coupled ODEs that I am trying to solve numerically. It appears that there is a singularity in the solution to the equations which I am unsure how to get past. Both functions $\alpha$ and $\...
3
votes
0answers
85 views

Computation of a Fresnel Diffraction pattern with Discrete Hankel Transform

In the next link: Computation of Hankel Transform using FFT (Fourier) Rainer implemented a great solution given in the next reference: Manuel Guizar-Sicairos and Julio C. Gutiérrez-Vega, "Computation ...
3
votes
2answers
52 views

Numerically solving coupled ODE's with a parameter as initial condition

i'm currently trying to numerically solve a set of coupled ODE's to obtain the functions p(r), h(r) and m(r) in the range of r1 <= r <= r2 with initial conditions m(r1)=a=const and p(r1)=b=const....
0
votes
0answers
51 views

Eigenelements of conductivity equation

I am trying to calculate the eigenvalues and eigenfunctions of the conductivity equation in an annulus. In particular I am looking for $(\lambda, u)$ s.t. $$ \begin{cases} \Delta u = \lambda u & \...
2
votes
0answers
56 views

Why can Mathematica compute numerical sums more efficiently when they are written as matrix operations?

Let $f(n)$ and $K(n,m)$ be functions such that the double sum, which we wish to evaluate numerically, $$ \sum_{n=1}^a \sum_{m=1}^a f(n) f(m) K(n,m) $$ exists when $a$ is some large positive number. I ...
1
vote
2answers
111 views

Numerical integration does excessive coarse-graining?

I am trying to perform numerically the following integral $$\int_0^8\text{d}x\,\text{Re}\left[\frac{e^{-\frac{a^2}{2}-\frac{x^2}{2}} x^4 \sin (b x)\left(e^{-i c x} \text{erfc}\left(\frac{-c +i x }{\...
3
votes
0answers
80 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 ...
5
votes
1answer
75 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$. ...
1
vote
2answers
97 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: ...