New answers tagged

2 votes
Accepted

Delayed rule at StringReplace

Yes, RuleDelayed has the attribute HoldRest, which means that the rule isn't evaluated before evaluating the whole ...
lericr's user avatar
  • 24.4k
0 votes
Accepted

Same code behaves differently as a pure function and a function, and insider another function

That's due to the renaming mechanism of nested scopings. When evaluating Transformer2[algebra_] := , the local variable algebra ...
Lacia's user avatar
  • 2,208
0 votes

Same code behaves differently as a pure function and a function, and insider another function

This doesn't really seem to have to do with Function versus SetDelayed, so it might warrant a separate question. Rather then ...
lericr's user avatar
  • 24.4k
6 votes
Accepted

How to force Mathematica to simplify in terms of half angles?

Clear["Global`*"] expr = Sinh[x]/(Sqrt[2] Sqrt[1 + Cosh[x]]) (expr /. x -> 2 θ // TrigExpand // Simplify) /. θ -> (x/2) // PowerExpand Sinh[x/...
Syed's user avatar
  • 41.5k
3 votes

Smart way to remove rules from lists, leaving just values, specifically from FindMinimum output

We could also employ a deconstructing function: f[a_?NumericQ] := a f[a : {__Rule}] := Last /@ a Examples: ...
eldo's user avatar
  • 47.6k

Top 50 recent answers are included