Questions tagged [coefficients]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
2 answers
71 views

Normalizing the output of Apart

My question is closely related to this one but the accepted answer does not meet my needs. I have a rational function $f(x)$ in one variable which admits a partial fraction decomposition of the form $$...
user avatar
1 vote
1 answer
107 views

Problem in getting coefficients list of power series solution of y''[x]*y'[InverseFunction[y][x]] - y'[x] == 0?

I have tried to get solution of the following ODE: y''[x]*y'[InverseFunction[y][x]] - y'[x] == 0 Using the code given below, the solution is a formal power series ...
user avatar
1 vote
1 answer
49 views

Coefficients of a multivariate polynomial

Let's say I have the polynomial $x+2y+3xy \in \mathbb Q[x,y]$ or $x_1+2x_2+3x_1x_2 \in \mathbb Q[x_1,x_2]$, that is x+2y+3xy or ...
user avatar
  • 335
1 vote
0 answers
43 views

Nonlinear Model Fit - Force a Constrain

I am trying to achieve the best fit for a non linear model, yet I need to ensure that certain coefficients return as positive values. I have been looking for similar questions but I have found nothing ...
user avatar
  • 13
3 votes
3 answers
90 views

Get coefficient of a symbolized symbol in a sum that involves other symbolized expressions

My mathematica notebook begins with symbolizing all expressions of the form $x$ subscript an integer, "$x_k$", ...
user avatar
  • 165
4 votes
2 answers
117 views

Extracting the constant term

Finite difference problem There are a large number of variables, interacting at most five at a time. A sample term is: How to extract the constant term? In this example, the constant term is -1/4.
user avatar
  • 956
1 vote
2 answers
109 views

How to write code for SeriesCoefficient to work for non integral coefficients?

I have a function of $r$ which I expand at $\infty$ using Series. It is a complicated and messy function, with a parameter $0 \leq \epsilon < 1$. After expansion,...
user avatar
1 vote
0 answers
127 views

How to evaluate an Integral which has Interpolating functions

I am trying to evaluate an Integral which has products of Interpolating functions inside, using NIntegrate command. It gives a wrong answer. The code that I used for performing this task is given ...
user avatar
  • 313
4 votes
0 answers
222 views

Finding Coefficients in a Perturbation Problem related to Chaotic Dynamics

I am trying to reproduce the results from this paper: Chaotic dynamics of a suspended string in a gravitational background with magnetic field I am currently stuck with finding the coefficients. First ...
user avatar
  • 313
11 votes
2 answers
632 views

Out of memory when computing a coefficient of a large symmetric polynomial

...
user avatar
2 votes
1 answer
75 views

Plotting of a polynomial function via two approaches

I am trying to plot a polynomial via two approaches: Take CoefficientList of the polynomial and then take Internal`FromCoefficientList, and finally replacing the value of the free parameter with a ...
user avatar
0 votes
1 answer
71 views

Series development of laurent in a defined domain

I am trying to correct some bills for laurent series with mathematica, but the output I am getting at the moment is not the best. For example, I have this function $$\frac{1}{z^2 + 9}$$ to develop at ...
user avatar
  • 121
0 votes
1 answer
52 views

Create a general polynomial function [duplicate]

I search for a simple procedure to create a polynomial function with unknown coefficients. For example if I asked for the most general polynomial of two variables 'x' and 'y', of second degree, it ...
user avatar
1 vote
1 answer
74 views

Replace coefficients in a polynomial

I want to replace the coefficients of a polynomial by new coefficients. For example, my polynomial of variable 'r' is in the picture I want to replace the coefficients with 'a subscripts' similar to ...
user avatar
  • 11
1 vote
0 answers
78 views

Coefficient works on $\pi$, $x$ and $x^2$, but not on $\pi ^2$

Consider (\[Pi] + 2 \[Pi]^2 + 3 x + 4 x^2) Executing ...
user avatar
  • 1,185
1 vote
2 answers
98 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, ...
user avatar
  • 707
0 votes
1 answer
82 views

Collecting coefficients of non-commutative products from an expression

I am trying to manipulate a Hamiltonian with non-commutative operators, $a_j,a_j^\dagger$. After some algebra using NCAlgebra package in Mathematica, I have an expression like, $$H = C_1 (b**a) + C_2 (...
user avatar
2 votes
1 answer
197 views

How to expand a function as a linear combination of other functions?

I would like to be able to expand certain functions as linear combinations of other specified functions when I know that the original function can be represented in such a way e.g. we know that $\sin^{...
user avatar
  • 837
0 votes
1 answer
79 views

The list of coefficients of the "polynomial", which has the order of derivatives instead of degrees

I have some equation eqn = (A + B).x''[t] + Transpose[x'[t]].(2 A - 3 B + 1).x'[t] +(СС - 5).y'[t]+ Sin[x[t]+y[t]] I need to collect all the coefficients at ...
user avatar
  • 1,847
0 votes
2 answers
76 views

Kernel dies when trying to compute coefficients in a linear sum involving expressions like b[1,2][3,4]

The following happens on 11.0.1.0: Have ...
user avatar
1 vote
0 answers
44 views

How to extract the coefficient all the monomials of an arbitrary polynomial efficiently?

At present I know 3 efficient function to generate a list of all the monomials and the corresponding coefficients of an arbitrary polynomial. They are CoefficientRule, MonomialList and GroebnerBasis`...
user avatar
  • 63
1 vote
0 answers
54 views

Problem using KarhunenLoeveDecomposition

I have a matrix called stochasticData.mat which size is 211302*50 and I need to perform the Karhunen-Loève decomposition on it to calculate the uncorrelated random variables. Note that stochasticData....
user avatar
3 votes
0 answers
32 views

Unexpected behaviour with Coefficient

If I run expr = (CF G[0, zb])/(1 - zb) + (CF zb^2 G[0, zb])/(1 - zb) + (2 CF G[1, zb])/(1 - zb) + (2 CF zb^2 G[1, zb])/(1 - zb); Coefficient[expr, zb, -1] in ...
user avatar
  • 31
0 votes
1 answer
35 views

Is it possible to automatically check a polynomial to determine whether it has integer coefficients?

Given a polynomial f, I want to determine whether f has integer coefficients. More specifically, define M[f_]:=MonomialList[f]. Is it possible to determine ...
user avatar
  • 1
0 votes
1 answer
56 views

Extract coefficients and terms in polynomial expansion [closed]

I have a polynomial in $a$ and $b$: $$(Aa^2 + Bb^2 + Ca + Db + E)^m$$ How can I construct a table of coefficients corresponding to all different products $a^i b^j$ in the expansion for a defined $m$, ...
user avatar
  • 883
3 votes
2 answers
133 views

Finding the coefficients of an expression

I have a set of formulas of the following form: ...
user avatar
  • 1,549
1 vote
0 answers
54 views

Defining general recurrence expression and extracting coefficient

I'm new to Mathematica and I wish to solve a difference equation which is defined by the relation: $y_{i-1}-2y_{i} +y_{i+1} = f(x_i,y_i),\\y_0 = a, y_n = b.$. Where $x_i$ is given for all $i$. I want ...
user avatar
1 vote
1 answer
99 views

Series expansion with criteria on the coefficients

I will first do an illustrative example. Suppose I have the following function: $ f(\vec{x},\vec{t})=\frac{x_1x_2}{(1-x_1 x_2^{-1} t_1)(1-x_2x_1^{-1} t_2)}$ I want to expand it with respect to $(t_1,...
user avatar
3 votes
2 answers
108 views

Comparison of Coefficients involving complex exponentials

I'm trying to solve a couple (independently) of equations of the following type $ a_0 x + 3 a_1 y(1 + xe^{i3q} + e^{-iq + 2ip}) + ... = 0, \forall x, y, q, p$. Using SolveAlways doesn't work well. So ...
user avatar
2 votes
1 answer
63 views

LogicalExpand to find coefficients in power series

I am attempting to use the LogicalExpand command to find an equation for each coefficient in a power series. The documentation gives the following example of this usage: ...
user avatar
  • 193
2 votes
1 answer
82 views

Collecting coefficient list of arbitrary polynomial

Say I have a polynomial like: 1+x^(n)+3x^(n+1)+3nx^(3n+4) I want to extract the coefficient list {1,1,3,3n}. I've been toying ...
user avatar
1 vote
0 answers
53 views

Series coefficient not working for abstract powers

I'm trying to extract coefficients of some complicated polynomials. If I try to write SeriesCoefficient[1/(x-1)^4,{x,0,m}], this works fine, everything as expected. ...
user avatar
0 votes
1 answer
120 views

Dft to evaluate Fourier coefficients

Use the DFT to evaluate the N Fourier coefficients cs of fp(t), derived by sampling the following periodic functions: (a) fp(t) = cos^2(t) and (b) fp(t) with unit cell φ(t) = rect(t) and period ∆t = 3....
user avatar
2 votes
1 answer
193 views

Easy way to extract coefficients of functions in an ODE/PDE? [closed]

Suppose I have an ODE like $$ \epsilon y''(x)y(x) + xy'(x) + \epsilon^2 y(x)=0$$ or a PDE like $$ \dfrac{{\cal U}}{{\cal T}}\dfrac{\partial u}{\partial t}+\dfrac{{\cal U}^{2}}{{\cal L}}u\dfrac{\...
user avatar
5 votes
2 answers
91 views

Take coefficients of the variable from a Matrix

I have a question how can I take coefficients of the variable from a matrix? for example; I have a matrix such as: A={{2a,3b,4c},{4d},{1a,1e}} variable is {a,b,c,d,...
user avatar
  • 143
0 votes
2 answers
93 views

How to collect coefficients that has summation in ODE

I have the following equation, equation= x''[t]+a*x'[t]+b*x[t]+c*y[t]+d*u[t]+e*v[t]+Sum[f[i]*x[t]+g[i]*u[t]+h[i],{i,1,n}]+k When I collect the coefficient of each ...
user avatar
  • 755
5 votes
1 answer
124 views

Behaviour of Coefficient[] for negative exponents in rational expressions

I've observed a puzzling behaviour of Coefficient[] for negative exponents and I'm wondering if I was always just relying on undefined behaviour or if there is a ...
user avatar
  • 695
1 vote
5 answers
192 views

Finding polynomial coefficients returns Tag Plus is Protected [closed]

I'm trying to find the coefficients of a polynomial $P(x)$. Please see following equation. $$P(x+2)+P(x-2)=2x+8$$ CoefficientList[P(x+2)+P(x-2)=2x+8,P(x)] However ...
user avatar
  • 13
1 vote
1 answer
75 views

Collect a multivariate polynomial with 26 variables

I have a polynomial like this: $(wz+h+j-q)^2+((gk+2g+k+1)\cdot(h+j)+h-z)^2+(2n+p+q+z-e)^2+(16(k+1)^3\cdot(k+2)\cdot(n+1)^2+1-f^2)^2+(e^3\cdot(e+2)(a+1)^2+1-o^2)^2+((a^2-1)y^2+1-x^2)^2+(16r^2y^4(a^2-1)+...
user avatar
  • 121
1 vote
0 answers
43 views

Calculating the coefficients in a double Laurent series

I am interested in calculating the coefficients in the Laurent series of the following Hankel function $H_{0}^{(1)}(\sqrt{(3+x-y)(3+1/x-1/y)})$ I am familiar with the Coefficient command and its ...
user avatar
  • 837
1 vote
0 answers
137 views

Find coefficients of a periodic function with non-linear fit [closed]

Description of the problem: I'm studying a signal that is the sum of two exponentials at two different frequencies: $z(n) = A_1*e^{2\pi i\nu_1n } + A_2*e^{2\pi i\nu_2 n } + noise$ The signal itself is ...
user avatar
  • 11
3 votes
1 answer
91 views

Extension of Coefficient to variable exponents

Say I have an expression that is a polynomial in a variable, for example in the variable $x$, in which terms appear for which the exponent of $x$ also includes variables. For example: ...
user avatar
  • 545
0 votes
2 answers
71 views

Computing the coefficients of series

I am trying to fully expand the following $$\sum_{n=0}^{\infty} \frac{q^{\frac{n(n+1)}{2}}}{(q;q)_n}$$ Which when expressed in Mathematic is: q^(n*(n + 1)/2)/QPochhammer[q, q, n] I would like to be ...
user avatar
1 vote
1 answer
61 views

Parse coefficients from a Resolve output

I have a huge output from Resolve (quantifier elimination) that I must parse to extract the coefficients as numbers. Take for instance something that looks like ...
user avatar
  • 85
1 vote
2 answers
79 views

List manipulation with special requirements

Let $N$ be the ground set. I want to express the coefficients of following linear inequalities with a matrix (actually a list): $$a_{S,i}-a_{T,i}\geq 0 \text{ for any }S\subseteq T\subseteq N \text{ ...
user avatar
  • 827
0 votes
1 answer
74 views

How to find expansion coefficients in Fourier-Legendre

I am trying to find the coefficients for the Fourier-Legendre expansion of a potential. My goal was to obtain the coefficients as expressions in terms of x and y. I followed the example given on the ...
user avatar
0 votes
0 answers
105 views

How to join the lhs and rhs of the rows of a matrix equation and solve for one of the variables?

The matrix equation m.{x,y}==b results in an awkward disjointed looking presentation but correct construction of a system of linear equations ...
user avatar
  • 1,861
3 votes
1 answer
45 views

How can I separate the coefficients of $x^k$ and $x^k \log x$ in a function?

I have a function of the following form: $$f(x) = a_0 + a_1 x + a_2 x^2 + ... + b_1 x \log x + b_2 x^2 \log x + b_3 x^3 \log x + ..., \tag{1}$$ and I would like to collect the coefficient $a_k$ and $...
user avatar
  • 641
2 votes
1 answer
59 views

Fancy Indexing of a 4D array (tensor)

I'm trying to mimic the CoefficientArrays function, which I can't get to work for my symbolic equations. The CoefficientList ...
user avatar
  • 127
1 vote
0 answers
130 views

Approximation of a function by a polynomial (Chebyshev First Kind, Bernstein, etc...) containing only even degrees and constants in a given Range[a,b]

In Mathematica, how can I create a polynomial function containing only even degrees and constants? That is, I have a function: $f(x)=\frac{\pi ^2}{\left(\frac{\pi }{2}-\tan ^{-1}(k (x-1))\right)^2}$ ...
user avatar
  • 1,847