16k views

### Replacing composite variables by a single variable

To replace a single variable by another variable, one can simply use the the replace all (/.) operator (e.g., ...
14k views

### How do I replace a variable in a polynomial?

How do I substitue z^2->x in the following polynomial z^4+z^2+4? z^4+z^2+4 /. z^2->x ...
59 views

### Is there a way to use identities in Mathematica efficiently? [duplicate]

Imagine I have defined a variable l=p/(a*b) Let's say I perform some operations, and I get the final answer to be p/a. But all I ...
53 views

### Reverse substitution [duplicate]

If you apply rules and then simplify you may get something like. (25 A^2 hbar Sqrt[π])/Sqrt[hbar m w] How would you get mathematica to rewrite this in terms of E ...
153 views

### How to simplify an expression by substitution?

Sometime Solve and DSolve give a finial form of the solution, which is fine in may applications. However, in some cases, one may ...
94 views

### How does PacletInstall work? And is it possible to find packages using PacletInstall?

It seems that many packages published could be installed using PacletInstall . For example, from this Rubi install instruction webpage, we could see the comman: ...
153 views

### Substitution in expressions

As the title suggests, I want in an expression to to some substitutions. For example in the expression $\mathcal{L}^+_0+\mathcal{L}^-_0+\mathcal{L}^+_0+\mathcal{L}^-_0+\mathcal{L}_1$ I want to ...
88 views

### Substitution inside an expression [duplicate]

I'm trying to get mathematica to replace an expression with a reduced form. I wanted to replace $(k/w)$ with $h$ in a particular expression, and I've tried something like: ...
49 views

### Do replacement only on certain specific forms

If I want to replace, say, a with a1 + a2 in an expression, I can write ...
61 views

### Assign a variable to an expression in Mathematica

I have the following matrix {{a^2 + b + \[Sqrt](m + n) + 5, 23 x + 7 a}, {14 b, a^2 + b + \[Sqrt](m - n) + 5}} I want to replace the expressions ...
200 views

### Substituting variables inside a matrix

I'm trying to substitute some dependent variables into equations inside of a matrix, however $Replace[]$ and and $/.$ don't seem to work. The equation in question is just a vector matrix of ...
108 views

### Force using function definitions when simplifying

So, I have my function, such as f[x_,y_]:=(1-x/y)^(1/2); This function enters a big expression that contains variables x and y, as well as the function f. Now I ...
312 views

### How to Collect $x$ powers to group $\sqrt{x}$ and $\sqrt{1+x}$ together?

I have been failing to apply Collect[#, x]& to render a like-power series of $x^k$. Here $k = \frac52, \frac32, \frac12,\frac{-1}2$, etc. The major issue is: ...
Mathematica keeps rewriting expressions, so it is hard to figure what pattern to use. I am trying to replace all occurrences of $\frac{y}{x}$ by $t$, but Mathematica re-writes \$\frac{1}{\left(\frac{y}...