# Tagged Questions

Questions about Mathematica's rule-based replacement functionality, including functions such as Rule (->), Replace, ReplaceAll (/.) and ReplaceRepeated (//.).

50 views

### Extract solutions of linear system to variables

I need to output the answers from solve into the variables named just as they were named in the solve equations. I have checked out this thread Assign the results from a Solve to variable(s) but ...
26 views

### Possible incompatibility between ReplaceAll and LaplaceTransform

I have a large symbolic expression containing many terms of the form, LaplaceTransform[u2[z], z, s], with various functions for the first argument. I wish to ...
66 views

### Replacing terms in a sum according to a condition

If I have a generic expression such as ...
31 views

### How Can I combine the equations' results in a table without “x->” [closed]

For example: I have a series of functions: F[x_,o_]=x+o And I want to combine the result into a table with o=0.3,0.6,0.9.. ...
211 views

### Converting set of characters into numbers using list of replacement rules

I am trying to convert a text, as an example "aaaa" into a set of numbers as defined in a list of replacement rules, for example letterstonum . letterstonum takes in letters a to z and returns the ...
35 views

### Replacement of a group of variables in trigonometric expression

I would like to make simplification of trigonometric expressions by using a replacement a group of variables. Here the equation I have to simplify : ...
59 views

102 views

### Condition and RuleDelayed

On this site I found, for example here, some very interesting questions and answers on the use of delayed rules with conditions. I would very much like to understand these answers, but so far I failed ...
120 views

### Why is a longer pattern matched rather than a short pattern?

I was reading the Mathematica V5 Book and am a bit perplexed on the behavior of a particular pattern matching example where it seems to be choosing a longer pattern rather than a shorter pattern. The ...
25 views

### Simplifying self-reciprocal rational function [duplicate]

I have trouble transforming self-reciprocal rational functions in one variable like ...
102 views

### How can I pass replacement rules to a package-defined function and have it understand their context?

I am writing a package where I would like to be able to pass replacement rules to a function inside the package and have the function manipulate its symbols using those replacement rules. However, I'm ...
62 views

### how to replace one calaculation result to another one in a loop?

I am doing the calculation in a loop. I gain a digit for rzin in ...
234 views

### ReplaceAll with Associations instead of Rules

I have just noticed that x /. <|x -> 123|> evaluates to 123 In other words, the association seems to behave as a ...
125 views

### Symbolic differentiation [closed]

I have two symbolic differential equations and I want to used them in another equation as follows: ...
34 views

### Replace variable with other variable containing a constant in differential expression [duplicate]

I have the following differential expression: ...
90 views

### Check an Option without Evaluation

Consider the following: ...
43 views

### ReleaseHold NIntegrate after Replace variable

I would like to calculate the sum of square of two integral(Ex and Ey). I first hold this two integral because two variables(tx, ty) are not specified.Then, I replace tx,ty and releasehold $Ex^2+Ey^2$....
58 views

### How do I use Replace All? [duplicate]

I have an expression: a + b 2^(1/2) + (c + d 2^(1/2))*I I want to replace each occurrence of 2^(1/2) with ...
72 views

### Replacement producing unexpected result

If I use a replacement rule like ...
34 views

### TensorContract with KroneckerProduct instead of ordinary Times

Is it possible somehow to contract two tensors, say A={{a1,a2,a3},{a4,a5,a6}} and B={b1,b2,b3}, where the elements ...
172 views

### What kind of patterns in a list of rules would benefit from being Dispatched?

I have a long list of rules for manipulating expressions. They are of the form: ...
121 views

### Function not returning number [closed]

I am quite new to Mathematica and I guess this question is really basic, but I can't figure it out myself. I'm making a simple notebook that plots a Hamiltonian function, a plane of constant energy, ...
58 views

### Can't operate on vector within a list of rules

I'm trying to set up a list of rules which includes the following: ...
45 views

### Unevaluated derivatives of known functions after replacement

I want to make the following replacement work correctly: Array[(2 D[xM[[#1]][t], t] * D[xM[[#2]][t], t]) &, {3, 3}] /. {xM -> {Sin[ω t], Cos[ω t], 0}} ...