4.20 Tuesday, August 8, 2017

================================== 
Top new questions this week: 
==================================

[Why can’t I inject expressions in Compile using (only) With] https://mathematica.stackexchange.com/questions/153064/why-cant-i-inject-expressions-in-compile-using-only-with

Generally speaking, With can be used to inject into arbitrarily held expressions, for example:

With[{args = 2}, 
  Hold @ Hold @ HoldComplete[args] 
] 
(* Out[1]= Hold[Hold[HoldComplete[2]]] *) 
 ...

- asked by glS (14 votes), answered by Leonid Shifrin (15 votes)

—————————-

[Why Mathematica can not factorize polynomials over algebraic fields?] https://mathematica.stackexchange.com/questions/152949/why-mathematica-can-not-factorize-polynomials-over-algebraic-fields

I noticed that a factorization over algebraic fields is useless in Mathematica. Here is the example over the field containing I*Sqrt[3]:

Pol=4 (3 I Sqrt[3] (-12 + 6 x - 4 x^2 + x^3) y^3 z + 
9 (12 -  ...

- asked by Aus Man (14 votes), answered by chyaong (11 votes)

—————————-

[RegionMeasure is wrong for simple 1D Path] https://mathematica.stackexchange.com/questions/153323/regionmeasure-is-wrong-for-simple-1d-path

Bug introduced in 11.1

Take the simple path defined by a line through a set of points

pts = {{0, 0}, {0, 1.5}, {0.05, 1.5}, {0.05, 0.5}, {0.1, 0.5}, {0.1,  1.5}, 
{0.15, 1.5}, {0.15, 0.5}, {0.2,  ...

- asked by Sascha (13 votes), answered by Michael E2 (8 votes)

—————————-

[Why am I seeing what looks like a violation of operator precedence?] https://mathematica.stackexchange.com/questions/153258/why-am-i-seeing-what-looks-like-a-violation-of-operator-precedence

Why is it that when I evaluate

2*2.848529281693615`+3*-0.5155083247776808` 
 
I get 
 
(* -2.93688 *) 
 
 
which is wrong. 
 
2*2.848529281693615` + (3*-0.5155083247776808`) 
(* 4.15053 *)

Any help would be ...

- asked by An old man in the sea. (9 votes), answered by C. E. (9 votes)

—————————-

[Need a gentle introduction to stylesheet writing] https://mathematica.stackexchange.com/questions/153102/need-a-gentle-introduction-to-stylesheet-writing

I have searched Mathematica.SE for stylesheet and found a lot of useful information on specific issues but no general introduction. There were 746 hits, and it is very time consuming for anyone to ...

- asked by m_goldberg (9 votes), answered by m_goldberg (7 votes)

—————————-

[Unexpected behavior when directly assigning to DownValues] https://mathematica.stackexchange.com/questions/152999/unexpected-behavior-when-directly-assigning-to-downvalues

I’m encountering some unexpected behavior when assigning to DownValues. When I assign two definitions for test[1] as below, Mathematica stores both definitions:

DownValues[test] =  ...

- asked by tom (9 votes), answered by b3m2a1 (6 votes)

—————————-

[Except @ OptionsPattern[] affects OptionValue] https://mathematica.stackexchange.com/questions/152984/except-optionspattern-affects-optionvalue

The background

This example works as expected, small function with a special case rule:

foo // ClearAll 
foo // Options = {"bar" -> 1}; 
 
foo[x_, y : Except[_Rule], patt : OptionsPattern[] 
 ...

- asked by Kuba (9 votes), answered by Mr.Wizard (7 votes)

================================== Greatest hits from previous weeks: ==================================

[Mathematica 10.0.x freezes in Initializing kernels] https://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels

Bug caused by paclet update and fixed by paclet update.

I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don’t ...

- asked by mitcheljh (73 votes), answered by ilian (95 votes)

—————————-

[Exporting graphics to PDF - huge file] https://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

 ParametricPlot3D[{r Cos[], r Sin[], r^2}, {r, 0,  ...

- asked by Matthew Leingang (94 votes), answered by Heike (80 votes)

================================== Can you answer these? ==================================

[Operator on a multivariable function in a sum] https://mathematica.stackexchange.com/questions/153092/operator-on-a-multivariable-function-in-a-sum

I need to define an operator that does as follow for any function \(h_m\).

$\qquad O[h_m](k,M,b,l_{max})=\sum_{l\neq (0,m)}^{l_{max}}il \left (h_l(k,M,b,l_{max}) b_{m-l}(k)- c_l\partial_k  ...

- asked by Michael_J (1 vote)

—————————-

[Direct input in Chinese, Korean or Japanese] https://mathematica.stackexchange.com/questions/153042/direct-input-in-chinese-korean-or-japanese

Sometimes I need to create a document in Japanese: I know Mathematica supports typing in Japanese. However it doesn’t seem to support direct (inline) input in Japanese.

Whenever I need to convert a ...

- asked by Tadashi Kikuno (5 votes)

—————————-

[Parametric Plot of Faces] https://mathematica.stackexchange.com/questions/152909/parametric-plot-of-faces

In How do I draw a pair of buttocks? there is a discussion how to draw a human backside. It shows an example of Manipulate to ParametricPlot3D this part of a body.

In this discussion they were ...

- asked by Adalbert HanSSen (1 vote)