by tgb · 6y ago · 0 comments
Sin[a+b] /. Sin[x_] -> Cos[x]
which yields 'Cos[a+b]'. Is the underscore after the x what indicates that "x_" can take any value? And Mathematica then strips the undescore and replaces 'x' with that value? Why not just use x_ on both sides? And earlier the author was using '_x' instead of 'x_'. It seems rather mysterious to me.[1] https://reference.wolfram.com/language/guide/Patterns.html
unbound in the lambda sense
⇒ underscores must come at the end.