Linked Questions

9 votes
4 answers
810 views

Numerical instability in cosh and sinh - integral functions [duplicate]

I'm trying to calculate the function: CoshIntegral[x] Sinh[x] - Cosh[x] SinhIntegral[x] Unfortunately Mathematica seems to hit a point (x~20) and things become ...
jake's user avatar
  • 93
3 votes
1 answer
6k views

How to increase precision: $MinPrecision does not help [duplicate]

I have the following series: ...
Anixx's user avatar
  • 3,630
8 votes
1 answer
514 views

ReplaceAll[] and Limit[] don't give correct results for this expression under extreme variables [duplicate]

Possible Duplicate: Funny behaviour when plotting a polynomial of high degree and large coefficients 1/x^2 + (3 + x)/(6 (1 - Exp[x] + x)) ——This is a ...
xzczd's user avatar
  • 67.1k
1 vote
1 answer
1k views

Relative error plot [duplicate]

I was plotting the relative error of the $e^{11/12 -n}n^{n+1/2}$ approximation to $n!$ as $n$ gets larger and larger, and at some very large value of $n$ Mathematica gives this plot: Can somebody ...
George's user avatar
  • 13
2 votes
1 answer
192 views

plot of polynomial expression failed [duplicate]

I want to plot a polynomial expression for {a,0,1}: ...
Gae P's user avatar
  • 657
3 votes
1 answer
384 views

Dealing with square roots [duplicate]

Consider following expression: $$ \sqrt{-\left(2 \sqrt{x^{-8/3}-x^{-4/3}+1}\, x^{4/3}+5\right) x^{4/3}+4 \sqrt{x^{-8/3}-x^{-4/3}+1}\, x^{4/3}+2 x^{8/3}+5} $$ In code: ...
stinglikeabeer's user avatar
2 votes
1 answer
182 views

Strange behavior when replacing variables by numerical values [duplicate]

I have a rather complicated function with parameters {a, b, c, d, e, f, k}, and I'd like to know its behavior as a function of k alone given other parameters, so I try the following code: ...
Leo Fang's user avatar
  • 754
0 votes
0 answers
99 views

Why is PolyLog[] giving weird answers for ordinary values? [duplicate]

Possibly related to this question, but it seems slightly different: Strange behaviour of PolyLog Function Wikipedia says that for real s, z<1 should be real. So I was confused when MMa returned: ...
F dot Floss's user avatar
0 votes
0 answers
77 views

Matrix ODE gives badly-behaved numerical solution [duplicate]

I am trying to solve matrix ODE: ...
Jieyu You's user avatar
27 votes
6 answers
5k views

Annoying display truncation of numerical results

I have a lot of data to inspect. An example of a number in my program is 123.189094 This gets displayed as 123.189 ...
Reb.Cabin's user avatar
  • 8,693
58 votes
3 answers
6k 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 ...
xzczd's user avatar
  • 67.1k
12 votes
4 answers
1k views

Complex result for real vectors in VectorAngle

Bug introduced in 10.0 or earlier and fixed in 12.0.0 or earlier I was expecting a real angle using VectorAngle when passing real valued vectors, but I obtained a ...
Adam Law's user avatar
  • 143
26 votes
2 answers
2k views

Different floating-point numbers equal?

Let's define two different numbers. x = 1. y = 1. + 2^-52 (* equivalently, 1 + $MachineEpsilon *) Let's make sure they're different with ...
2012rcampion's user avatar
  • 7,851
9 votes
2 answers
3k views

A problem about function N

Toady,I have a problem about N,described as below: For example N[1/3, 5] (* ==> 0.33333*) and ...
xyz's user avatar
  • 635
9 votes
3 answers
2k views

Very different results from evaluating same expression with different precisions

When I evalute the following expression, ...
MATIRMAK's user avatar
  • 749
10 votes
1 answer
401 views

Plot of $\sin(x^x)$ is missing from $x=143$

When plotting the graph of $\sin(x^x)$ I noticed that there is no plot from about $x=143$. I don't suppose there is a purely mathematical explanation for this? So, why is there no graph in ...
GambitSquared's user avatar
6 votes
3 answers
3k views

What is the best way to write a polynomial in the Bernstein basis?

The Bernstein basis of polynomials of degree $n$ is the set of polynomials of the form $$\binom{n}{k} t^{n-k}(1-t)^k$$ where $0 \leq k \leq n$. What is the best way to transform a given polynomial ...
JeremyKun's user avatar
  • 281
6 votes
2 answers
389 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 ...
AnInquiringMind's user avatar
10 votes
1 answer
723 views

Confused by (apparent) inconsistent precision

$$ e^{\pi \sqrt{163}} \approx 262537412640768743.99999999999925 $$ E^(Pi Sqrt[163.0]) N[E^(Pi Sqrt[163.0]), 35] NumberForm[E^(Pi Sqrt[163.]), 35] returns <...
stevenvh's user avatar
  • 6,968
5 votes
2 answers
679 views

Analytic expression for a Complex Hilbert Transform in Mathematica

I need to solve the following integral equations for a problem I'm working on - $\displaystyle \frac{-i}{2 \pi}$ $\int_{-a}^{a} \mathrm{dt}\,\, \frac{e^{i k t}}{t + i \tau}$ and $\displaystyle \...
Aegon's user avatar
  • 779
1 vote
1 answer
2k views

Adding precision for the calculation of a function

I have some function $f(x)$ I wish to evaluate, which is yielding divide-by-zero errors for sufficiently large inputs. How do I increase the precision with which this function is evaluated in order ...
Roger Harris's user avatar
  • 1,517
1 vote
2 answers
544 views

The solutions of Det[t]==0 do not satisfy the equation

t is a generated matrix with a parameter kz. Through solving Det[t]==0, the solutions, i.e. kz, are obtained. When I substitute any one solution in Det[t], the result is a large number, why? How to ...
user59546's user avatar
  • 115
5 votes
3 answers
176 views

Encapsulated plot function misbehaves

To insure a collection of plots has identical appearance, the plot command is encapsulated in a function. The results are undesirable. The fiducial plot is ...
dantopa's user avatar
  • 1,092
3 votes
2 answers
2k views

NDSolve problems of convergence

I have a big function that I have to maximize, so I have to evaluate some equation with thousands of different values of the parameter. But the FindMaximum returns me many errors. I have traced the ...
user1084363's user avatar
1 vote
1 answer
2k views

Increasing number of decimal places in Manipulate input

I've made a Manipulate app. in Mathematica where I vary the value of a function f(a) by varying the parameter a. However, I seem to only be able to edit my input for a for a value up to 5 decimal ...
Mel's user avatar
  • 475
2 votes
2 answers
902 views

Error In polynomial Root Finding

I have a polynomial in y like so: 2.00855*10^20 + 6.89796*10^20 x y + (5.17347*10^20 + 5.92241*10^20 x^2) y^2 - 1.4806*10^21 x y^3 + 7.77316*10^20 y^4 == 0 I ...
user38729's user avatar
6 votes
2 answers
490 views

Hypergeometric function with large parameters

I need an efficient and accurate method to evaluate hypergeometric ratios of the form: $$\frac{_{2}F_{1}(a+1,b;c;x)}{_{2}F_{1}(a,b;c;x)}$$ for large positive values of ...
a06e's user avatar
  • 11.4k
3 votes
2 answers
224 views

Weird things happening when replacing expressions

I have the following expression: ...
Mirko Aveta's user avatar
  • 2,202
1 vote
1 answer
216 views

Numerical error in compile, Strange behaviour in numerical evaluation

First of all, apologies for the large numbers, I couldn't find a working example for a far lower order and the zeros are necessary... my problem is this: I have a large polynomial (from high-order ...
John P. Wiener's user avatar
4 votes
1 answer
198 views

Funny behavior when computing dot product of coefficients with high-order polynomials

I have a similar problem to Funny behaviour when plotting a polynomial of high degree and large coefficients. However, the thing being evaluated is not just a polynomial, but a dot product of some ...
Jerry's user avatar
  • 41
1 vote
2 answers
260 views

Failed to use SetPrecision

I am calculating the below formula: $$ \text{ER2}(\alpha,\text{K},\text{q})\text{:=}1+\sum _{m=0}^{K-1} \binom{K+\alpha }{m} \sum _{r=0}^m \frac{(-1)^r \binom{m}{r}}{\left(\frac{1}{q}\right)^{\alpha +...
robit's user avatar
  • 207
0 votes
2 answers
201 views

Wrong numerical results from LegendreP

{Cos[Pi/180] // N, LegendreP[46, 0.9998476951563913`], LegendreP[46, Cos[Pi/180]] // N} give ...
tanghe2014's user avatar
0 votes
1 answer
262 views

Is there anyway to remove the noise from the graph in Mathematica?

I am trying to find the root of an equation in Mathematica. But am unable to find it. The Plot function gives a very noisy graph. Can anyone please provide me with a solution to this ...
Saquib Mohammed Haroon's user avatar
1 vote
2 answers
116 views

Plotting high precision high degree polynomial

When I plot a high degree polynomial such as (available as CloudObject since it is too big to explicitly include): ...
Kvothe's user avatar
  • 4,591
1 vote
1 answer
111 views

Improving working precision of LegendreP[n,x]? [duplicate]

I was trying to evaluate N[LegendreP[5,0.1]] The cell gives me: N[LegendreP[5,0.1]]=0.178829 However I wanted more ...
bboczeng's user avatar
  • 449
1 vote
1 answer
197 views

User defined functions and decimal places displayed

I have a couple of complicated user-defined functions, one which calls the other, and I wish to control the number of decimal places displayed when I call the "mother" function. I have tried the ...
Freakalien's user avatar
1 vote
1 answer
120 views

Calibrating Precision in calculations

As the title says, I encounter an irritating problem which has to do with the accuracy or the precision used in the calculations. To be more specific, I have the following code: ...
Vaggelis_Z's user avatar
  • 8,790
0 votes
0 answers
69 views

Getting a wrong plot after NIntegration

I am trying to plot this function numerically. R2T = ...
sachiraj mishra's user avatar
2 votes
0 answers
64 views

How to force Mathematica to plot the log function correctly for the given argument?

Consider functions ...
John Taylor's user avatar
  • 5,887