# Tag Info

5

$Version (* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *) int[c_] = Integrate[Exp[-c*x + x^2], {x, 0, c}] (* E^(-(c^2/4)) Sqrt[π] Erfi[c/2] *) Erfi is real for real c FunctionDomain[int[c], c] (* True *) Plot[int[c], {c, -15, 15}] For an alternate representation using DawsonF (EDIT: Eliminated unnecessary assumption) int[c] // ... 3 The above expression for EisensteinE[2, q] is a bit slow. Here is a faster version using double precision arithmetic: EisensteinE[2, tau_Complex /; Im[tau] > 0] := ee2Upper[tau]; ee2Upper = Compile[ {{tauIn, _Complex}}, Block[{tau = tauIn, f, k, q, qp, s}, tau -= Round[Re[tau]]; If[7 Im[tau] < 6, f = ee2Upper[-1/... 3 Clear["Global*"] f[x_] = x*Sin[x]; data = Table[{x, f[x]}, {x, 0, 10, 0.5}]; model[m_, x_] := Sum[a[n] ChebyshevT[n, 2 x - 1], {n, 0, m}]; nlm[m_Integer?Positive, x_] := NonlinearModelFit[data, model[m, x], Array[a, m + 1, 0], x] Manipulate[ Module[{model = nlm[m, x]}, Column[{ Plot[Evaluate@{f[x], model // Normal}, {x, 0, 10}, ... 3 modified answer (11.04.2021) (Thanks @DanielLichtblau for his helpful comment) Here my ideas to make it work: Mathematica evaluates the first integral to Integrate[Exp[a u^2 + b v^2 +c u v], {v, -∞,∞}, {u, -∞, ∞},Assumptions -> {Element[{a, b, c}, Reals] ] (*ConditionalExpression[(2 \[Pi])/(Sqrt[-b]Sqrt[-4 a + c^2/b]), 4 a b^2 < b c^2] *) result is ... 3 In this case it really helps to use an explicit formula for$U(2,b,z)$, which can be expressed in terms of the much more stable exponential integral function: U2[b_, z_] = HypergeometricU[2, b, z] // FullSimplify (* (1 - E^z (2 - b + z) ExpIntegralE[2 - b, z])/(-2 + b) *) U2[-97., 177.] (* 0.0000130837 *) Such transformations exist very often ... 3$Version (* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *) Clear["Global*"] HypergeometricU[2., -97., 177.] (* -1.18092*10^64 *) Any calculation done with machine precision is done with the understanding that "you get what you get." Machine precision is fast but neither tracks nor attempts to control precision. ...

2

There's a rounding error at the initial sampling point that causes the x coordinate to become purely imaginary. One fix is to add Method -> "BoundaryOffset" -> True: ParametricPlot[ {hR[Tan[α], γ], Areac[Tan[α], γ]}, {α, FBc[γ], FAc[γ] - 0.001 (*to avoid-∞*)}, PlotRange -> {{0, 1.2}, {-10, -1}}, AxesOrigin -> {0.0, -5}, ...

2

You can use a different representation of the skew harmonic numbers in terms of harmonic numbers: $$\bar{H}_n=\frac{1}{2} (-1)^n \left(H_{\frac{n-1}{2}}-H_{\frac{n}{2}}\right)+\log (2)$$ This expression can be expanded around infinity f[n_] := HarmonicNumber[(n - 1)/2] - HarmonicNumber[n/2] Series[f[n], {n, Infinity, 6}] -\frac{1}{n}+\frac{1}{2 n^2}-\...

2

Clear["Global*"] SphericalHarmonicY[1, 0 , θ, Φ] is real for real {θ, Φ} FunctionDomain[ SphericalHarmonicY[1, 0, θ, Φ], {θ, Φ}] (* True *) The min and max values are {min, max} = #[{Re@SphericalHarmonicY[1, 0, θ, Φ], 0 <= θ <= Pi, 0 <= Φ <= 2 Pi}, {θ, Φ}] & /@ {MinValue, MaxValue} (* {-(Sqrt[(3/π)]/2), Sqrt[3/...

1

Shifted Chebyshev polynomials are orthogonal on {0,1} with the weight function 1/Sqrt[x-x^2]. As the data: dat is not known, but we can create an interpolating function: fun[x_]=Interpolation[dat] For an example, we choose funx[x_]=Sin[2Pi x]. We can now expand this function in a series of shifted Chebyshev polynomials. The expansion coefficients are given ...

1

Clear["Global*"] Functions should use explicit arguments for all variables. g[bi_, β_] := (β*BesselJ[1, β]) - (bi*BesselJ[0, β]); A function that uses a numeric technique (e.g., NSolve) should use SetDelayed rather than Set and have its arguments restricted to numeric values. EDIT: Used Rationalize on argument and used Solve rather than NSolve ...

1

The best way to get an idea of asymptotic power-law behavior is to make a log-log plot. LogLogPlot[Abs[curvature] /. k -> 1, {r, 10^-6, 10^6}] Note that we have to use Abs here because curvature, as defined, takes on both positive and negative values. The slope of a log-log graph is, of course, the exponent of the power-law behavior of the function. ...

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