Linked Questions

32
votes
6answers
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., ...
21
votes
7answers
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 ...
0
votes
1answer
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 ...
1
vote
1answer
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 ...
0
votes
3answers
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 ...
1
vote
0answers
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: ...
1
vote
3answers
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 ...
0
votes
1answer
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: ...
1
vote
0answers
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 ...
0
votes
0answers
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 ...
2
votes
1answer
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 ...
2
votes
2answers
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 ...
2
votes
1answer
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: ...
10
votes
3answers
471 views

Matching (y/x)^u terms wherever the appear in an expression

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}...
3
votes
2answers
95 views

Treat 2 variable as 1

Is there anyway to treat two variable, that are a result of expansion, as one? To use Solve[] I can do ...

15 30 50 per page