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

learn more… | top users | synonyms (1)

1
vote
0answers
18 views

Is MatrixExp[m,v] always faster than MatrixExp[m].v?

For non sparse matrix m, is MatrixExp[m,v] supposed to be faster than MatrixExp[m].v? This seems to be true only if m is purely real or imaginary. ...
2
votes
3answers
120 views

Numerical voodoo in mathematica?

So, I was doing some calculations in Mathematica, and came across the following paradox! (I may be exaggerating, but...) I wanted to solve the following equation: $3.33333*10^{-15} - 3.33333*10^{-15} ...
1
vote
0answers
33 views

\$MinNumber vs. \$MinMachineNumber [on hold]

I'm working on some code that is giving me a division by 0 error, but I don't think I'm dividing by any functions that could come out to be 0. At one point it was suggested that this could be caused ...
2
votes
0answers
58 views

Eigenvalues of large symmetric matrices

When I try to compute the eigenvalues of the adjacency matrix of a very large graph I get, what can be charitably described as, garbage. In particular, since the graph is four-regular, the eigenvalues ...
0
votes
1answer
60 views

Underflow occurring in computation

I've got an "Underflow occurred in computation" problem. Here's a simplified version of the code: ...
2
votes
0answers
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. ...
1
vote
0answers
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 ...
0
votes
0answers
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. ...
6
votes
1answer
284 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 ...
1
vote
1answer
51 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, ...
4
votes
0answers
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 ...
4
votes
1answer
64 views

A simple syntax does not work

The code below does not work. Can anyone tell me why? Thanks! ...
1
vote
1answer
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? ...
1
vote
0answers
35 views

Changing variable in numerical solution

I solved numerically the differential equation: ...
4
votes
1answer
78 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 ...
1
vote
1answer
58 views

Proper way to create plot of equation with parameter solutions

for example I am trying to execute this code: ...
0
votes
0answers
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 ...
1
vote
2answers
50 views

Chains of approximate numeric equalities

Mathematica considers two numbers equal if "at most their last seven binary digits" differ. For example: ...
0
votes
1answer
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 ...
2
votes
1answer
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,...
2
votes
1answer
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 ...
0
votes
2answers
79 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
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: ...
17
votes
1answer
181 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
145 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
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? ...
5
votes
1answer
205 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
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 ...
1
vote
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 ...
0
votes
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 ...
28
votes
2answers
484 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
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 ...
16
votes
0answers
185 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
58 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
87 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
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 ...
3
votes
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: ...
0
votes
1answer
34 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
75 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
164 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
96 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
59 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
252 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
84 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 ...