Items tagged with coefficients coefficients Tagged Items Feed

Round := proc(x,n::integer:=1)
parse(sprintf(cat("%.",n,"f"),x));
end proc:

roundcoeffs1:=proc(p,x,n:=1) local t,c;
c:=map(Round, [coeffs(p,x,t)],n);
add(i, i = zip(`*`, c, [t]));
end:

ggg:=.9940413618*y^3-1.785839107*c*A*y^3-2.357517322*c*A*y^2+.375393240*c*y*B-.3575173222*c*A*y-.2082022533*c*B-0.1787591445e-1*y^2-0.1787591445e-1*y-0.5958638151e-2+.2141608926*c*A+.7917977467*c*B*y^3+2.375393240*c*B*y^2;

roundcoeffs1(ggg, [y^3, c*A*y^3, c*A*y^2, c*y*B, c*A*y, c*B, y^2, y, c*A, c*B*y^3, c*B*y^2], 4);


Error, (in sprintf) number expected for floating point format

Greetings, all!

I'm extremely new to Maple T.A., and I am building tools for my math department since I'm the only one with a programming background. I have a generic question, and sincerely apologize if I've missed it being answered elsewhere. It's a case that will probably come up multiple times for us, so I was hoping to find an answer =).

I have a problem where students are adding exponents of like bases. As an example, you get questions that look like this.

When the coefficient is 1, I'd like to accept a blank answer in the first response area as a correct solution. Is there an easy (or less easy =) way of making this happen?

Thanks in advance!

Hi everyone.

I'm going to solve a problem with HPM in Maple. I wrote some initial codes but now I'm confused becouse of P^0 coefficients in A1 and B1. I mean I can't reach to f0 and g0.

I upload that file. these are codes that i typed. could you please help me how can I reach to them(f0 & g0)?

http://www.filehosting.org/file/details/573095/Maple%20Project+.mw

hi,

i want to compute the determining PDE system satisfied by the infinitesimals, such as the KdV equation.

but i have a problem, if i use the command

DeterminingPDE(PDE1, integrabilityconditions = false, split = false)

i can get the coefficients of independent objects, but u[t] exists. 

i want to replace u[t] by (-u[x]u-u[x,x,x]), then extract the coefficients.

but i can't collect the coefficients. 

 

my code:

with(PDEtools, DeterminingPDE, declare, diff_table, casesplit, InfinitesimalGenerator, Infinitesimals, SymmetryTest, ReducedForm, FromJet, ToJet);

declare(u(x, t));

U := diff_table(u(x, t));

PDE1 := U[]*U[x]+U[t]+U[x, x, x] = 0;

DetSys := DeterminingPDE(PDE1, integrabilityconditions = false, split = false);
detsys := FromJet(DetSys, u(x, t), differentiationnotation = diff);
pd1 := subs(U[t] = -U[]*U[x]-U[x, x, x], detsys); #u[t]->(-u[x]u-u[x,x,x])
pd2 := ToJet(pd1, [u(x, t)]);

how do i collect the coefficients?

help!

Dear All

Please see following query:

 

 

 For following Algeraic expression

 

(3*a[1]+5*a[2])*U[1]+(-6*a[1]+2*a[2])*U[2]

 

How one can construct a matrix of the following form:

 

Matrix([[3, 5], [-6, 2]])

Matrix(2, 2, {(1, 1) = 3, (1, 2) = 5, (2, 1) = -6, (2, 2) = 2})

(1)

 

Where first row corresponds to U[1]and second row corresponds to U[2] and the entries of matrix are coefficients of a[1]and a[2]

 

 

Download Constructing_matrix_from_algebraic_expression.mw

Regards

Dear maple users,

I have a lengthy formulation of function f(x) which contains some constant coefficients (A1, A2, A3 ...). I would like to simplify f(x) for functions of same above mentioned coefficients as following:

f(x) = f1(x) A1 + f2(x) A2 + ... + fn(x) An

I tried the following command:

collect(simplify(f(x)), [A1, A2, A3 ...])

Maple returns the expected form of functions but the problem is that Maple did not simplify f1(x), f2(x)... Obviously, I do not want to simplify manually : simplify(f1(x)) ... again

How can I solve this problem?

Thankyou.

I am trying to extract the coefficients of z from its series expansion. In two cases I succeed in finding the coefficients, but in the last one I fail to get the correct coefficients. Some garbage value is obtained. What is the reason behind this? I have attached my maple program.

 

 

test.mw

I need to complete the definition of bcount so that bcount(n) returns the total number
of odd coefficients 
n
k , 0 ≤ k ≤ n. For instance, the values of 
n
k for n = 6, with odd values highlighted, are:
1, 6, 15, 20, 15, 6, 1,

bcount:=
proc(n::TYPE)
description "Count odd binomial coefficients.";
---MORE STUFF HERE---
end proc; # bcount

Any help appreciated

I have an ODE with L(x,y), which includes partial derivatives of L(x,y) and coefficients y,_y1 and _y1^2. I want to split this equation into seperate equations of these coefficients. So I can solve for the unknown variable L(x,y).

 

ODE:=diff(L(x,y),x,x)+2*_y1(x)*diff(L(x,y),x,y)+_y1(x)^2*diff(L(x,y),y,y)+y(x)/x*diff(L(x,y),x)+(y(x)*_y1(x)/x+_y1(x))*diff(L(x,y),y)-y(x)/x^2*L(x,y)=0;

Could someone help me? 

 

I am currently trying to use the coeffs command but not really getting anywhere.

 

Thank you.

Note added: Issue resolved, see my comment below.

I have a sum of several thousands addends each of which is the product of a c-number times a product of 6 Grassmann-odd degrees of freedom, the latter of which does each belong to a set of 24 Grassmannians. The specific numbers are not that important, though.

This sum should equal zero. So I would like to add all c-numbers multiplying the same product of six Grassmannians, taking proper care of anticommutativity, of course. The sum would then be zero if all these sums of c-numbers are zero. Unfortunately, using Physics:-Coefficients is far too slow; actually, it has never succeeded in even completing the calculation.

Therefore, I have tried to loop through all the addends, splitting each one of them using selectremove(), and then adding the c-numbers in an Array (properly indexed), or in a table (associatively indexed, of course). Consistently, by converting the Array and table to two sets, the two methods result in the same set of equations. But solving these equations yields a result that is not stable: it varies from session to session.

I am baffled. Can anyone give me a hint to a safe and reasonably quick method for extracting these c-number-valued equations?, for there has to be something wrong with what I do.

I have double indexed functiions f[j,k] of one variable and double indexed coefficients a[j,k].

I want my print do look like a[1,1]f11+a[1,2]f12 that is, the values of a[j,k] should appear beside the functions' names, like

7f11+2f12-3f21 etc.

Thank yopu for any help

Hello,

 

I'm writing to ask how to equalize the coefficients of two multivariate polynomials. In particluar, I have two polynomials whose arguments are ln(E),ln(K),ln(L) (their levels, squared levels and interaction terms). The first one is:

(1/2*(p*a*b+(g-p)*b-g))*b*v*a*ln(E)^2-(-1+b)*v*(g-p+a*p)*b*a*ln(E)*ln(K)-b*p*(a-1)*v*a*ln(E)*ln(L)+v*a*b*ln(E)+(1/2*(p*(-1+b)*a+(g-p)*b+p))*(-1+b)*v*a*ln(K)^2+(-1+b)*v*p*(a-1)*a*ln(K)*ln(L)-v*a*(-1+b)*ln(K)+(1/2)*a*p*v*(a-1)*ln(L)^2-v*(a-1)*ln(L)

the second one is:

x_1*ln(E)+x_11*ln(E)^2+x_12*ln(E)*ln(K)+x_13*ln(E)*ln(L)+x_2*ln(K)+x_22*ln(K)^2+x_23*ln(K)*ln(L)+x_3*ln(L)`+x_33*ln(L)^2

I would like to know if it is possible to equalize the coefficients of the two polynomials and find the following system:

v*a*b = x_1, -v*(a-1) x_3, -v*a*(-1+b) = x_2, a*b*v*(b*rho*a-b*rho+g*(-1+b)) = x_11, v*rho*a*(a-1) = x_33, v*a*(rho*(-1+b)*a-rho*(-1+b)+b*g)*(-1+b) = x_22, -a*v*rho*(a-1)*b = x_13, -a*v*(a*rho-rho*u+g)*b*(-1+b) = x_12, a*v*u*rho*(a-1)*(-1+b) = x_23

I tried using "coeffs" and creating a sequence of values for x but then I don't know how to equalize them.

Thank you very much in advance for your time,

Elena

I am using Maple-9 to simplify the expression and the expression is not having numerical coefficients. Example expression is given below.

a2:=(18*d^2*R^2*r-4*d1^3*r+5*R^6-z1*r^3*p-14*r1^3*r*rc+k1*d^2*R^2*r);

 

The question here is: I want to collect all "positive terms" and "negative terms" and assign to new variable.

 

Please suggest steps for the above problem

 

Thank you in advance.

 

consider quadratic equation ax^2+bx+c =0 :
the coefficients vary between -1 and +1 . just like this :
-1<a<+1 , -1<b<+1 , -1<c<+1 ;
how can some one proove that this equation should have real answers ?! can anybody help ? thanks in advance.

1 2 3 Page 1 of 3