Version 11.3 introduces ApplySides for situations where I usually use Map. What is an example where ApplySides cannot be replaced by Map?

• My understanding is that these functions were introduced for the main purpose to make it easier for new users and school/college students to use Mathematica to work with and manipulate basic equations. Wolfram himself said something to this effect in one of his design review videos on these functions twitch.tv/videos/207012986 (45:05). They are higher level, more abstract than manipulating the structure directly using map and threading and pure functions. I do not think there is a performance advantage, but they simplify common operations on equations. No time to give examples. Jul 18 '18 at 21:27
• This function will behave differently for expressions with Piecewise or ConditionalExpression for example. Also, examine the FullForm of 0 < x <= 1 and note that Map would not do what you want in this case. Jul 18 '18 at 21:29
• Yes, for Equal then it is equivalent to Map. Would it make sense to turn my above comment into an answer? Jul 18 '18 at 22:53
• @Nasser This could turn into a teacher's nightmare when students start doing ApplySides[ Minus, x > y]... because all the other *Sides operations work differently (they don't just do mapping)...
– Jens
Jul 18 '18 at 23:30
• @Nasser Quite; that's what I had in mind as a "risky application".
– Alan
Jul 18 '18 at 23:38

ApplySides knows more about mathematical expressions than Map, which is a structural operation. For example it knows how to handle heads like Piecewise, ConditionalExpression, Inequality, etc.

ApplySides[Sin, Piecewise[{{x^2 < 1, x > 2}}, x^3 > 1]]

Piecewise[{{Sin[x^2] < Sin, x > 2}}, Sin[x^3] > Sin]

ApplySides[Sin, ConditionalExpression[x^2 == 1, x != 0]]

 ConditionalExpression[Sin[x^2] == Sin, x != 0]

ApplySides[Sin, 0 < x <= 1]

0 < Sin[x] <= Sin


And here's Map (at level 1):

Map[Sin, Piecewise[{{x^2 < 1, x > 2}}, x^3 > 1]]

Piecewise[{{Sin[x^2 < 1], Sin[x > 2]}}, Sin[x^3 > 1]]

Map[Sin, ConditionalExpression[x^2 == 1, x != 0]]

ConditionalExpression[Sin[x^2 == 1], Sin[x != 0]]

Map[Sin, 0 < x <= 1]

Inequality[0, Sin[Less], Sin[x]] && Inequality[Sin[x], Sin[LessEqual], Sin]


Additionally note that ApplySides cousins AddSides, SubtractSides, MultiplySides, DivideSides will never give a wrong answer, whereas ApplySides (and Map) can.

ApplySides[a*# &, b < c]

a b < a c

Map[a*# &, b < c]

a b < a c

MultiplySides[b < c, a]

Piecewise[{{a*b < a*c, a > 0}, {a*c < a*b, a < 0}}, b < c]