Questions tagged [factorization]
Questions on factoring various types of mathematical expressions, with the use of Factor, FactorInteger, FactorSquareFree and related commands.
174
questions
2
votes
1
answer
47
views
How does Mathematica factor expression with derivatives (i.e. not polynomial)?
I was surprised Mathematica did this automatically. I have an ode and wanted to factor it. I did not think Factor will work and I need to write special code to do ...
3
votes
2
answers
144
views
Function to write an algebraic expression in terms of another
So I'm working on a physics problem. I have two functions:
$\rho = \frac{F}{(\beta F^\alpha+1)^\frac{1}{\alpha}}$, $p = - \frac{F}{(\beta F^\alpha+1)^\frac{1}{\alpha}} + \frac{4}{3}\frac{F}{(\beta F^\...
0
votes
2
answers
48
views
Easiest way to print without breakline
So I have factorized a transfer function and stored the terms in a variable. I want to print the product of terms without Mathematica joining them and without a break line. I have managed the first, ...
15
votes
4
answers
2k
views
Automating interesting ways to write 2023
Inspired by Interesting ways to write 2023, I was wondering if there are ways to automate the search for results using MMA.
I tried
...
1
vote
0
answers
64
views
Putting everything with the same power together
I'm doing some computations wich involves a lot of big polynomials, for example:
...
0
votes
1
answer
57
views
How to express the given function as a factor $e^{7 i x}$ times a real function?
I have the function $f(x,b,t,m)$ for $\{x>0,t,b\}$ all reals and $m=\{1,2,3,4,5,6\}$. For each particular $m\in\{1,2,3,4,5,6\}$, I see that $f(x,b,t,m)$ has a multiplicative factor $e^{7 i x}$ ...
0
votes
1
answer
32
views
Getting List of Factors in a monomial. Is FactorList reliable?
Say I'm given a monomial which is a product of factors,
$X_{i_1} \times \cdots \times X_{i_n}$.
I find that
...
4
votes
1
answer
70
views
Simplify polynomials with simple subfactors
I am trying to simplify expressions such as
poly = 1 + (-2 + 4 a^2) x^2 + x^4
to the form
polySimple = (1-x^2)^2 + 4 a^2 x^2
...
0
votes
0
answers
54
views
Meaning of Extension option in Factor
I would like to ask about the Extension option in Factor function.
In the reference, there is the following example. Factor a ...
4
votes
2
answers
222
views
Factorize in a particular way
I was trying to factorise this polynomial expression:
TestPolynomial=-p1^2 x1 x2 - p3^2 x1 x3 - p1^2 x2 x3 + 2 p1 p3 x2 x3 - p3^2 x2 x3
into this form,
...
-1
votes
1
answer
62
views
Factorize expression by specific term [closed]
I am new to Mathematica but I would like to know how to force Mathematica to factorize an expression by a specific term.
Exemple, imagine I have a term like this:
And I have an expression like this:
...
5
votes
3
answers
155
views
Factoring a quadratic form associated with a $4 \times 4$ matrix into a sum of four squares
The matrix W = $\left(
\begin{array}{cccc}
5 & 7 & 6 & 5 \\
7 & 10 & 8 & 7 \\
6 & 8 & 10 & 9 \\
5 & 7 & 9 & 10 \\
\end{array}
\right)$
has a ...
2
votes
0
answers
109
views
A remarkable elimination involving the basic reproduction number R0
I have a polynomial pol of third order, whose coefficients depend on 5 parameters, and whose free coefficient is proportional to R0-1, where R0 is a certain rational function of the parameters (the ...
1
vote
0
answers
67
views
“Largest” symbolic common factor of an integer sequence (not simply GCD)
Suppose, I have a finite fragment of a quickly increasing sequence of integers $\{a_n\}$ that is too complex, unusual, or irregular for FindSequenceFunction to find ...
1
vote
2
answers
106
views
Finding coefficients where part of the coefficient may appear in the terms
A minimal example is given below. My goal is that given a algebraic expression such as:
expr = a^2 + a b + a^3 b + 2 a^2 b^2 + a b^3
I'm trying to find a command, ...
3
votes
1
answer
125
views
Is there a way to collect the multiple power into a single power?
I am looking away to factor perfect powers like follows:
FactorPerfectPower[16x^2] should produce Inactive[Power][4x,2].
...
0
votes
1
answer
45
views
Simple Question: Cut Number in Transfer function
Given transfer function:
$W=\frac{10 (s+100)}{2 s^4+219 s^3+1909 s^2+900 s+1000}$
W=(1000 + 10 s)/(1 (1000 + 900 s + 1909 s^2 + 219 s^3 + 2 s^4))
Which command to ...
2
votes
0
answers
121
views
Approximate integer factorization
Suppose we would like to compute an approximate prime factorization of a large integer x in the sense that the difference between ...
0
votes
5
answers
158
views
How to convert $a(x-p)^2+q$ to $a(x-\alpha+i\beta)(x-\alpha-i\beta)$ for any real $a$, $p$ and $q$ [duplicate]
I want to factorize any quadratic expressions into two complex-valued linear expressions.
My effort below
...
3
votes
1
answer
59
views
Expression should vanish under assumptions. How can I use Mathematica to simplify this type of of expression (and similar)?
This is maybe the worst type of question because it is super specific, but I am hoping that some Mathematica function or rule exists (built-in or custom) that can be helpful for simplifying a somewhat ...
1
vote
1
answer
115
views
Factorize the multivariate polynomial [closed]
I came across the following problem:
Factorize the multivariate polynomial given by:
$$w*(A^2-2l*A+1)*f+v*(B^2-2m*B+1)g+u*(C^2-2n*C+1)*h+(w*(x+2A*l+A*s-l*s-A^2-1)+v*(y+2B*m+B*t-m*t-B^2-1)+u*(z+2C*n+C*...
0
votes
2
answers
75
views
Extract subscript of variable in product
My input is a product of the variable x with index:
x[1]^2 x[5] x[7]
How do I extract the indices of the above product to get ...
0
votes
1
answer
120
views
How to prime factorise rational numbers [closed]
I'm aware of the built-in FactorInteger command for finding the prime factorisation of integers. Is there a convenient way of determining the same thing for a rational number, where the prime ...
0
votes
1
answer
125
views
Factorizing large numbers [closed]
I am trying to factorize large prime numbers with the code bellow. The code works properly for values like 1927 and 69527 (results), but gives no result for larger values like 655051. The code goes as ...
1
vote
2
answers
114
views
How can I test if the sum of two divisors of a number add up to a perfect square? [closed]
Let's say I have a number $n$ and I want to find the divisors of $n$, I can do that using Divisors[n]. That will generate a list ...
3
votes
1
answer
92
views
Return the factors of a partially-factored polynomial, without factoring
Suppose I have an integer polynomial f that is in a factored form, say f = (1 + x) * (2 + x + x^3) * (2 + x^5). I want a ...
5
votes
1
answer
130
views
Check if polynomial is in factored form, without factoring
I have a large list list of integer polynomials, all of which are the output of Factor. So my list looks something like this: <...
2
votes
0
answers
120
views
About Fermat's Integer Factoring algorithm
An implementation of Fermat's algorithm that is a slight improvement on code in this book is here.
...
5
votes
3
answers
287
views
Speeding up FactorInteger for product of two primes
I have a large integer $N$ of size about 10^150. I know that $N$ is a product of two primes $p$ and $q$. I also know that both $p$ and $q$ are of roughly equal size, so one of them is not, for example,...
1
vote
3
answers
168
views
How to factorize $f(x,y)$ into $f_1(x)f_2(y)$? [duplicate]
Suppose we have a real function $f:\mathbb R^2 \rightarrow \mathbb R$ and we would like to know if this function factorizes into $f(x,y)=f_1(x)f_2(y)$ for some real functions $f_1,f_2$. Is there an ...
3
votes
2
answers
223
views
How to factor a polynomial expression with variable coefficients (and imaginary values)
How can I factor terms with variable coefficients?
For example for the expression: $x^2 + a$
I know that I can factor this to: $(x+i\sqrt{a})(x -i\sqrt{a})$
How do I do this in mathematica?
I would'...
2
votes
3
answers
171
views
Collect with a product of patterns
In the examples below, I notate Subscript[S, n] as Sn for brevity.
I'm trying to take expressions like
...
1
vote
5
answers
118
views
How to find the 2 smallest integers that is divisible by 40131 and 41405 [closed]
I'm trying to find the two smallest integers that is divisible by 40131 and 41405, i.e 40131|a, 41405|a, 40131|b and 41405|b. There is a hint within the question that says you can use FactorInteger[] ...
4
votes
2
answers
320
views
How to write a positive function as sum of positive terms only
A multivariate polynomial function can be written in a certain form (x^m (1-x)^n y^k + ... ) if the function is Positive in the whole domain and contains a finite ...
0
votes
0
answers
36
views
Can you save each factor of a polynomial?
I have a question I'm factoring a polynomial in Mathematica. After having the polynomial factored, I want to manipulate each factor. So my question is if there is anyway I can save each factor in a ...
4
votes
0
answers
172
views
Prime factorization over the Eisenstein integers $\mathbb{Z}[\zeta]$
I am trying to write a function f[a_,b_] which takes in two integers $a,b$ and returns the unique factorization of $a+be^{2\pi i/3}$ into the primes belonging to $\...
1
vote
1
answer
58
views
A question about FactorList[] [closed]
FactorList[24 + 80 x + 102 x^2 + 62 x^3 + 18 x^4 + 2 x^5]
{{2, 1}, {1 + x, 2}, {2 + x, 2}, {3 + x, 1}}
what does the "1" of "{2,1}" mean?
0
votes
0
answers
66
views
Help me factor this equation
I have the following equation:
$$\frac{2\left(a A_3 r + \frac{1}{2} r^2 a'^2 \right)}{a^2 r^2}=\frac{8 G \pi \rho}{3}-\frac{c^2 k}{a^2}$$
...
0
votes
2
answers
645
views
How to factor a polynomial expression in MATHEMATICA?
I want to factorize the following polynomial in MATHEMATICA:
$1 - 2 r + r^2 - 2 s + 2 r s + s^2 - 2 t + 2 r t + 2 s t -
4 r s t + t^2$.
...
1
vote
1
answer
127
views
Force factor extraction from a polynomial [closed]
I have the following polynomial
$$27 m^7 + 117 m^6 s^{\frac{1}{2}} - 114 m^5 s - 273 m^4 s^{\frac{3}{2}} + 15 m^3 s^2 +
91 m^2 s^{\frac{5}{2}} - 7 s^{\frac{7}{2}}$$
and I want to force Mathematica to ...
5
votes
1
answer
122
views
Split Expression Into Constant And Non-Constant Summands
I have a partially t-dependent matrix which I want to split into its t-dependent and its t-...
5
votes
2
answers
126
views
What exactly does FactorTermsList do?
What exactly does FactorTermsList do? The documentation is not complete in that it only gives examples, not a precise definition:
What exactly is the "overall ...
0
votes
1
answer
66
views
Reducing large polynomial expression to product of simplar polynominals
A beginner to Mathematica.
I am trying to express a large symbolic polynomial expression as a product of factors of simpler polynomials:
For example I was able to factor this expression:
...
1
vote
1
answer
188
views
Cancel out common factors in algebraic expressions that are equal to zero
I have the following original expression:
(100 c)/(e y) + (100 b x)/(e y) + (100 a x^2)/(e y) == 0
which, after factoring out the common terms looks like this ...
6
votes
1
answer
378
views
(Eisenbud) Factorization of a polynomial into factors with matrix coefficients ("matrix factorisation")
According to the work of David Eisenbud cited below, it is possible to factorize almost any polynomial with matrices (exclusions ~ no linear terms), and this has apparently been of great use to string ...
0
votes
1
answer
315
views
Factor polynomial with specific common variables (terms)
I want to factor the following polynomial:
b*p - b*q + c*q - c*r - a*(p - r)
When I use the function FactorTerms. I get the ...
0
votes
2
answers
61
views
Removing all prime factors less than n from a number
Is there an efficient way to check a number x and remove all prime factors in the number which are less than some n? For example for n = 200:
...
2
votes
1
answer
108
views
Factorizing non commutative terms
Is it possible to factor
a ** b ** c - a ** b ** d
as
a ** b ** (c - d)
?
I am using ...
1
vote
0
answers
54
views
Why is the result of MMA polynomial mod factor different from that of this article? [closed]
Why the polynomial mod factor of MMA is not the same as the result of this SE answer:
...
0
votes
0
answers
42
views
Arrange a polynominal
I have a complex polynomial in more than ten line. I want to rearrange it by the power of another polynomial. For example, I have a powers of (1-A(x)/x^2) as a factor in it, and I want to sort the ...