Items tagged with coefficients coefficients Tagged Items Feed

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.

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):

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?

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

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.

 

Thanks for your help.

 

 

 

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:

> Adamsmoulton := proc (k::posint)

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);

 

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.

with(DEtools):

2*x*y(x)+(x^2+y(x)^2)*(diff(y(x), x))

2*x*y(x)+(x^2+y(x)^2)*(diff(y(x), x))

(1)

dsolve(%)

y(x) = ((1/2)*(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)-2*x^2*_C1/(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3))/_C1^(1/2), y(x) = (-(1/4)*(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)+x^2*_C1/(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)-((1/2)*I)*3^(1/2)*((1/2)*(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)+2*x^2*_C1/(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)))/_C1^(1/2), y(x) = (-(1/4)*(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)+x^2*_C1/(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)+((1/2)*I)*3^(1/2)*((1/2)*(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)+2*x^2*_C1/(4+4*(4*x^6*_C1^3+1)^(1/2))^(1/3)))/_C1^(1/2)

(2)

NULL

 

Download DEprob.mw

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.

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.

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.

Please help!

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.

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?

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...

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

I have obtained the taylor series expansion of a function and got the coefficients as numbers.

I want to assign those coefficients to a variable.

I need your help.

Page 1 of 1