New answers tagged

4

In the math.stackexchange post that you have linked, P. Teruo Nagasava shows that the integral can be reduced to two simpler ones: $$I_1=\int_0^1 \frac{\log ^2(1+x) \log (x)}{x} \, dx,\\ I_2=\int_0^1 \frac{\log ^2(1-x) \log (x)}{x} \, dx. $$ Both of them MA computes without any problems i1=Integrate[Log[1 + x]^2 Log[x]/x, {x, 0, 1}] $$I_1=-4 \text{Li}_4\big(...


10

First of all, it helps a great deal to define f as follows: ClearAll[f] A = Exp[M]; f[x_, y_] := (weight*Exp[-pts*x]).A.(weight*Exp[-pts*y]); Here, using SetDelayed (:=) is better than Set (=), because the latter creates a humongous symbolic expression that is very expensive to numericise. Defining A first ensures that Exp[M] is computed only once. First@...


1

The lack of ability to abort a running computation is Mma's greatest aggravation. After reading everyone's comments here, I still can't see why the kernel does not have a hardware watchdog timer that interrupts once/second to check for an Abort signal. It would slow everything down by 0.00001%; so what? Anyway, here is my workaround: inside your deepest ...


1

I was able to find this workaround, I know not what it does. In[1]:= Pause[3];(*abortable*) Out[1]= $Aborted In[2]:= Quiet@NotebookEvaluate@"abc"; In[3]:= Pause[3];(*unabortable*) In[4]:= MathLink`LinkAddInterruptMessageHandler[$ParentLink] In[5]:= Pause[3];(*Aborts are back!*) Out[5]= $Aborted


4

Here are all the ways I can think of, the first two of which are the most concise and in my opinion the most Mathematica-l: x = Replace[value, Null -> default], in a manner similar to @John Doty's comment above, which suggests x = value /. Null -> default; however, /. is ReplaceAll, and so will also replace any occurrences of Null anywhere inside the ...


0

To start the discussion on my own question... My basic understanding (or "what I think I understand") of these functions so far is as follows... Function 1: TemplateEvaluate: Causes the contents of its argument to be evaluated at the time TemplateApply is invoked, whether or not those contents are wrapped inside some function that has HoldFirst, ...


Top 50 recent answers are included