Questions tagged [factorization]
Questions on factoring various types of mathematical expressions, with the use of Factor, FactorInteger, FactorSquareFree and related commands.
189
questions
1
vote
2
answers
271
views
Polynomial factorization over number fields that are extensions of the rationals [duplicate]
I want to factor some polynomials into irreducible terms, but not only limited to integers.
If I evaluate Factor[x^4+1], it will generate nothing.
But in fact I ...
0
votes
0
answers
194
views
Pull out variable and common denominator from fraction
I have this code:
...
3
votes
2
answers
608
views
Factor out constant terms with square roots
I would like to use FactorTerms to factor out constant numerical terms out of an expression, this works as follows:
...
0
votes
0
answers
196
views
Prime factorization of numerator and denominator of rationals
I am completely new to Mathematica and I need some help (sorry if it is trivial, but I haven't found the answer). I have this code
...
2
votes
1
answer
239
views
How to factor exponents?
Given
Exp[a+b]
I want to turn it into
Exp[a] Exp[b]
How can I achieve this in general? That is I am looking for more or ...
4
votes
1
answer
454
views
Checking whether one polynomial is a factor of another
Given two polynomials, $f(x)$ and $g(x)$, I need to determine whether $f(x)$ is a factor of $g(x)$. Seems simple enough, and the way I initially did it was just checking if $f(x)$ is in a FactorList ...
2
votes
1
answer
64
views
Advanced Trivariate Polynomial With Integer Coefficients Manipulation
Suppose $$f(a,b,c)=\left(a+b+c \right)^{2}-2 \left(a^{2}+b^{2}+c^{2}\right)-4abc$$ and $g(a,b,c)$ is some polynomial of total degree 6 with integer coeffients.
I want to find a polynomial $h(x)$ with ...
1
vote
1
answer
360
views
How can Mathematica take a prefactor in front of the relation
I have the following term in an expression
$$\frac{q_B' \sin2q_B}{P_B Q_B^2}(2 Q_B P_B - \sin^2 q_B \Pi_B) q_1 q_1'$$
the prime denotes differentiation w.r.t a coordinate. Some additional ...
2
votes
1
answer
110
views
wrong LUDecomposition - first row is the last one
I am having a huge problem with my Mathematica notebook.
I am trying to evaluate LUDecomposition and it keeps getting wrong - when I multiply ...
4
votes
2
answers
378
views
How to convert an expression a + b*Sqrt[c] to a simpler format?
Example: we have the following expansions:
...
1
vote
2
answers
87
views
how to extract the elements of the output of FactorInteger function? [closed]
For example, when I evaluate
FactorInteger[265^2 - 87463]
the output is
{{-1, 1}, {2, 1}, {3, 1}, {13, 2}, {17, 1}}
I ...
1
vote
1
answer
63
views
Factor by a specific literal (i.e factor by $s^N$ a transfer function)
I've found the closed loop transfer function but I want to know the order of it. So, the idea is to factor the denominator by the highest exponent of s to get an expression like this one:
$$
l(s)=g(s)...
1
vote
3
answers
320
views
factorization of integer into two parts with specific prime factors
I would like to write a Mathematica code to decompose an integer into two or more parts with primes in special intervals.
For instance, I want to decompose $m=\binom{n}{k}$ into two parts U and V ...
0
votes
1
answer
26
views
Scalar multiplication of an expression containing equality [duplicate]
Suppose:
expr=(a x + a y==0);
expr/a
(*Out:=(a x + a y==0)/a*)
I want a eliminated to obtain ...
1
vote
1
answer
259
views
Factor Recursively
I'm looking for a way to factor a polynomial recursively. Consider the following example:
expr = Expand[(a + (b + c)^2)^2];
Factor@expr
Simplify@expr
While the ...
38
votes
5
answers
2k
views
Factorisation diagrams
Here is a way to visualize the factorisation of natural numbers. How do we get this or a similar kind of output using Mathematica?
See the list of images generated for number from 1 to 36:
14
votes
4
answers
990
views
Why Mathematica can not factorize polynomials over algebraic fields?
I noticed that a factorization over algebraic fields is useless in Mathematica. Here is the example over the field containing I*Sqrt[3]:
...
6
votes
2
answers
172
views
How to factorize polynomials into "shortest possible" pieces
I am using Factor a lot in my work, it is extremely versatile and efficient, except for one aspect. Example: ...
5
votes
2
answers
135
views
Why is Mathematica factoring I out of real expressions, and how can I reverse it?
I am doing some complicated series expansions involving integrals and whatnot, but everything is real the whole time (and I specify that using Assumptions at every ...
6
votes
1
answer
176
views
Factorize expression into matrix/vector operations if possible
I'd like to let MMA factorize an expression (tensor) into matrix operations if that's possible.
Example – there's an expression P1 and I want MMA to create another ...
0
votes
0
answers
145
views
Put in evidence and return 1 if already fully factorised
Does anyone have a clever idea how to get the overall factor in front of a polynomial or just return 1 if everything is already put in evidence ?
Here is an example with a dummy ...
0
votes
2
answers
157
views
Simplify with Integer Factorization
I have some outputs of Solve applied to algebraic equations with combinatorial coefficients (i.e. integers), and I'd like to see the results from ...
0
votes
2
answers
72
views
Collect function with iterator issue
I've got the following code for the first few terms of an expansion. I want to collect the terms in increasing powers of (s/r) but using an iterator. The code is as ...
1
vote
1
answer
476
views
Factor Denominator of Fraction [closed]
How do I get Mathematica to factor the denominator of a fraction? For example, to turn
$$\frac{1}{s^2+3s+2}$$
into
$$\frac{1}{(s+1)(s+2)}.$$
I tried Factor, but it ...
0
votes
2
answers
294
views
Powers of prime factors of a positive integer $n$ in "Mathematica"?
I would like to find the powers of a prime in the unique prime factorization of an $n$. I want a function $f[n,p]$ such that $n,p$ are given and I need to know what the power of $p$ is. For instance
...
1
vote
0
answers
73
views
What prevents Factor from Working also on Arguments of Sqrt in Expressions?
Consider this example (intersection of a line and a sphere):
...
3
votes
2
answers
1k
views
Factorization of a polynomial fraction to a certain combinations of other polynomial fractions
I currently am working on a project for to find some new algebra structures. But I faced with a factorization problem which I cannot come out of it! I could find the lower dimensional of it. But I ...
13
votes
3
answers
2k
views
Factor a polynomial over the reals
I can't seem to find a function in Mathematica that factors a polynomial over the reals. Obviously, Factor doesn't work since it works over the integers, over $\mathbb{Z}_p$, or some algebraic fields ...
3
votes
1
answer
574
views
Efficiently create a list of factors of consecutive integers
I'm interested in a scalable (read: sublinear) algorithm for producing the list of integer factors of each integer from 1 to n. ...
4
votes
2
answers
437
views
Factoring for exponents
How can I factorise into powers of integer exponents?
An expression such as,
...
4
votes
0
answers
175
views
5
votes
1
answer
139
views
Trouble factoring an expression
I've got the term $-1 + 2b^2 + 2b\sqrt {b^2-1}$ appearing several times within several larger expressions. It is easy to see that this expression factors into ${(b+\sqrt{b^2-1})^2}$, but when I use <...
6
votes
6
answers
765
views
Rewrite a real polynomial in real (but only linear and quadratic) factors
According to my calculus book: "Every real polynomial can be factored into a product of real (possibly repeated) linear factors and real (also possibly repeated) quadratic factors having no real zeros....
1
vote
2
answers
950
views
How can I factor my trigonometric equation?
The equation
$$3\sin^2 x - 3\cos x -6\sin x + 2\sin 2x + 3=0$$
has a solution $x = 0$. That means it has a factor of $\cos x - 1$. I tried to write the given equation has the form
$$(\cos x - 1)P(...
0
votes
1
answer
137
views
Selecting terms on only one variable from a multiple-variable expression
Say I have a polynomial like
$x y^2+15x^2 y+x+3y+10$
and I want to obtain, say, only the coefficient in $x$ alone, namely a 1. Using
...
3
votes
1
answer
577
views
How to efficiently find only the rational roots of a rational complex polynomial?
I need to find all the rational roots of a bunch of high-order polynomials with rational complex coefficients. Is there an efficient way to do this?
My best effort on an example polynomial:
...
8
votes
2
answers
2k
views
Collect/Factor a fraction
Is there a way to tell Mathematica to factor things only containing a specific combination of a fraction, example:
$$\tag{1}f = \frac{a+m\cdot a+b+n\cdot b+c+k\cdot c+d+e}{ab}$$
Is there a way to ...
3
votes
1
answer
395
views
Can Mathematica factor a polynomial over an algebraic number field?
If I input:
Factor[x^2 + x + 1, Extension -> Sqrt[-3]]
Mathematica returns:
...
1
vote
1
answer
97
views
Formatting the prime factorization of expressions
I have a series expansion in $x$ and $a,b$ are constants which I want to type in $\LaTeX$. But the numbers/integers are pretty large (have a lot of digits) so it becomes a bit messy in $\LaTeX$. ...
1
vote
1
answer
118
views
Timing and ListPlot
I am currently trying to examine the Timing function as it relates to generating primes and factorize large integers. What I want to do is to visualize how time ...
-5
votes
1
answer
335
views
Finding a seven-digit number with all of its prime factors less than 20? [closed]
How can I find a seven-digit number with all of its prime factors less than 20?
I have no clue how to do this.
2
votes
1
answer
139
views
One of the factors greater than $x$
Is there an easy way to tell Mathematica to find one of the prime factors of $n$ greater than $x$. For example, if $n=1299709\cdot 7919 \cdot 17$, is there a way to request a factor greater than $100$....
4
votes
2
answers
422
views
Represent a positive integer as a product of its factors
I am trying to illustrate some simple ideas with exponents. I can manually express something like $5^4$ as $5 \cdot 5 \cdot 5 \cdot 5$, but wondered how to get Mathematica to do that for me.
I ...
2
votes
2
answers
310
views
Selecting divisors of a large number that meet some criteria using the factors list
I have a list that represents a factorization of a number: its format is identical to the output of FactorInteger. I need to select the divisors that meet some ...
3
votes
1
answer
860
views
Factor fraction, where variable occurring in both, numerator and denominator, only appears once
I have an expression like $$\frac{1+a^2+2 a \cos\left(p\right)}{\left(1+b^2\right)z-1-a^2-2 \left(a+b z\right)\cos\left(p\right)}\text{.}\tag{1}$$
Is there a combination of Mathematica functions to ...
0
votes
1
answer
180
views
How to write an expression in the desired form?
I have the following code:
...
1
vote
0
answers
52
views
Factoring rationals from equation based on digit complexity?
Consider an equation of the following type:
( poly = (3 x)/35 + (6 y)/7 ) == 0
If we apply the command Factor to this ...
2
votes
1
answer
133
views
How to replace $-x^{}\,y^*-y^{}\,x^*$ by $-(x^{}\,y^*+y^{}\,x^*)$?
Up to now, I have tried some codes like the following:
...
1
vote
0
answers
113
views
decomposing an expression into absolutely positive terms
I have a big ugly expression which, for unimportant (here) reasons, must be greater than or equal to zero. It is formed from terms which themselves are greater than or equal to zero.
As such it ...
9
votes
1
answer
8k
views
Factoring out a common term
Very simple question, but I can't find a simple answer here or in the documentation. I have an expression:
qq = a x + b x^2 + c x^3
and wish to factor out a ...