Tag Info

Hot answers tagged

10

A little bit more. Still not fully diagnosed, but the problem isn't due to DSolve ... : s1 = DSolve[{x'[t] == f*x[t] (1 - (x[t]/b)) - l x[t]}, x[t], t]; s2 = DSolve[{x'[t] == e*x[t] (1 - (x[t]/b)) - l x[t]}, x[t], t]; And the problem shows up when matching the initial condition: Solve[(x[t] /. s2[[1]] /. t -> 0) == 4/10, C[1]] (* {{C[1] -> ...


7

To answer your actual question, SetSharedVariable does not allow simultaneous reads. It forces the variable to be evaluated on the main kernel, effectively disabling the parallelization. A more interesting question for me is: why is ParallelMap so slow when not using SetSharedVariable? This observation is not an answer but it's too long for a comment. ...


6

The problem can be reduced to the DSolve expressions: DSolve[{x'[t] == a*x[t]*(1 - (x[t]/b)) - l*x[t], x[0] == 0.4}, x[t], t] DSolve[{x'[t] == h*x[t]*(1 - (x[t]/b)) - l*x[t], x[0] == 0.4}, x[t], t] One can see that alphabetical order appears important: With[{a = Symbol@#}, Shallow @ DSolve[{x'[t] == a*x[t]*(1 - (x[t]/b)) - l*x[t], x[0] == 0.4}, x[t], ...


6

This is a bug due to the fact that URLFetch is dealing incorrectly with line breaks. Here's a workaround: in1 = URLFetch[ "http://blog.wolfram.com/wp-content/uploads/2008/06/se-30.jpg", "ContentData" ]; ImportString[FromCharacterCode[in1]] You can compare this technique to the other as follows: in2 = ToCharacterCode[URLFetch[ ...


6

This is definitely a bug. It seems that the problem is caused because you increment the argument by two (your recurrence has c[k] and c[k+2]). This results in two cases (even and odd), as can be seen by your Maple output, and Mathematica apparently does not know how to deal with this properly. One way around this is to substitute the variables so that the ...


6

As has been noted by ruebenko in the comments, there does seem to be a bug in the handling of infinite-range Bessel function integrals when MinRecursion and MaxRecursion are both set to non-default values. For instance, even the simple NIntegrate[BesselJ[0, x], {x, 0, ∞}, MinRecursion -> 10, MaxRecursion -> 15] chokes with a NIntegrate::minmax ...


5

Please let me compile answers from the comments so that this topic can be marked as answered. Yes, this is a bug. A better solution than having rectangles of slightly different sizes and slightly larger than desired is to export the figure as EPS first and then convert it to PDF later. The cut corners are still there though.


5

I Trace-ed the Information[ f ] command both before and after an invocation of f (with a simpler definition f[x_] := Legended["123", x]). By comparing the results, I found a function System`Dump`makeusageboxes: which reduces to another function BoxForm`MakeBoxesWithTextFormatting: Attributes[BoxForm`MakeBoxesWithTextFormatting] = {HoldAllComplete} ...


5

Something strange is going on here. Here is a computation which illustrates the issue without some of the extraneous aspects. wrong = FourierCoefficient[1/(x^2 + 1), x, 1] The variable wrong now contains what FourierCoefficient thinks is the coefficient of $e^{i x}$ in the fourier series of $1/(x^2+1)$. According to the documentation for ...


4

This seems to be related to, or a manifestation of: Poor anti-aliasing in Rotated text with ClearType on On my system Simon's workaround is successful. Using Style["probability", 15, FontOpacity -> 0.999]:


3

This non-answer (addressing Szabolcs' observation) won't fit in a comment. The following makes me suspect that the problem has something to do with how the parallel kernels are representing data internally: LaunchKernels[]; datatest = Table[rule[x, x], {2}]; data = Table[Rule[x, x], {2}]; Trace[datatest] (* ==> {datatest,{rule[x,x],rule[x,x]}}*) ...


3

@ruebenko confirmed that this is a bug. Here's a workaround: currentTimeStep = 0; monitor[t_?NumericQ] := (currentTimeStep = t; 1) pfun = ParametricNDSolveValue[{y'[t] == a monitor[t] y[t], y[0] == 1}, y, {t, 0, 10000}, {a}, MaxSteps -> 100000]; Dynamic[currentTimeStep] pfun[1]


3

"LevinRule" should work splendidly here, I think: NIntegrate[-m Exp[-m] BesselJ[1, m]^2, {m, 0, Infinity}, Method -> "LevinRule", WorkingPrecision -> 20] -0.18196415067209554877 ruebenko's answer has given a closed form for this particular definite integral. Personally, I prefer it when the parameters of the elliptic integrals are ...


2

This issue happened for me in 9.0.1 and also some earlier versions. My crude yet working workaround is adding some spaces after y to force it been displayed entirely, meanwhile also add corresponding spaces before p to keep the word being centrally aligned. Hope this helps.


1

In[77]:= $Version Out[77]= "9.0 for Microsoft Windows (64-bit) (January 25, 2013)" In[73]:= Timing[All = Integrate[Abs[Sin[b + x]], {x, 0, 2*\[Pi]}]] Out[73]= {81.073720, 4} In[75]:= Timing[ FullSimplify@ Integrate[Abs@Sin[b + x], {x, 0, 2 Pi}, Assumptions -> {0 < b < 2 Pi}]] (*4*) Out[75]= {1.404009, 4}



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