Items tagged with coefficientscoefficients Tagged Items Feed

How to extract all coefficients of a multivariate ...

August 22 2014
0 7

I have a polynomial p in two variables x and y, and I want to extract all the coefficients of p. For example, let p:=x^3+2*x*y^2-2*y^2+x, and I want to obtain the coefficient vector [1,0,0,1,0,2,0,0,-2,0], where 1,0,0,1,0,2,0,0,-2,0 are respectively the coefficients of x^3, x^2, x^2*y,x,x*y,x*y^2,y^0,y,y^2,y^3. In general, let

p(x,y)=sum(sum(c_*{i, j}*x^(n-i)*y^j, j = 0 .. i), i = 0 .. n)

=c_{0,0}x^n

+c_{1,0}x^{n-1}+c_{1,1}x^{n-1}y

+c_{2.0}x^{n-2}+c_{2,1}x^{n-2}y+c_{2,2}x^{n-2}y^2

+\dots

+c_{n,0}+c_{n,1}y+c_{n,2}y^2+\dots+c_{n,n}y^{n}.

It is possible that some coefficients c_{i,j} are equal to 0. How to obtain the coefficient vector [c_{i,j},i=0..n,j=0..i] of p(x,y)?

Thanks a lot.

How do I extract all the coefficients of a polynom...

August 02 2014
1 8

I want to extract all the coefficients of a polynomial. For example, let p:=x^5-8x^3+2, and the function coeffs(p) returns 1, -8, 2. In fact, I want to obtain 1, 0, -8, 0, 0, 2. Thanks to everyone.

Find the coefficients..............................

June 27 2014
1 1

Hi:

how find the coefficients C1,C2?
q(0)=0,D(q)(0)=0

q(T) := sin(T)*_C2+cos(T)*_C1-(1/3000)*Pi*(4012562293500*Pi^3*cos(T)^3-32100498340000*Pi^3*cos(T)^2-3009421720125*Pi^3*cos(T)+16050249170000*Pi^3+435778855000*Pi*cos(T)^2-217889427500*Pi-3539762622):

How can I find n so that maximum of all coefficie...

June 27 2014
2 21

Suppose (1 + 2x)^n = a0 + a1*x + a2*x^2+...+an*x^n.

I want to find value of n so that max(a0, a1, ..., an) is a8

I tried directly.

With n = 12

restart:
A:=expand((1+2*x)^12,x);
max(coeffs(A));

And with n = 11

B:=expand((1+2*x)^11,x);
max(coeffs(B));

Therefore,  n = 12 or  n = 11.

How can I solve the problem with Maple?

extract coefficient in multivariate case...

June 18 2014
0 6

Hi,

I have an expression as p in the following. I would like to extract the coeffient with x^n*y^m and x^(n+2)*y^(m+2), however, coeff comand does not work...

***

p:=3*x^n*y^m+4*x^(n+2)*y^(m+2)+k*x^(n+2)*y^(m+2);
coeff(p,x,n);

***

gives me

***

n m (n + 2) (m + 2) (n + 2) (m + 2)
3 x y + 4 x y + k x y
/ n m (n + 2) (m + 2) (n + 2) (m + 2) \
coeff\3 x y + 4 x y + k x y , x, n/

***

What is the correct command to get the coefficients? Thank you very much

comparison convolution and Serie Fourier coefficie...

April 18 2014
0 4

Hi,

I open a discussion about convolution and Fourier coefficients in Fourier series.

I have a function defined by f(x)=0 if x in [-Pi,0[ and 1 if x in [0,Pi[, of course f 2*Pi periodic function.

My goal is compare the Fourier coefficients of f*f ( * convolution ) and The Fourier Coefficient of f.

February 26 2014
0 1

Dear all,

here, I propose two methods for Adams Moulton Methos, but which one can I used.

The n-step Adams Moulton method to solve y'(x)=F(x,y(x)) is defined by the stencil

y(x+h)=y(x)+h *sum_{j=-1}^{n-1} beta_j F( x-j*h, y(x-j*h) ) + O(h^{n+2})

I want a procedure with single argument ''n'' that calculates and return the ''beta_i'' coefficients

I get two Methods. Which one correspond to my question please, and I don't understand the procedure proposed.

For me; the first give the iterative schemae used, but don't return the vector coefficients ( beta_i) and this methode method an interpolation of the function.

The second method, there is a function f, how this function is maded, and the same for the matrux A and the vector b...

the First Method:

local P, t, f, y, n;

P := interp([t[n]+h, seq(t[n]-j*h, j = 0 .. k-2)], [f[n+1], seq(f[n-j], j = 0 .. k-2)], x);

y[n+1] = y[n]+simplify(int(P, x = t[n] .. t[n]+h))

end proc;

Second Method:

f:=proc(x,y) if x =0 and y=0 then 1 else x**y fi end;

n:=3; A:=matrix(n,n,(i,j)->f(1-j,1-i));

b:=vector(n, i->1/i);

linsolve(A,b);

Differential Equation with Homogeneous Coefficient...

January 26 2014
1 6

Can anyone tell me how to use dsolve to find the solution to the problem in the attachment.  It is faily easy to do using substitution for homogeneous coefficients, but dsolve seems to put out a very complicated solution to the problem.

 >
 >
 (1)
 >
 (2)
 >

What's up with coeffs?...

October 28 2013
0 4

I have two equations:

and I need to extract the coefficients of x0 and xp0 (to build a matrix; but that is not the issue). So I use coeffs:

coeffs(op(2,X),x0);

coeffs(op(2,XP),x0);

xp0

While I can live with the first result (for X) (not that I like it), the fact that the 2nd one (for XP) has a completely different structure prevents any kind of algorithmic extraction of the coefficients (and the second one of course is 0) for further use. I tried the form of coeffs with a third argument (a name which gets the result assigned) but the same result. This example is a real case, obviously a trivial one and others will be much more involved so I really would like this to work. And yes, I did "collect" before using coeffs (not that it was needed here).

Any ideas out there?

Mac Dude.

How to get coefficients from expressions...

July 24 2013
2 3

Hello, I'm a newbie in Maple. I just started learning maple and i'm using version 17. I want to know if there is a way in maple to get the coefficients of some variables maybe an example would explain me better. Lets say we have

23x^4 + (12*h)x^2

So my question is that is there a function/method that can allow me to strip the coefficients of x^4 and x^2. Because I have a very long expression and I need the coefficients of the variables therein to populate a matrix.

Find the coefficients of a recurrence relation...

May 08 2013
1 1

I have a question:

let t(n)=sum( (binomial(n,j))^4, j=0..n )  , t(-1)=0, t(0)=1

and (n+1)^3 *t(n+1)=(2n+1)*(a*n^2+a*n+b)*t(n)+n*(c*n^2+d)*t(n-1)             (1)

I want to Print(a,b,c,d) so that t(n) satisfies the recurrence relation (1)  where a,b,c,d are integers and their ranges are from

-30 to 30.

Using Maple to find Newman-Penrose equations with ...

April 10 2013
1 5

I just bought Maple 17 and tried to find a couple of Newman-Penrose spin coefficients.  I can do it by hand, but when I try to do the same thing using Maple I am stuck.  Maple lets me define an orthogonal tetrad, then I convert that to a null tetrad.  But how do I then fiind spin coefficients?  I know Maple has an entire list of metrics (385) already loaded, but I need to investigate different Petrov types to develop a metric.  Thanks.

Extracting Coefficients from a Fourier Series...

January 23 2013
1 2

Greetings,

I have a finite Fourier series of the form, Asin(x)cos(z) + Bsin(2x)cos(z) + Csin(3x)cos(2z) +... I would like to be able to extract the coefficients, A,B,C etc., that correspond to a specific mode. I have tried using the coeff and coeffs functions. They work for a one-dimensional Fourier series (i.e. if S= Asin(x) + Bsin(2x) + Csin(3x); is my series, then coeff(S,sin(2x) returns B). I cannot however get this to work for the 2-D case. Any suggestions?

How to solve a matricial equation (in order to coe...

November 26 2012
1 5

Hi,

I have this matrix with coefficients that I need to estimate;

I get there after some simple calculations and I know that my matrix it´s equal to the zero matrix; I have something like:

A:=Matrix(3, 3, [5*a-4,  5*sqrt(a) *sqrt(b)-5, 7*sqrt(a) *sqrt(c)-6,

8*sqrt(a) *sqrt(b)-5, 8*b-2,  8*sqrt(b) *sqrt(c)-9,

4*sqrt(a...

Extracting co-efficients of Sum of two Taylor seri...

October 18 2012
0 7

Hi all,

I want to find the co-efficient for z^k of 2-stage hyper exponential Random Variable. That is expressed as sum of two Taylor series. I have given the code in the attachment. I have tried using convert(A(z),FormalPowerSeries,z) with op([1,1],..), but it didn't work.Coefficient_Extract_.mw

 1 2 Page 1 of 2
﻿