9
votes
Accepted
Different evaluation control inside of `Integrate` than outside of it
This is exactly what Inactivate was designed for:
int = Inactivate[Integrate[x^n/(x + 1)^(n + 1), {x, 0, 1}], Integrate]
...
8
votes
How to remember evaluation across sessions?
Strategy: Use memoization and then save the relevant definition in a file at the end of your session. Next session you can recover the "memoized" definition.
Memoization
Look at memoization ...
8
votes
HoldForm is not working as I would expect
Why it happens
When you enter an expression and evaluate it in Mathematica, MakeExpression is used to convert the box expression (i.e. the description of the exact ...
7
votes
Accepted
HoldForm is not working as I would expect
(The basic idea is from this answer by xzczd.)
Try this:
...
4
votes
Accepted
How can I efficiently define functions with different names but doing the same stuff?
To define identical functions with SetDelayed use
(#[x_] := x^2 + x) & /@ {f, g, h};
This approach is also useful when ...
3
votes
Different evaluation control inside of `Integrate` than outside of it
You can use Trott-Strzebonski or RuleCondition or controlled evaluation; see Replacement inside held expression, which might be considered a duplicate.
Variations:
<...
3
votes
Different evaluation control inside of `Integrate` than outside of it
I found a way, but does the code really have to be so ridiculous for such a simple task?
...
3
votes
2
votes
Accepted
Wierd problem with Table and Evaluate
You need to use v on the correct part of the solution as follows
...
1
vote
How can I efficiently define functions with different names but doing the same stuff?
If I understand your question correctly, this is how I usually implement this.
...
1
vote
How can I efficiently define functions with different names but doing the same stuff?
Just to show another perspective that could also work on multiple definitions.
Define your base function (which could have multiple definitions)
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
evaluation × 1425hold × 150
functions × 125
function-construction × 99
plotting × 95
notebooks × 68
replacement × 57
programming × 55
calculus-and-analysis × 52
dynamic × 51
list-manipulation × 48
front-end × 47
manipulate × 46
performance-tuning × 44
scoping × 44
differential-equations × 43
assignment × 39
pattern-matching × 38
bugs × 37
numerics × 36
numerical-integration × 33
simplifying-expressions × 33
kernel × 33
syntax × 32
variable-definitions × 31