# Questions tagged [replacement]

The tag has no usage guidance.

1,666 questions
Filter by
Sorted by
Tagged with
212 views

### Transform a list of rules into a list of function definitions

I have a list of rules obtained by solving a system of equations, e.g. {f[x] -> a + 3 h[x], g[x] -> 2 a + c + 6 h[x]}. I wish to convert this list of rules ...
34 views

### How to apply dependent rules in a complex expression?

I am working with a complex expression, $L_0$, which I need to simplify iteratively using a series of dependent replacement rules. Here's the structured approach I am trying to implement: Start with ...
1 vote
53 views

### How to Prevent Short Name Character from Auto Converting [duplicate]

The following code creates the short name character aliasdelimiter, then selects it and reads and tests it. ...
• 5,964
72 views

### Transforming an expression into function

I want to transform the expression a = 2 x + 1 into f=Exp[a], z=Log[x], and express the ...
• 780
38 views

### Can I remove a rule from a built-in function?

Can I remove the rule DiracDelta[n x]==DiracDelta[x]/n when n is numeric from the definition of ...
• 3,692
29 views

### How to put prime before value during a substitution?

Here is a sample Mathematica code: ...
• 2,553
1 vote
85 views

### Perturbation theory. Get xAct tensor component. Substitution for xAct tensors

I work with perturbations in FLRW metric with arbitary curvature. I'm following Weinberg's book. In modified gravitation theory there is additional tensor S and I need to find it's perturbation in the ...
1 vote
58 views

### How to achieve automatic nesting of pattern application

I want to apply the following rules: ...
• 2,100
138 views

### Limit of a PolyLog does not work [bug]

This is an issue I am having with Mathematica version 13.1.0.0. I tried the following code, but it does not work as expected: ...
36 views

### Cross derivative rules

I am trying to generalize the condition Derivative[1, 0][ℒp][t, ϕ] -> Derivative[0, 1][ℒp][t, ϕ]/l for $\ell$ a constant, through the following rule ...
• 155
176 views

### Modify Rules with new patterns

My Rules always have one instance of TR on the LHS, and several on the RHS, like this TR[2] -> TR[5] + TR[h, g] I want to generalize them by adding optional ...
• 1,112
58 views

### Weird behavior when using Parallelize with LieART

I want to perform computation with the LieART package and Parallelize some long computation. But I run into the following ...
• 545
1 vote
37 views

### Replacing an expression with pre-defined function

I am asking Mathematica to do a long calculation with functions I am defining at the beginning of the script. Because the resulting expressions are long, I want to replace them with the functions I ...
• 111
99 views

### Sort the arguments of a function using replace

I want to sort the arguments of a function f while multiplying with the signature of the permutation, i.e. f is totally antisymmetric function. My idea was something like ...
• 187
102 views

### Why does Replace function not work the first time I try it?

Please explain why in the following mathematica code, the cos term was not replaced in the first try, but got replaced in the second try? ...
• 121