# Tag Info

## Hot answers tagged coefficients

### How to extract coefficients and powers from expressions with non integer powers?

Clear["Global*"]; expr = 3 - 2 x + 7 x^2.1 + x^2.4 - 5 x^3; Transpose[{Exponent[#, x], # /. x -> 1}] & /@ List @@ expr {{0, 3}, {1, -2}, {2.1, 7....
• 55.7k

### How to extract coefficients and powers from expressions with non integer powers?

ce = Apply[List/*Map[List]/*ReplaceAll[a_. x^b_. :> Splice @ {b, a}]/*PadLeft]; ce[3 - 2 x + 7 x^2.1 + x^2.4 - 5 x^3] ...
• 398k

### How to extract coefficients and powers from expressions with non integer powers?

You may use pattern matching to achieve what you want: ...
• 53.1k

### How to extract coefficients and powers from expressions with non integer powers?

coefList = List @@ # /. #2 -> 1 &; expList = Exponent[##, List] &; expCoefList = Transpose @* Through @* {expList, coefList} Examples: ...
• 398k

Using Cases: ...
• 25.9k

### How to extract coefficients and powers from expressions with non integer powers?

? Maybe: MapAt[Total@*(Exponent[#,x]&/@Variables[expr] #&),1]/@List@@@CoefficientRules[expr] (* {{3.,-5.},{1.,-2.},{2.1,7.},{2.4,1.},{0.,3.}} *)
• 20.2k

### How to extract coefficients and powers from expressions with non integer powers?

I'd expand the exponents until they are integers: ...
• 48.3k

### Creating a list of functions with desired coefficients

Instead of using Subscript[x, 1], I suggest using x[1]. You can still use Format to display ...
• 27.3k

### How to extract coefficients and powers from expressions with non integer powers?

expr = 3 - 2 x + 7 x^2.1 + x^2.4 - 5 x^3; Using ReplaceAll ...
• 78.2k

### How to extract coefficients and powers from expressions with non integer powers?

Direct pattern-matching solution: expr = 3 - 2 x + 7 x^2.1 + x^2.4 - 5 x^3; List@@expr /. {a_. x^b_. :> {b, a}, c_?NumberQ :> {0, c}}
• 2,870
Accepted

### Getting coefficients list of a series expansion at a point different from 0

One way is to do the following: expand to whatever order you want, and subsequently substitute $x-1$ by $y$. Do CoefficientList in the ...
• 16.2k
Accepted

### How can I extract a matrix and vectors of coefficients from this quadratic expression?

The function you are looking for is "CoefficientArrays". E.g. for your polynomial: var = {x, y, z}; poly = (x - y + a)^2 + (x - z + b)^2; we get the ...
• 53.1k

### Extracting the constant term

expr = 1/4 (-1 - Subscript[φ, 49, 50] - Subscript[φ, 50, 49]) + Subscript[φ, 50, 50]]; Two positional solutions For subscripted variables ...
• 78.2k
Accepted

### Comparing two power series and extracting their coefficients

In sum2, the powers of x and y are less than or equal to 6, whereas in ...
• 23.9k
Accepted

### Extracting coefficients from a list of expressions

Here's an automated solution that detects the relevant variables in the expression: ...
• 23.9k

### Neglecting coefficients of a given list

Using CoefficientRules and FromCoefficientRules: ...
• 25.9k

### Neglecting coefficients of a given list

Clear["Global*"]; exp1 = a1*a2*24 + a1*a2*a3*kk*25 + a1*a2^2 + a1*a2*a3*34; DeleteCases[List @@ exp1, _?NumericQ | kk, {2}] {a1 a2, a1 a2^2, a1 a2 a3, ...
• 55.7k
1 vote

### Differential behaviour of FreeQ function depending on the number of terms in a sum

I think these produce the desired output: ...
• 238k
1 vote

### Extracting matrix coefficients from multivariate matrices

Not sure why you're using C array indices (start at zero) instead of Mma indices (start at one), nor why you ignore one of the matrix entries in the output. If that's not what you're doing, then I've ...
• 238k
1 vote
Accepted

### How can I find coefficients of quadratic and cubic terms?

We can use a trick here: Instead of writing just r[t_, l_] = rb[l] + 𝜁[t, l]*nr[l]; x1[t_, l_] = xb[l] + 𝜁[t, l]*nx[l]; I used ...
1 vote

### Inversion in Fourier coefficients estimation problems

This is pretty easy. Note, I am using indexed variables instead of subscripts because these give less problems than subscripted variables: For an example I use n=2, m=3. We first create the matrices ...
• 53.1k

Only top scored, non community-wiki answers of a minimum length are eligible