# Questions tagged [numerical-value]

Question relating numerical representations, operations and methods, including approximate results instead of exact symbolic results.

184 questions
Filter by
Sorted by
Tagged with
120 views

### Why does mathematica not recognize the equality of these two terms? [closed]

I have two expressions which I have analytically verified to be equivalent but when I check them numerically via mathematica I don't obtain numerical agreement. They are ...
340 views

### how to get single, and quad Precision out of Mathematica which match Fortran result

by default, if a number has decimal . after it, then Mathematica will do computation using machine Precision, which on my PC (intel hardware) running windows 7 64 ...
82 views

### Numerical Function

I want to animate a Point moving on an ellipse, but the angle I need to use is a numerical solution from an epression. How can I get mathematica to just take the value from the animated nummerical ...
53 views

### TrigExpand for numerical multiples of angles

After some calculations, Mathematica gives me a result which has in it a term Cos[2.x] (I cannot skip numerical computing, that's the reason for the ...
43 views

### Error caused by ThreeJSymbol

I do not understand what causes non-physical answer in my code although I have read about the error. I am also getting the following error, how could I fix the example error: "CompiledFunction::cfte:...
45 views

### Numerical Results with replacement rules [duplicate]

Why are the following outputs different? N[(x^2 + y^2) /. Thread[{x, y} -> {1., 1.}], 10] gives 2.. N[(1^2 + 1^2), 10] ...
123 views

### Get Finer Grid with respect to x using NDSolve in Mathematica

I use Mathematica NDSolve to numerically solve V(x,t) and export the numerical values of V(x,t) at each x and t into an external csv file. I find Mathematica only numerically give results with step ...
337 views

### How does NSolve find the roots to an equation?

I'm using NSolve to find the roots to a transcendental equation. For this, I need to specify a bounded region where roots are searched. What I want to know is how <...
68 views

### Optimising matrix calculation [closed]

I was calculating the elements of a matrix like this: ...
814 views

### Error and uncertainty propagation: Is using Precision/Accuracy a sound strategy?

Questions What are the available resources to deal with experimental error and uncertainty propagation in Mathematica? Given that Mathematica already uses linearized model of error propagation on ...
207 views

### Orthogonalize with a custom inner product

Bug introduced in 9.0 or earlier and fixed in 10.0 I was trying to define a custom inner product function for Orthogonalize, and have been getting some odd behaviour. Here's a MWE: I try to compute ...
62 views

### Evaluating expression with machine arithmetic gives wrong answer but evaluating with arbitrary precision works

I need to understand how Mathematica approximates symbolic numbers. I have an awful symbolic number to compute. When I do N[variable] Mathematica gives me <...
160 views

### Limit of a List

Is it possible to take the limit of a list instead of using the Limit method? I'll try to explain what I mean. I am generating a list of numbers that converge to some number. The generated numbers ...
82 views

### Why the data from Do-command disagree with the plot I get using them? [closed]

This is a question relevant to How to plot output data of Do-command? The Differential Equation at hand now is $\frac{d^2 f}{dx^2} + \frac{2}{x+0.1} \frac{df}{dx} = k(f)$ I give the code with the ...
242 views

### How to plot output data of Do-command?

The following in a simple numerical solution of the simple harmonic oscillator. ...
126 views

### Problem with FindRoot + NDSolve + InterpolatingFunctionDomain

I'm trying to find the root (po) of a complicated problem (where s is a parameter): First, I need to define some functions, which involve numerically solving a differential equation. ...
285 views

### How to solve the following set of equations to find values of a1, a2, and a3

i am new to Mathematica, Can some one kind enough to show me how to solve the following set of nonlinear equations to find a1, a2, and a3.. ...
40 views

### Numerical evaluation after Normal? [closed]

I'm interested in numerical evaluation thru substitution: a /. a -> 1 (*=> 1 *) However if I used Normal in the "pipe" —...
256 views

### How can one generate an open-ended sequence of low-discrepancy points in 3D?

I'd like a low-discrepancy sequence of points over a 3D-hypercube $[-1,1]^3$, but don't want to have to commit to a fixed number $n$ of points beforehand, that is just see how the numerical ...
102 views

### Numerical value of an expression with a uniform step size [closed]

I have a complex expression that is so difficult to separate its Real part from it Imaginary part. What I thought of doing is to get the numerical value of the Real and Imaginary part, Then I will use ...
463 views

### Specifying precision of a number in StringForm[]

I want to use StringForm to provide the headers to a table of numbers I have just calculated. Basically, I want the top row of spots in the table to have the form $D = x~~\text{(nm)}$, where x ...
286 views

### Visualizing the Schrödinger equation for dipole based interaction Hamiltonian

I want to evaluate and plot the solutions of coupled linear differential equations. For each time frame, I want to display the probability values (corresponding to mod square of these solutions), and ...
237 views

### Numerical Differentiation of a Numerical Integral

I am trying to evaluate the following expression numerically $$\frac{d^2}{dt^2}e^{-2t^2}\int_0^\infty\frac{\xi/\sqrt{2}}{\xi^{3/2}}e^{(-\xi^2/2-2\xi t))}$$ My code is as follows ...
104 views

### N[Product] and NProduct give different results

I have some trouble. I've been using finite product to study a certain function (see below). However, when I wanted to compute it precisely, I decided to use ...
110 views

### How to fix step size in do loop? [duplicate]

I apply the following command: Do[Print[var[u] = u], {u, -1, 1, 0.1}] It produces out put. But when i recall the value var[-0.4] as below: ...
322 views

### How to complete function which is not defined for all interval

I have a function testF22 like this ...
228 views

### Solving a complex equation

I try to solve a complicated equation. To do that, I write (excuse me, I could not copy paste in an appropriate way from the notebook) ; ...
129 views

### Numeric calculation with many digits

I try to calculate something like 1.569732312*Pi and by default mathematica returns something like 4.93146 (only 5 digits after floating point), but I believe there is much more digits, especially ...
115 views

### Why does this test yield True

I have this test implemented in my code, when I import a numeric matrix, which I thought would be bulletproof, but it's failing in this case: ...
82 views

### Plotting the Full width at half maximum as a function of a parameter

I have this function and I want to plot the FWHM of it as a function of the parameter "a", defined between 0 and 10. It should look like the picture attached. I also put the original equation in case ...
593 views

### Plot numerical solutions for a varying parameter

I would like to solve this equation $\log{\frac{a}{1 - a}} + b (1 - 2 a) = 0$ letting varying the parameter $b$ in $\lbrace 0,1,\ldots,20\rbrace$ and then plot the result. I am trying writing the ...
79 views

### Getting non-real answers when assuming variable is real when trying to numerically find maximum entropy distribution

I'm trying to find the maximum entropy distribution as such: Assuming[Element[l, Reals], NSolve[Sum[Exp[l i] i/Sum[Exp[l j], {j, 0, 100}], {i, 0, 100}] == 50,l]] ...
2k views

129 views

### Role of Accuracy in numerical evaluations, SplitBy vs GatherBy

This is a follow-up question to this question. I generated a list by substituting the results of a solve[] routine and set: ...
544 views

### Recognize physical constants?

Is there some way to ask Mathematica to recognize physical constants, such as 32 or 9.81 (gravitational acceleration, in different units, at Earth's surface)? I have in mind something like the "...
104 views

### Using Classifier with NearestNeighbors methods

I am using a Machine learning toolbox on mathematica. I have 8 classes. Training data: for each class, there 100 samples with size 160. I used this code. ...
91 views

### Maintaining working precision in my program

I am badly stuck with this program I am writing. I want output of program below to be precise up to 25 digits after decimal point. I am supplying all inputs with precision 25. But after each iteration ...
96 views

### How to calculate digits of Trott Constants?

How to calculate digits of numbers (Trott Constant) whose continued fraction representation is the same as the digits of its radix representation with Mathematica?
736 views

### GroupBy twice gives different results

Bug introduced in 7.0 or earlier and persisting through 11.1 It took me quite a lot of time to finally trace down to this strange output. I really don't know why. First, I create a list ...