2.28 Thursday, May 14, 2020

2.28.1 Top new questions this week
2.28.2 Greatest hits from previous weeks
2.28.3 Can you answer these questions?

2.28.1 Top new questions this week

What causes Module variables to leak?
Looping through all functions defined in Mathematica
Solver for COVID-19 epidemic model with the Caputo fractional derivatives
Possible bug in finite sum over inverse squares \(\sum \limits _{i=1}^n \frac {1}{(x (n-i)+i)^2}\)
Removing banal words from a list
How to reproduce Wolfram Language’s base64 encoded string with command-line tool?
Does the following change to MKL environment variable boost Mathematica speed on AMD CPUs

What causes Module variables to leak?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221436

Sometimes, after writing code like

f[] := Module[{a}, ...] 
 
and running f[] multiple times, there will be many Temporary symbols of the form a$123 in 
the Global namespace. Sometimes this happens  ...

asked by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 25 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 22 votes

Looping through all functions defined in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221555

Is there a way to loop through all the Functions (Elementary and Special functions) that exist in Mathematica?

I want to construct a table of some identities and maybe I can discover something ...

asked by Micha Kuczynski https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72609 12 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 13 votes

Solver for COVID-19 epidemic model with the Caputo fractional derivatives

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221609

As it is known in biological system with memory it would be suitable to use fractional derivatives to describe evolution of the system. In a current version of Mathematica 12.1 there is no special ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 10 votes

Possible bug in finite sum over inverse squares \(\sum \limits _{i=1}^n \frac {1}{(x (n-i)+i)^2}\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221373

Revisiting the problem Limit of partial sums involving inverse squares I found another difficulty with Sum[]

Consider this sum

s[x_, n_] :=  Sum[ 1/(i + (n - i) x)^2, {i, 1, n}] 
 
Here we assume x  ...

asked by Dr. Wolfgang Hintze https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16361 10 votes

answered by Soner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49198 13 votes

Removing banal words from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221540

NB: I am aware of the DeleteStopwords symbol.

I want to remove from a list of words the ones that are likely to be more banal. So for instance if we have

{"exegesis", "mystification", "bread",  ...

asked by Diffycue https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46327 9 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 10 votes

How to reproduce Wolfram Language’s base64 encoded string with command-line tool?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221381

With Wolfram Language:

In[7]:= ExportString["foobar", "Base64"] 
 
Out[7]= "Zm9vYmFyXDo0ZTJkXDo2NTg3" 
 
 
With the closest command-line software I could think of 
 
echo -n 'foobar' | openssl base64     ...

asked by qazwsx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=357 9 votes

answered by Jason B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9490 17 votes

Does the following change to MKL environment variable boost Mathematica speed on AMD CPUs

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221767

I personally do not have an AMD CPU but since they are literally becoming quite hot these days, I thought whether the following fix (as proposed here: ...

asked by Ali Hashmi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27331 7 votes

answered by ilian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=145 9 votes

2.28.2 Greatest hits from previous weeks

Multivariable Taylor expansion does not work as expected
How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
How to create effect like Van Gogh’s stroke brush?
How to perform a multi-peak fitting?
What are the most common pitfalls awaiting new users?
How to find integer solutions?
LaTeXand Mathematica

Multivariable Taylor expansion does not work as expected

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=15023

The basic multivariable Taylor expansion formula around a point is as follows:

$$ 
f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac{1}{2!}(\mathbf a \cdot  ...

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 55 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 61 votes

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8895

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes, I run into the following error:

asked by Zoe Rowa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1713 36 votes

answered by Yi-Zen Chu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4869 17 votes

How to create effect like Van Gogh’s stroke brush?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39003

I need to apply Van Gogh’s stroke brush effect to a random image

Take the following image as an example:

Thank you so much if you could help!

asked by user10495 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10495 33 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 51 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3).

The ...

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 54 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 54 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 460 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 277 votes

How to find integer solutions?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=42359

Following is the equation:

Need to solve for integer values of x,y when a,b lies between -1000 and 1000. Problem is to find the number of integer values of pair (x,y) that satisfy it.

asked by Sahil Sareen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12396 2 votes

answered by bill s https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1783 4 votes

LaTeXand Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 124 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 45 votes

2.28.3 Can you answer these questions?

Construct a binary tree where nodes are labeled according to given rule
How to get proper TeX output from splicing the following file?
Application of spatially varying boundary conditions and source term in AceFEM

Construct a binary tree where nodes are labeled according to given rule

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221405

I want to plot a binary tree in Mathematica where the nodes are labeled according to a given rule. In fact, whether a node has a left child or a right child or both, will be determined by a rule. And ...

asked by Mwen Rele https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72568 1 vote

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 0 votes

How to get proper TeX output from splicing the following file?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221414

In order to let other users with Mathematica 12.x test this problem for me, I now use FileTemplate instead of Splice.

I want to splice (with FileTemplate) the following file that has been simplified ...

asked by Money Oriented Programmer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 1 vote

Application of spatially varying boundary conditions and source term in AceFEM

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221489

I am trying to model a simple 2D steady state heat conduction problem using automatically generated Q2 elements.

The problem consists of a square domain with prescribed temperatures along the bottom ...

asked by DvanHuyssteen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69831 1 vote