Questions tagged [numerical-value]
Question relating numerical representations, operations and methods, including approximate results instead of exact symbolic results.
358
questions
0
votes
2
answers
95
views
Why can't NSolve find values that FindInstance can?
I am trying to solve for \[Epsilon], given three input paramters n, x and ...
5
votes
1
answer
168
views
Why is Around omitted when the uncertainty is zero?
I have a list of values with errors and I use Around[x, dx]. Some of those values have an error of zero though. Mathematica removes the ...
0
votes
0
answers
64
views
NSolve can't solve a system of 2 equations with 2 unknowns
I've been trying to solve a system of 2 equations with 2 unknowns using NSolve. But It's been too slow. I waited for more then an hour without any results.
The code is:
...
0
votes
0
answers
31
views
How to treat small numbers in order to gain efficiency and precision in neural network algorithm?
Unfortunately I won't be able to provide a MWE, as it would be too big and complex, and this question will be based on pure semantics, basically (and I understand if this is impossible to answer in ...
0
votes
1
answer
52
views
NMinimze cant find points that satisfy constraints
NMinimize cant find solutions for a function which clearly has one. Setting a working precision resulted in some output, however with error messages about tolerance and precision.
Heres my code. The ...
1
vote
0
answers
62
views
Numerical Error using compile
I'm trying to compile a function and I'm running into the following error
CompiledFunction::cfne : Numerical error encountered; proceeding with uncompiled evaluation.
I think I have succeeded in ...
0
votes
1
answer
107
views
Performance improvements using Table and Compile
I'm converting a code from MatLab to Mathematica. It takes MatLab less than a second to compute it while its more than ten minutes in Mathematica. I was hoping to improve the performance.
Here's a ...
-2
votes
1
answer
65
views
How to make faster of a code containing more iteration point? [closed]
I am trying to evaluate a code of the Power Series Solution method to get the results. Also, the time of evaluation depends on the parameters I am using. When the iteration point is 50, 60, or 80, it ...
1
vote
2
answers
160
views
How to make faster of a code containing more iteration points?
I am trying to evaluate a code of the Power Series Solution method to get the results. Also, the time of evaluation depends on the parameters I am using. When the iteration point is 50, 60, or 80, it ...
0
votes
1
answer
116
views
How to minimize numerical error in the code while solving the system of ODEs
I just want to ask in the graph of the code mentioned in the link, while plotting u from {-0.0001,y,0.0001}, the jump is coming because of the numerical error u1-u2. Can anyone please tell me, how to ...
1
vote
2
answers
141
views
Finding closed form representations of floating point numbers?
Is there a trick to automatically recognize that ${-0.5771,1.2280}$ are approximately equal to {-EulerGamma, Log[2 + Sqrt[2]]}?
These were obtained by using ...
0
votes
1
answer
46
views
Proceeding integral or summation calculation with no explicitly designated quantities, but instead with an abstract 'n' quantities
Could someone kindly tell me how to calculate formulas such as integral or summation with no explicitly designated algebra quantities as derivatives or summands, but the abstract ' n' quantities ...
0
votes
0
answers
40
views
Nested NIntegrate with Matrix Exponential
I wish to perform a numerical integration which involves a matrix exponential. Here's the following code
...
1
vote
1
answer
71
views
a problem in numerical integration in Mathematica
I am trying to numerically compute an integral of the following type in Mathematica. I can show that this integral can be computed analytically. Still, I want to make sure Mathematica can also give me ...
1
vote
0
answers
51
views
Increase computation speed for nested integral equations
I want to numerically solve these two nested integral equations
$$q(J_0,T)=\int_{-\infty}^{\infty} \frac{1}{\sqrt{2\pi}}e^{-\frac{z^2}{2}}\,\mbox{tanh}^2\left(\frac{z\sqrt{q(J_0,T)}+J_0 m(J_0,T)}{T}\...
0
votes
0
answers
32
views
Solving system of ODEs dropping one component of general solution
Question:
I want to solve the following system of differential equations:
...
0
votes
0
answers
46
views
Identifying the parameter that flips the solution
I have solved a system of ODEs numerically. As the plot shows, the solution SolJx is positive for the parameters I have chosen. However, if you decrease (more ...
0
votes
0
answers
83
views
Error in numerical integration using Wolfram Mathematica
I hope you are doing well.
I am having serious problems while calculating a numerical integral in Wolfram Mathematica, as the following error messages appear:
1- "Numerical integration converging ...
1
vote
0
answers
73
views
Numerical solution system of ODEs
I want to solve the following system of ODEs with four boundary conditions:
...
1
vote
1
answer
130
views
How to numerically solve differential equations with singularities?
I wish to solve a differential equation numerically. As an example, I tried solving Hypergeometric differential equation
...
1
vote
1
answer
57
views
Value given by NIntegrate is double of Integrate function
I am performing a calculation where the result of NIntegrate and Integrate is different. They differ by factor of 2. Can someone tell what is the reason and how to make the NIntegrate value right?,
<...
2
votes
2
answers
174
views
Solving complex equation numerically
I'm trying to solve the following equation for $z$ for a set of given complex values of $a$ and for fixed $b$ (without providing any initial guess value(s)):
$2^{iz}~\Gamma\left(\dfrac{iz+b}{2}+1\...
3
votes
2
answers
357
views
How can I speed up calculation of the integral?
Is it possible to speed up the calculation of the Kx integral?
...
3
votes
1
answer
78
views
Why two the same integrals give different values?
Why two the same integrals give different values?
...
1
vote
0
answers
54
views
How to solve this nonlinear partial differential equation stably?
I'm trying to solve this PDE with a numeric method. For an approximation, a radius $r$ that is sufficiently large (but not infinity) should be enough. When the coefficient of the initial condition $\...
2
votes
2
answers
84
views
NMaxValue - function is not a real number
I'm trying to use NMaxValue to numerically find maximal values of the function F[z]. The problematic part of my code is as ...
0
votes
2
answers
67
views
How to find the point where Exclusion starts?
I have two versions of a Plot
...
0
votes
0
answers
28
views
How to span a non-zero parameter space for integral?
https://github.com/adeelaafzal/Effective_degrees_of_freedom/find/main
I am working on the following code,
...
2
votes
1
answer
58
views
What numerical error is Mathematica doing here and how can I avoid it? [closed]
So I am solving a system of equations in Mathematica:
...
2
votes
2
answers
133
views
How to get correct numerical result without lots of digit precisions?
I am wondering if it is possible to get the correct numerical result without computing with a lot of precisions in expressions.
as a simple example suppose in the middle of some of my numerical code ...
3
votes
1
answer
131
views
Shooting technique using NDSolve
Here I am attaching my code below. It took all the variable's values, but the graph window was empty. I am not able to recognize, where is the error exactly. Differential equations were also, checked ...
0
votes
0
answers
32
views
Fast matrix evaluation with elements depending on ThreeJSymbols
Presentation of the problem
I want to evaluate a large matrix (~3000x3000) whose elements are given as a sum over wigner 3j symbols.
The matrix elements are defined as
...
0
votes
1
answer
66
views
Integration is not correct for the expression with a fraction?
What value Px2[16, 4] or N[Px22[16, 4]] is correct?
...
0
votes
0
answers
32
views
How do I prevent, or get rid of the <code>Abs^\[Prime]</code> in the output of a partial of a Normalize[vector]? 12.0.0 for Microsoft Windows [duplicate]
12.0.0 for Microsoft Windows
How do I prevent, or get rid of the Abs^[Prime] in the output of a partial of a Normalize[vector]?
The code below shows the problematic ...
5
votes
1
answer
134
views
Incorrect answer zero where correct answer is very large (precision issue)
Define a function F as follows:
F[α_, x_] =
N[Exp[x/2] Abs[Gamma[α/2 + I x /(2 Pi)]]^2, 10];
It is a product of two terms. ...
1
vote
1
answer
92
views
Shooting technique [closed]
Here is my code, I am trying to plot the graph of the differential equation, But output graph is an empty window. can anyone please help in getting the graphs. This equation is a modified bessel ...
0
votes
0
answers
86
views
How to increase the precision of numerical derivatives?
I need to make sure about precision of numerical derivatives in my calculations. I use finite element method to obtain a wave function, then I take derivatives of this numerical wave function to get ...
0
votes
1
answer
49
views
Why does an error occur in one case, but not in the other, and how to fix it?
Why do errors appear for this Kx[11, 15] when this Kx[11, 14] is considered without error? How to fix it?
...
1
vote
2
answers
105
views
Finding numerically roots of equation over region
I'm trying to solve the following numerical problem:
I have a function of 2 variables in some rectangular region, the function is computed numerically with some moderate time cost (solution of linear ...
1
vote
2
answers
122
views
Why does NDSolveValues give different results?
I'm trying to solve this differential equation to obtain the density matrix elements $\rho_{22}$.
$$\frac{d\rho}{dt}=-i\Big(H_{0}(t)\rho(t)-\rho(t)H^{\dagger}_{0}(t)\Big)$$,
for non-Hermitian ...
1
vote
2
answers
73
views
Numerically evaluating giant fractions
I would like to know the numerical value of a giant fraction, which I got from doing some combinatoric calculation (n choose k gets huge).
For example, say I have
...
1
vote
1
answer
152
views
Why is there an error in one case and not in the other?
Why does the error occur for P[34, 14] whereas for P[33, 14] has no error? How to get rid of this error?
...
1
vote
0
answers
71
views
Why does the minimum eigenvalue sharply decrease when the number of basis functions increases from 37 to 38 and more?
I have the following Hamiltonian: H = -1/2 * Laplacian -1/r - 2 * r/5 * (Exp[-r * 1.6] + Exp[-r * 3.1])
I'm trying to find the minimum eigenvalue of this Hamiltonian using the matrix method. As basis ...
2
votes
1
answer
113
views
Eigenvalues of A/r^2 + B*r^2 potential
I would like to find the energies of a system in a matrix way. The system has the following Hamiltonian:
H1 = -1/2Laplacian +(A1/r^2)+(B1r^2)
I use radial functions as basis functions: Psi1[r_, n_] =...
0
votes
1
answer
137
views
Why do different calculations give different eigenvalues?
I find the eigenvalues of the Hamiltonian in two ways - numerically and matrix . Why do different calculations give different eigenvalues?
The Hamiltonian is H = -1/2*Laplacian -(2/r)
It can be seen ...
1
vote
1
answer
68
views
Equality contraint violated with NMinimize
I am attempting to numerically optimize a function of only 2 parameters k, θ. There are two inequality constraints (1 each on k ...
1
vote
2
answers
110
views
NMinimize keeps returning Indeterminate for well defined function
I am attempting to numerically optimize a function of only 2 parameters k, \[Theta].
The function is well-defined and the constraints are simple. However, the ...
1
vote
2
answers
124
views
Trying to apply numerical method with Do
I am trying the following scheme to learn to implement an iteration using Do loop. I tried to implement the same method using for loop but with same errors. I, therefore, turned to the Do loop to ...
0
votes
0
answers
49
views
Cannot generate an array of results for my numerical method
I want to apply the following scheme:
$$
\begin{aligned}
\psi_{i, j+1} &=-\psi_{i, j-1}+\left(\frac{\Delta t}{\Delta r_*}\right)^2\left(\psi_{i+1, j}+\psi_{i-1, j}\right) \\
&+\left(2-2\left(\...
0
votes
1
answer
40
views
How to simplify 3 variables with 2 equations?
There are 2 equations of 3 variables and I have simplified and eliminated the third varibale to ge the relationship of the first and the second variable. Codes are as this:
...