Questions tagged [algebraic-manipulation]
The art of manipulating an algebraic expression into the desired form.
795 questions
2
votes
1
answer
149
views
Factor out specific term
I want to transform expr by factoring out only the E^(-t γ) term. I could implement it like in my code below, but is there a ...
2
votes
3
answers
176
views
Gathering terms by same subscript
Is there a nice way to group the terms in equation 1 like in equation 2, where the terms with subscript 1 are put on the left-hand side and the terms with subscript 2 on the right-hand side.
Equation ...
5
votes
0
answers
97
views
Avoid MonomialList applying N to coefficients containing floats
For inexact coefficients MonomialList seems to apply N.
How to avoid this?
...
3
votes
1
answer
236
views
Factor polynomial with generalized root extension
Here are two examples with ordinary extensions:
Factor[1 + x^4, Extension -> Sqrt[2]]
Factor[x^2 + 2 Sqrt[3] x + 3, Extension -> Automatic]
But what about &...
1
vote
1
answer
162
views
Collect coefficient of sum of terms in Mathematica
Using Mathematica, I want to collect the coefficient of $(\epsilon_1 + \epsilon_1^*)$ in a simple algebraic equation below. Mathematica gives ZERO as the answer, which is not correct.
The expected ...
0
votes
1
answer
145
views
Help simplifying a complicated expression
I need help simplifying a complicated expression which I believe it is zero.
I have asked a similar question like this here before, Help manipulating a complicated expression to check that it gives ...
3
votes
2
answers
275
views
Help manipulating a complicated expression to check that it gives zero
I'm working in Mathematica, trying to obtain some coefficients, and at some point I obtain the following coefficient, which is a function of $r$:
...
4
votes
1
answer
1k
views
Mathematica cannot solve {a==0,b==0,a c==0,b c==0}?
The title says it - when trying Solve[{a==0,b==0,a c==0,b c==0}] Mathematica works for quite a while without giving any output. I cannot get anything with the ...
10
votes
3
answers
274
views
Simplifying `Pochhammer[1, n]/Pochhammer[3/2, n]`
Is there a way to coax Mathematica to automatically simplify expressions involving Pochhammer symblos like Pochhammer[1, n]/Pochhammer[3/2, n]? It comes from ...
3
votes
1
answer
190
views
How to use Mathematica to do multivariate partial fraction decompositions?
For single variate partial fraction decompositions, Apart can do it.
What if multivariate partial fraction decompositions?
Should I use Singular's pfd.lib or Sage?
...
4
votes
1
answer
216
views
Finding all integers solutions to set of equations
I have a set of equations whose l.h.s. are given by:
...
0
votes
1
answer
205
views
Fail to Simplify simple expression involving Sqrt
In my calculation, I came up with a factor
Sqrt[s^3 (s - 4 m^2)]
And it failed to be simplified into s Sqrt[s^1 (s - 4 m^2 )]
...
1
vote
1
answer
235
views
How to convert a cosine or sine function into a phasor or the standard form of a sinusoidal alternating quantity?
Edit 20250324
This is essentially a problem of trigonometric transformation.
The key to the problem is how to convert a sine or cosine function into the standard form of a sinusoidal alternating ...
3
votes
4
answers
411
views
A system with 8 unknowns, which may be solved by tricks. Can Eliminate, or GroebnerBasis, or Rational Univariate Representation systematize solution?
I wanted to solve the system with RHS
...
0
votes
2
answers
168
views
Taking minus sign inside the bracket
How to take the minus sign "-" in the front to inside the bracket and change the sign of each individual term while to keep the current simplified as it is:
...
2
votes
1
answer
198
views
How to Factor Constants with Multiple Variables
I have the following expression:
\begin{equation}
aX + aY + bZ + bT +cV + cU\tag{*}
\end{equation}
expr = a X + a Y + b Z + b T + c V + c U
where $ a, b , c$ are ...
0
votes
0
answers
32
views
FullSimplify and Log Function [duplicate]
Why does the FullSimplify not act on the following Log functions and cannot apply the product rule:
...
0
votes
1
answer
135
views
Exanding expressions inside square root [closed]
Why does the following not work!
...
3
votes
2
answers
247
views
How can I convert my expression to a chosen polynomial form
I have an expression that has two different kinds of variables. It's quite ugly, so I'll replace it with a toy expression here:
...
0
votes
1
answer
123
views
MatrixExp for SU(3); $U = \exp[-i \sum_{a=1}^{8} c_a \lambda_a]$
I want to compute matrix exponential of general SU(3) rotations, $U = \exp[-i \sum_{a=1}^{8} c_a \lambda_a]$ for $\lambda_a$ is the Gell-Mann matrices. For three combintations of $\lambda$ works fine ...
6
votes
4
answers
724
views
How can we simplify this algebraic expression involving square roots?
While performing some analytical calculations, I got the following large expression when I was expecting just Sqrt[a^2 + b^2]. To my surprise, Mathematica seems to ...
0
votes
1
answer
140
views
How to take derivatives of Traces? [closed]
I'm trying to compute derivatives of the form
D[Tr[A],x] for A being a large polynomial in a single variable $x$. Mathematica always gets me the result with formal ...
0
votes
0
answers
56
views
How to factor 8 x^2 - 73 y^2 [duplicate]
Factor[8 x^2 - 73 y^2] returns
8 x^2 - 73 y^2
How do I go about factoring it into
(8^.5 x + 73^.5 y)*(8^.5 x - 73^.5 y)
?
1
vote
1
answer
79
views
How to test an expression on presence of fractional powers?
If I have a single algebraic expression, I could use PolynomialQ for its numerator and denominator to determine if there are any fractional powers. What if I have a ...
2
votes
2
answers
204
views
Cannot simplify obviously simplifiable Piecewise
Simplification functions are usually able to reduce Piecewise to a simple expression when the conditions are not necessary, for example:
...
1
vote
0
answers
81
views
Weird Result when Minimizing
constraints = {A >= 0, B >= 0, A + 2 B == T, S == T*V + 2.4*B^3};
Simplify[Minimize[{T, constraints}, {A, B, T}, Reals], {S > 0, V >= 0}]
Above is the ...
1
vote
0
answers
159
views
How to improve polynomial factorization performance [closed]
I was solving a RSA factorization problem with a weak prime. In a given base, the prime was made of a lots of zeroes and can be factorized pretty quickly. See this write-up.
I checked the code for ...
2
votes
3
answers
216
views
Factoring Laurent polynomial - how to distribute powers in denominator to get polynomial Laurent factors
Not sure how to do this with Factor/Collect etc. I'm thinking this might not be straightforward at all.
Given a large Laurent polynomial I am trying to factor it into irreducible Laurent polynomials.
...
1
vote
0
answers
65
views
How to Substitute a Metric into a Variation of the Action in Mathematica to Obtain Field Equations?
I have already calculated the variation of an action for a modified gravitational theory, and now I want to substitute a specific metric (e.g., the Schwarzschild metric) into this variation in ...
2
votes
1
answer
161
views
How do I group polynomials in list that are either negatives or multiples of each other? I want to group polynomials f and g, if f=(-1)^n g^m
Specifically, I have a list that looks like:
{(1-x),(-1+x),(x+y)^2, (-x-y)^3, (1-x)^3,... }
I want to partition this into smaller lists that look like:
{(1-x),(-1+x),(1-x)^3...}
{(x+y),(-x-y)^3,...}
...
2
votes
2
answers
216
views
Ask Mathematica to prioritize writing an expression in terms of another
I have an old reference text with tables of solid spherical harmonics expressed in cartesian coordinates. (Edit: Here's a digital version of said table, for the curious.) In an attempt to replicate ...
1
vote
2
answers
143
views
Simplification of hypergeometric functions
I am trying to calculate the variance of the mean parameterised beta-binomial distribution. The probability mass function is given by
...
-2
votes
1
answer
136
views
Is there a way to compare equation in different form?
(a+1)^2 === a^2 + 2 a + 1
gives false.
Is there a way to compare these two?
...
1
vote
4
answers
207
views
Coefficient of factors in fractional expression [closed]
Consider the following algebraic expression
...
1
vote
0
answers
94
views
Putting a polynomial into a multilinear form
Consider the polynomials in $x$ with positive-integer parameters $a,b,c$
...
0
votes
0
answers
73
views
Factoring Custom Tensor Products
I have now made a post on the Computer Science stack exchange that talks about the general problems from an algorithmnic perspective here.
I have defined a custom tensor product function ...
0
votes
2
answers
109
views
How to impose distributivity over custom tensor product
I have written a custom tensor-like product called "TProduct[a,b]"
...
0
votes
0
answers
71
views
Simplifying fractional powers and collecting coefficient list from it
Problem
I want to generalize a solution I already have for a simpler situation. In my case I need to collect coefficients from a variable assuming fractional powers and on. First I'll present some ...
2
votes
1
answer
118
views
How to use Sum properly to avoid problems when the summating limits are undefined?
I'm struggling in the use of Sum.
I want to define something like that:
...
2
votes
3
answers
260
views
Converting an algebric expression into a matrix form
Consider the following expression:
a1 b1 c1 + a4 b2 c1 + a7 b3 c1 + a2 b1 c2 + a5 b2 c2 + a8 b3 c2 +
a3 b1 c3 + a6 b2 c3 + a9 b3 c3
Can Mathematica convert it ...
0
votes
1
answer
129
views
Separable decomposition $F(r,\theta) = A(r) + B(\theta)$ [closed]
Is it possible in Mathematica to take a function $F(r, \theta)$ and ask it to rewrite it as $F(r,\theta) = A(r) + B(\theta)$? In particular, I have the expression:
$$ \frac{g^{2} (r) f^{2} (r) \sin^{2}...
3
votes
2
answers
157
views
Multiple replacements in a long expression
Why does the replace /. not work on the second argument in the following expression:
...
0
votes
1
answer
152
views
How to write an expression as a ratio of polynomials [closed]
I have the following Mathematica expression as a result of some calculations:
...
1
vote
0
answers
160
views
Function to express Piecewise as UnitStep functions
Is there a documentation for the function Simplify`PWToUnitStep? This is a function which can be used to express a Piecewise ...
4
votes
2
answers
257
views
What's the reverse operation of TransferFunctionExpand?
Given a transfer funtion
TransferFunctionModel[1/(s + I) + 1/(s - I) + 1/(s + 1) + 1/(s - 2)^2,s]
we can obtain the polinomial form by using TransferFunctionExpand
...
2
votes
1
answer
160
views
Is it possible to express $\text{Li}_2(-\frac18(-i+\sqrt{15})+\text{Li}_2(\frac18 (i+\sqrt{15})$ as an explicit real expression (not numeric)? [closed]
I obtain this expression in my calculations, and numerically I am sure that it is a real number.
...
0
votes
1
answer
90
views
Convergent Taylor series unrecognized by Sum
I am trying to understand why Sum does not recognize a particular Taylor series as convergent. I have defined a function 'series' like this, that computes the Taylor series of a function 'f' at 'x', ...
10
votes
4
answers
595
views
Visualizing Wicks' contractions using brackets
Given a string like MMMM, what is the easiest way to draw all Wicks contractions similar to the diagram below (from Ch. 2 of Eynard paper)? Example below is for (MMMM), but I need it to work for other ...
1
vote
0
answers
75
views
Separate exponentials [duplicate]
Good afternoon,
I have an expression
Exp[2 I (t - tau) + a] + 2 Exp[2 I t + b] + 3 Exp[-I t + b]
And I want to write it as a summation of powers of Exp[I t]. So,
<...
2
votes
0
answers
114
views
Equivalent of `MomentConvert` for free moments/free cumulants? [closed]
I'm looking for Mathematica implementation of conversion between free moments and free cumulants.
For instance, for traditional moments we have from ...