Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [factorization]

Questions on factoring various types of mathematical expressions, with the use of Factor, FactorInteger, FactorSquareFree and related commands.

0
votes
1answer
37 views

Not able to multiply the output of the code below

It is the output of the code given below ...
0
votes
1answer
59 views

Approximate Simplify (or factorization) [closed]

Suppose I have $$(2+2a+a^2)(RC)^2 + RC(5+2a)t+t^2$$ I can factor $(2+2a+a^2) = 1+(1+a)^2$. When I assume $a \gg 1$ then $1+(1+a)^2\approx (1+a)^2$. Then I can write: $$(a+1)^2(RC)^2 + 2RC(5/2+a)t+t^...
0
votes
2answers
49 views

Factor not factoring quadratic polynomial [closed]

I'm using version 11.3 Expand[(Sqrt[2] - t)^2] 2 - 2 Sqrt[2] t + t^2, but ...
0
votes
1answer
28 views

Multiple collection of terms

As the title suggests, I am interested in how to perform multiple collection of terms. This means that for a given expression a*x*b + c*x^2*d+a*x*k, I want to ...
1
vote
1answer
68 views

Can Mathematica factor out constrained functions when it simplifies? [closed]

For example, distributions in the exponential family take a likelihood function of the form $$f(x)g(\theta)e^{\phi(\theta)^{T}u(x)}$$. Given some ugly algebraic expression, can I tell mathematica to ...
0
votes
0answers
29 views

Simplifying expressions: factorization: reverse distributive property

Is there any Mathematica of the type Factor, FullSimplify, etc. that fully reverses distributive property? I mean, is there a simple way to turn the expression $$ e^{x(t,r)}+e^{x(t,r)+y(t,r)}+e^{x(t,...
7
votes
2answers
303 views

Efficient code for minimum integer with given number of factors

I'm seeking an efficient implementation of the number-theoretic function giving the smallest integer $n$ that has exactly $k$ factors (not necessarily prime): ...
0
votes
1answer
30 views

Factoring out a parameter

I have some function: f[a_,b_,c_]:=Sqrt[a^2+b^2+c^2] Is there a way that I can factor out parameter (variable) b like this: <...
5
votes
3answers
201 views

Factor polynomial of degree n+3

I'm considering a polynom poly[n,v] in v ...
2
votes
0answers
49 views

What Transforming Functions does Simplify use? [closed]

Edit: Turns out in my use case I should use ComplexExpand instead of Simplify. My broader question is still worth answering, but ...
0
votes
2answers
41 views

Numerical output using Select and FactorInteger

I have concocted a function from other peoples examples to find the powers of two in a prime decompostion, in the example below its $2^2=4$ gives {2,2}. ...
3
votes
1answer
93 views

Factoring expression with rational powers

To any great Mathematica-matician. Why Mathematica can’t factor this Factor[-1+x^(2/3)] I know that Factor mainly targets ...
0
votes
1answer
54 views

Generate terms that can be pre-calculated (optimisation) [closed]

(copyable version) v -> -2 g/j + s/(2 j) + s^2/(4 g j) + t/2 We are working with many equations similar to the one above. We are using CForm to move these ...
0
votes
0answers
36 views

Inconsistent pole/roots decomposition

I have the following function f of ω: ...
0
votes
1answer
121 views
0
votes
1answer
86 views

Factoring the Quadratic Polynomial $a x^2 +b x +c$

I want mathematica to factor the quadratic polynomial $a x^2 +b x +c$ into this standard form $a(x-r_1)(x-r_2)$ with $r_1=-\frac{b}{2a}+\frac{\sqrt{b^2-4ac}}{2a}$ and $r_2=-\frac{b}{2a}-\frac{\sqrt{b^...
0
votes
0answers
81 views
1
vote
2answers
100 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 ...
3
votes
2answers
232 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
0answers
99 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 ...
-1
votes
2answers
175 views

How to use Replace using some factor from exponent in the replacement rule

Is it possible to directly factor out some exponent to some specific form and replace by some rule? For example I have exp1=x^4 I want to use replacement <...
2
votes
1answer
65 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 ...
25
votes
2answers
2k views

Code I get from wolfram isn't working in mathematica

I need to perform the factor as shown here factor(s^5+32s^4+363s^3+2092s^2+5052s+4320) https://www.wolframalpha.com/input/?i=factor(s%5E5%2B32s%5E4%2B363s%5E3%...
4
votes
1answer
155 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
1answer
50 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
1answer
124 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
1answer
62 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
2answers
326 views

How to convert an expression a + b*Sqrt[c] to a simpler format?

Example: we have the following expansions: ...
1
vote
2answers
55 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
1answer
39 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)...
0
votes
1answer
24 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 ...
14
votes
4answers
672 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]: ...
8
votes
1answer
213 views

Factor fails on a simple expression

Bug introduced in 9.0 and fixed in 11.3.0 Consider the following symbolic expression (all the c's are undefined) ...
1
vote
1answer
128 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 ...
5
votes
1answer
279 views

Factor a bivariate polynomial treating one variable as constant

I have a polynomial in two variables, e.g. 16384 k^4 - 20480 k^2 + x^4 - 320 k^2 x^2 - 128 x^2 + 4096 I'd like Mathematica to factor it as $$(x^2 - f(k))(x^2 - g(...
7
votes
2answers
140 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
2answers
125 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 ...
13
votes
1answer
314 views

Factorize trigonometric matrices

Consider two square matrices $A_1$ and $A_2$. Consider the following matrix involving matrix trigonometric functions: \begin{equation} M_1(t)=\begin{bmatrix} \cos(tA_1) & t\mathrm{sinc}(t A_1) \\ ...
5
votes
1answer
119 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
0answers
98 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
2answers
118 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
2answers
57 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 ...
2
votes
2answers
127 views

Simplify to the specific form

I want to simply expression into specific form that I want to have. For example, $e^{-v^2}\frac{ (a*v-b)}{c*v^2-d*v+e}$ (-b + a v)/(e - d v + c v^2) Exp[-v^2] I ...
1
vote
1answer
209 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
2answers
158 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
0answers
62 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
1answer
203 views

Factorization of a fractional multivariate polynomial

Suppose I have given a fractional multivariate polynomial ...
10
votes
3answers
784 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
2answers
757 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 ...
3
votes
2answers
174 views

Factoring for exponents

How can I factorise into powers of integer exponents? An expression such as, ...