# Tag Info

7

The sum is alternating, so you might need extra precision and NSumTerms: katsurda[x_] := NSum[(-x)^j/j! Zeta[j], {j, 2, Infinity}, WorkingPrecision -> 16, NSumTerms -> Max[15, 2 x]]; katsurdaApprox[x_] := x (Log[x] + 2 EulerGamma - 1) - Zeta[0]; plot1 = DiscretePlot[katsurda[x], {x, 0, 40, 2}]; plot2 = Plot[katsurdaApprox[x], {x, 0, 40}]; Show[...

7

The canonical reference for asymptotic series for zeroes is Fabijonas and Olver's paper, where the formula for deriving those coefficients is displayed (and see the DLMF as well). In other words, your observation is spot-on that these are asymptotic approximations for the zeroes, and are usually only expected to be good for large $k$. In that respect, one ...

6

I have just a little to add to @Szabolcs' answer, and this seemed an appropriate place rather than a separate Q&A. Since there is a theorem involved (see below), it should be pointed out that this theorem tends to fail to hold in Mathematica. Well, wait, it's a theorem: it must true! Then let us say that it tends to be difficult to apply this theorem ...

5

This is because N[expr] uses machine precision, without any guarantees on the number of correct digits in the result. It simply uses machine numbers (approximately 15 decimal digits) during the intermediate steps of the computation. N[expr, n] is different. It does not just use n-digit numbers during computation. Instead, it tries to ensure that the result ...

3

If the target is just to calculate numerical gradient of a matrix rather than reproduce exactly the same behavior of gradient of MATLAB, then we can use NDSolveFiniteDifferenceDerivative: Clear[grad]; grad[mat_] := grad[mat, ##] & @@ ConstantArray[1, Length@Dimensions@mat] grad[mat_, dx__] := 1/{dx} (NDSolveFiniteDifferenceDerivative[#, Range@N@...

3

I think I've traced down the problem. It hinges on two things. An identity: Cosh[x] == Sinh[2 x]/(2 Sinh[x]) // Simplify (* True *) And a questionable auto-simplification: Csch[010. n] Sinh[2 010. n] (* 1 *) {Csch[010. n], Sinh[2 010. n]} // FullForm (* List[Csch[Times[010.,n]],Sinh[Times[09.698970004336019,n]]] *) (The coefficients are ...

1

There are several messages when using DSolve[] In[15]:= DSolve[{H'[u] == -a*H[u], H[0] == HMax, X'[u] == X[u]*b*H[u]/HMax - X[u]*d*X[u]/K, X[0] == K}, {H[u], X[u]}, u] During evaluation of In[15]:= Solve::incnst: Inconsistent or redundant transcendental equation. After reduction, the bad equation is -2000+Subscript[\[ConstantC], 1] == 0. During ...

1

I have cooked up a routine that performs adaptive sampling in parallel for integration. With a little tweaking, it should work for multidimensional plotting routines such as this--I think they are related problems as "parallel adaptive sampling" which Mathematica uses in several areas such as plotting, polynomial fitting, and integration. My use ...

Only top voted, non community-wiki answers of a minimum length are eligible