Questions tagged [precision-and-accuracy]

Filter by
Sorted by
Tagged with
1
vote
1answer
63 views

Wrong limit appears [closed]

Consider the following limit $$ \lim_{x\to-\infty}x-\sqrt{x^2+7x} $$ Going through some algebra leads to $$\begin{align} \lim_{x\to-\infty}x-\sqrt{x^2+7x}&=\lim_{x\to-\infty}\frac{(x-\sqrt{x^2+7x})...
1
vote
0answers
43 views

Mathematica returns zero for small rational number to 1/133 power but not zero [closed]

This small number raised to the 1/133 root is not zero but Mathematica is underflowing with the computation. I assume Mathematica is first computing the quotient numerically, then taking the root: <...
0
votes
1answer
52 views
1
vote
0answers
76 views

How to calculate precise higher derivatives of ParametricNDSolve solution

Higher Derivatives of NDSolve don't match the results from DSolve solution, can I somehow increase the accuracy of numerical method to match arbitrarily high derivatives? Equation I am using ...
0
votes
1answer
59 views

Issues with Nintegrate - different methods yielding different values (both giving warnings)

I am integrating the following function \begin{equation} \frac{1}{2d^{2}}\times\frac{\sqrt{\omega_{c}\left|t_1-t_2\right|}-\sqrt{\pi}e^{\frac{1}{\omega_{c}\left|t_1-t_2\right|}}\text{erfc}\left(\frac{...
0
votes
2answers
68 views

Same integral yielding to different results

I am currently working with the following integrals \begin{equation} \int_{0}^{\infty} dk\thinspace \frac{k^{3}e^{-2kd}}{\omega^{2}+k^{4}} = \frac{1}{\omega^{2}d^{4}}\int_{0}^{\infty}d\epsilon\...
1
vote
0answers
46 views

plot and limit are not in agreement [closed]

I am plotting the following function $\frac{\sqrt{t \text{$\omega_c $}}-\sqrt{\pi } e^{\frac{1}{t \text{$\omega_c $}}} \text{erfc}\left(\frac{1}{\sqrt{t \text{$\omega_c$}}}\right)}{(t \text{$\omega_c$}...
3
votes
1answer
49 views

About Numerical Precision Related with Zeros [duplicate]

I encounted the following precision issue. I define c = a + b, but the result for 'c - a - b' does not equal zero. I am not sure how to resolve this. ''' ...
2
votes
2answers
190 views

How can I make sure that there are real roots for the given function? Can I trust the plot only?

I have this function $$f(x)=(\pi -2 x)^2 \sin \left(\frac{\pi ^2}{2 x-2 \pi }+\frac{1}{2} \csc ^{-1}\left(\frac{4 \pi (\pi -x) \csc \left(\frac{\pi ^2}{x-\pi }\right)}{4 (\pi -x)^2+\pi ^2}\right)\...
0
votes
1answer
34 views

Indeterminant numerical value of summation

I have the following two-fold summation. ...
0
votes
1answer
59 views

Precision problem with mathematica

I have a precision problem with a complicated function in Mathematica. I need to get norm (NIntegrate[f[x],{x,0,1}]) and shape (...
0
votes
1answer
24 views

SetPrecision with Manipulate using variable number of controls

I want to convert inputs from controls in Manipulate into exact numbers and have two kinds of inputs: parameters: there are a fixed number of these rates: the number of rates is controlled by the ...
0
votes
0answers
60 views

Mathematica accuracy errors when creating data

I created training data for a neural network and below are two errors I got The only code that uses "FindRoot" command is the following ...
0
votes
1answer
57 views

General:munfl error problem

I have the following function, that is the result of The integration between x and some upper limit of a positive function, thus should be positive $f(x,vE) = \frac{e^{-1140.09 x} \left(e^{67945.5 \...
1
vote
0answers
33 views

How does WorkingPrecision in NDSolve handle MachinePrecision?

I'm wondering why the following code NDSolve[{y''[t] + y[t] == 0, y[0] == 1., y'[0] == 0}, y, {t, 0, 10}, WorkingPrecision -> 6] throws the error/warning, that ...
0
votes
1answer
100 views

DiscreteMarkovProcess: preparing the transition matrix and unexpected negative results

I would like to implement a Markov process. It consists on a walk on a one-dimensional lattice, with nodes spaced $\epsilon$ from $-2$ to $2$. The transition probabilities for $x \neq y$ are as ...
2
votes
1answer
92 views

How do I force mathematica to output more digits for this particular expression? [closed]

I'm working on a project where a certain calculation of $\pi$ to an arbitrary precision is required. I'm evaluating the below expression in Mathematica: $6\sum_{k=0}^{\infty}\left(\frac{\left(-0.5\...
0
votes
0answers
16 views

Why increasing PrecisionGoal and WorkingPrecision is deteriorating my results

I am minimizing a variable subject to many very complicated constraints, like ...
0
votes
0answers
29 views

General::munfl - Precision lost in LinearModelFit

I am new to mathematica so I am confused regarding the loss of precision in LinearModelFit. In building a linear model with uora (1 or 2) and encodeSeverity (1,2 or 3) ...
3
votes
0answers
53 views

How to deal with too small numbers

When dealing with a code that produces too small numbers (in a complicated way) like 0.33691 4.015757066049965*10^-330 I get the following warning General::munfl: ...
5
votes
1answer
121 views

Accurately computing $\sum_{j=2}^\infty \frac{(-x)^j}{j!} \zeta(j)$

I'm doing a sanity check of the following equation: $$\sum_{j=2}^\infty \frac{(-x)^j}{j!}\zeta(j) \approx x(\log x + 2 \gamma -1)$$ Naive comparison of the two shows a bad match but I suspect one of ...
0
votes
0answers
35 views

Solving a determinant to get non-zero roots in a heat transfer problem

I am trying to solve a mathematical model of a heat transfer problem. As an intermediate step there is a characteristic equation in the form of a determinant, which needs to be solved for variable <...
0
votes
0answers
41 views

How do I increase an amount of digits after the point?

I have an expression such as: Log[0.784637, 517.8796]*ArcTan[-1.112673]*0.4256^(-2.034)*Sqrt[3.567] and I get 3 digits precision. I tried: ...
2
votes
1answer
46 views

N::meprec warning when setting precision

How come N[ Log[ Cos[1]^2 + Sin[1]^2 ] ] evaluates to 0. without any trouble, while ...
5
votes
1answer
193 views

Airy function zeros, conflict (error?) between Wolfram Functions vs. Mathematica

According to functions.wolfram.com, the zeros of the Airy function $\operatorname{Ai}(z)$ occur at $z_k=f\left(\tfrac{3\pi}{8}(4k-1)\right)$ for $k\in \mathbb{N}$ where $f(d)=-d^{2/3} \left(1 + \frac{...
1
vote
2answers
42 views

Compile generates non-tensor object warning for this simple function

Compile generates the following error (CompiledFunction::cflist: Nontensor object generated; proceeding with uncompiled evaluation.) upon execution of this simple ...
2
votes
1answer
98 views

NIntegrate fails to solve a double oscillatory integral

I need to compute the following integral: ...
1
vote
1answer
64 views

Removing artifact in Plot[1-(1-x)^Floor[2/x],{x,0,1/20}]

The input Plot[1-(1-x)^Floor[2/x],{x,0,1/20}] yields where the white space we see below the curve near $x=0.01$ is an artifact. How can we fix this simply? ...
1
vote
0answers
40 views
1
vote
2answers
74 views

Function decomposition to Fourier series using first impulse function

I have periodic function with certain first impulse function and period value. My task is to decompose it to approximate Fourier series (k_max = 10) using Laplace transform of first impulse function: ...
1
vote
0answers
48 views
0
votes
0answers
14 views

Setting precision of a result for the next calculation

Sorry for my easy question. I would like to learn how I could change the precision of a value to use it for the next calculation ? Lets say, a=9.96329x10^-13, in fact this value is so small and can be ...
0
votes
2answers
46 views

Confused by results of a simple computation [duplicate]

If I define f[x_] := (1 - Exp[-2 x^2])/(x Sin[x]) and then enter N[f[10^-5] - 2, 100] I get the result $$-1....
0
votes
1answer
51 views

The value of the function with a very small Imaginary part but can be Plotted

I have a function Y[x_,β2_], It can be plotted normally. But when I take specific values, I get something like +0.000000*I when ...
4
votes
2answers
177 views

Slider changes Pi to a MachinePrecision number

Problem Consider the following code: DynamicModule[{a = {0, Pi}, b = 4}, {Slider[Dynamic@b, {a}], Dynamic@b} ] I want a Slider...
0
votes
1answer
99 views

Accurate Numerical values of a given functional

Consider the following functional : $$ I(x,s) =\int_0^\infty\mathrm dy \frac{F(x + \mathrm iy, s) − F(x −\mathrm iy, s)}{\mathrm e^{2πy}-1}, $$ where $ F(z, s) = \dfrac{\sin^2[π\Gamma(z)/(2z)]}{z^s} $....
0
votes
0answers
36 views

How to copy and paste numbers with "`" mark and use them in calculations, without using N or setting precision every time

Suppose we have run a calculation and get a number like 2.758952615889003` If we then copy-paste this number and do a calculation like ...
2
votes
1answer
22 views

How can I control the following behavior of Reduce?

Consider the following 3 lines of code: ...
1
vote
2answers
96 views

How do you overcome recursion limits when using DSolve?

I have the following program to solve for the neutron to baryon ratio during BBN. I've replaced many of the derived values with constants in order to focus on the problem: ...
0
votes
0answers
47 views

High Precision NIntegrate

Define the integrand (as a function of two variables $x$ and $y$): ...
3
votes
0answers
74 views

How can I get a number with arbitrary accuracy? [closed]

Here I got a list ...
0
votes
2answers
61 views

Precision in Integrals and NDSolve

I have a simplest code for NDSolve, the problem is I am dividing two small numbers, the denominator is so small that it gives me infinity as an answer, how can I increase the precision to get a ...
22
votes
3answers
9k views

Why am I getting that $0.999999999999988 \geq 1.0$ is True?

I am getting these results: ...
5
votes
1answer
95 views

Find the number of correct digits to compare approximation with exact value

A) For simple example suppose i want to approximate $\pi$ using $\frac{22}{7}$ and $\frac{355}{113}$. ...
1
vote
2answers
128 views

Why can't Mathematica express a minus operation between two decimal numbers with several places? [closed]

A example of the problem. This is a print from mathematica with the demonstration of the issue.
3
votes
1answer
47 views

How to set Working Precision/ Accuracy global for the entire notebook in mathematica

F1[r]=((37.3042 - r) (-25.578 + r) (62.8822 + r))/(3000 r) FindMaximum[F1[r], r] The output is {0.0345106, {r -> 31.0723}}. ...
1
vote
1answer
46 views

How to make FindRoot work with PolyLog functions

I have the following code: ...
10
votes
1answer
108 views

How to control floating point precision when `Export`ing to obj format?

Suppose we have a MeshRegion that we want to export to an obj file with, say double precision. Is that possible with Export? And ...
0
votes
2answers
42 views

How to export InputForm of a number

I need to export full form of a number i.e. the actual form with which Mathematica works. For example, full form of a number is ...
0
votes
0answers
92 views

Why can't NDSolve(Value) solve Maxwell eq. for plane wave i.c.'s when going to spherical coordinates (it works fine in Cartesian coordinates)

I would like to use NDSolveValue (or NDSOlve) to solve a set of PDEs in spherical coordinates. I started with a simplified example that resembles the problem I actually want to study, but where I know ...

1
2 3 4 5
12