Hot answers tagged

11

This appears to be a difference in parsing between the frontend and the kernel. Compare (in a notebook) HoldForm[\[LeftCeiling]x\[RightCeiling] + 1] (* Ceiling[x] + 1 *) with Get[StringToStream["HoldForm[\[LeftCeiling]x\[RightCeiling] + 1]"]] (* Ceiling[x] (+1) *) where the latter has multiplication instead of addition. One possible workaround is ...


11

There appears to be a bug, not in Integrate or in BesselK, but in the vertical-axis Ticks of LogLogPlot. Consider the simple case, LogLogPlot[Exp[x], {x, 10^-10, 1}, PlotRange -> All] as it should be. However, LogLogPlot[Exp[x], {x, 10^-10, 1}, WorkingPrecision -> 50, PlotRange -> All] In fact, any value of WorkingPrecision except ...


7

I believe that s = ArcTan[Sqrt[-4 E^(I a)]] N[Limit[s, a -> 0]] (* 4.71239 + 0.549306 I *) is a bug in Limit. Plotting the function s Plot[Evaluate[ReIm[s]], {a, -1, 1}] indicates that s assumes the value above nowhere in the vicinity of a == 0. (The same is true in the complex plane.) Furthermore, Limit[s, a -> 0] (* π + I ArcTanh[2] *) ...


6

We can reproduce the problem in a simpler example: g = Graph[{{1}, {2}}, {{1} <-> {2}}] HighlightGraph[g, {{1}, {2}}] HighlightGraph invokes the function GraphComputation`GraphHighlightDump`vertexEdgeExtract to get the list of vertices and edges to be highlighted. For the example above, this function returns {1,2} as the list of vertices to be ...


6

This is clearly a bug, which appears when the the vertex names are lists. You should report it to Wolfram Support: http://support.wolfram.com/ I can reproduce it with version 10.4.1. Proof that lists as vertex names are reasonable: some functions return such graphs. Example: pts = RandomInteger[{1, 5}, {10, 2}]; g = NearestNeighborGraph[pts] ...


6

Some insight can be gained by plotting Sqrt[Exp[I*t]^2 - 1] in the complex plane. Plot3D[Evaluate[ReIm[Sqrt[Exp[I*t]^2 - 1] /. t -> tr + I ti]], {tr, 0, Pi}, {ti, -1, 1}, AxesLabel -> {tr, ti, f}] Branch points occur at t == n Pi, n an integer, with branch cuts extending from the branch points to t == n Pi + I ∞. Visibly, there also are ...


5

There is definitely something wrong here. The alternative form of the third derivative would be to do three successive differentiations on the same object. The result in that approach is correct: D[y[t], t, t, t] // MatrixForm $$\left( \begin{array}{c} y_1{}^{(3)}(t) \\ y_2{}^{(3)}(t) \\ y_3{}^{(3)}(t) \\ y_4{}^{(3)}(t) \\ y_5{}^{(3)}(t) \\ ...


4

This is an irritating bug that was introduced in V8 and has not been fixed even in the latest version (10.4.1) of Mathematica. Both f = FunctionInterpolation[N[1, 20] x, {x, 0, 1}] and g = FunctionInterpolation[N[1, 2] x, {x, 0, 1}] give a spate of error messages similar to ones you encountered. In both cases the functions returned appear to behave ...


4

TechSupport acknowledged and proposed a simple workaround by putting inert expression, e.g. empty string, inside the { }: NDSolve[{x'[t] == x[t], x[0] == 1, WhenEvent[Mod[t, 1] == 0, {""}]}, x, {t, 0, 3}]


4

Set ImagePadding option to None. (With None the exported image is cut a bit on the y-axis so use 10 instead of None) Plot[(180 Sqrt[\[Pi]^2 - 625 t] (\[Pi]^2 (-25 + 36 t) - 1500 t (-15 + 45 t -Sqrt[-\[Pi]^2 + 900 t])))/(\[Pi]^4 Sqrt[-\[Pi]^2 + 2500 t]) + Tan[2 Sqrt[\[Pi]^2 - 625 t]], {t, 0.01, 0.016}, AxesStyle -> {{Directive[Red, 12], ...


3

Use the (undocumented, afaik) options "TicksStyle" and "FrameStyle": BarLegend[{"SunsetColors", {0, 1}}, LabelStyle -> {FontSize -> 12}, "TicksStyle" -> Directive[Red, AbsoluteThickness[5]], "FrameStyle" -> Opacity[0]] In version 10, we need to add Opacity[1] in Directive[...]: BarLegend[{"SunsetColors", {0, 1}}, LabelStyle -> ...


3

Analysis (Observations in 10.1.0 under Windows.) Curiously it seems that AbsoluteThickness[0.2`] is hard-coded within the internal definitions. Formatting of BarLegend calls Charting`iBarLegend which calls Legending`LegendDump`iColorGradientLegend or Legending`LegendDump`iColorBandLegend. In the definition of iColorGradientLegend we find: ticksstyle = ...


3

There are two related bugs. SubstituteSingleReplace calls RulesComplement to construct a list of rules and their opposites (so in your case b_ ** a_ :> -a ** b and -b_ ** a_ :> a ** b). Unfortunately, the function incorrectly uses Rule when given a RuleDelayed (my In[1] was loading the package): In[2]:= RulesComplement[b_ ** a_ :> -a ** b] ...


3

It is definitely a bug. And it can be formuated even more sharply. $Version (* Out[156]= "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *) Define f[n_, a_] := (1 + (-1)^n/n^a)^n If a>0 the limit exists and is equal to unity. If a == 0 we have the problem of the OP, where one might say that "two alternative limits exist". This is ...


3

I tested this with V.10.4.1 running on OS X. The following both work as expected Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, Filling -> Axis] Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, PlotLabels -> Placed[{"A", "B"}, Above]] but Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, PlotLabels -> Placed[{"A", "B"}, Above], Filling -> Axis] fails to ...


2

It seems to me that setenv is being used here to set the values of a series of helper variables that are then used by the other functions in the code. This (is awful but) works within a single notebook because all those variables are visible to all functions. I suspect, however, that once you put the code in a package, you run into context problems. Those ...


2

It seems to be a bug. I advise you to report this to Wolfram support, e.g. by using the "Give Feedback..." option on the Help menu or via their website.


2

If you don't want to import the graph into some other application, but simply save it for later use, I've found that just saving the graph in .m format preserves everything just fine: Export["graph.m", graph] This is the only approach I've found that preserves property lists, labels, everything.


2

Bug was fixed in version 10.4.0.0.


1

Disable "Show Suggestions Bar after last output" and be sure "Dynamic Updating Enabled". Now you can run the Manipulate and it works fine on Windows 10 (64 bit) and Mathematica 10.4.1. Manipulate[Plot[Erfc[x/(2 Sqrt[t])], {x, -5, 5}], {t, 0.1, 5}]



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