Athar Kharal

90 Reputation

5 Badges

11 years, 303 days

MaplePrimes Activity


These are questions asked by Athar Kharal

i have this:

u:=[a=x,b=w];

p:=[1=4,3=2,5=2];

How can I write a procedure which produces following:

[u(a)=x,u(b)=w],[p(1)=4,p(3)=2,p(5)=2]

Problem is extracting and then using variable name inside the printing. regards

I have a set X={a,b,c,d,e} and a table as follows:

M[2]:=TABLE([e = {2,3}, a = 5, c = 1]);

Afterwards I want to add to this table all those elements (e.g. b={3,4} and d=4) of X which are unassigned in M[2]. How I can do this?

I have a mapping as a Table and want to find its inverse mappings. For example for

TABLE([e = w, c = z, d = w, a = w, b = y])

I want to elegantly compute

TABLE([w={e,d,a},z={c},y={b}])

kindly give a compact line of code, regards.

How I can get prd with only fifth and lower powers of x[n] in the following code?


p1:=a*x[n]+b*x[n]^3-c*x[n]^6:

p2:=d*x[n]^2-e*x^4+20:

prd:=collect(expand(p1*p2),x[n]);


> x[n]:=e[n]+w;
> f(w):=0;
> fxn:=convert(series(f(x[n]),e[n]=0,10),polynom);

How I can rewrite fxn so that every (1/k!)f^(k)(w)/f^(1)(w) for k=2,3,... is automatically replaced with c_{k}?

Here bracketed superscript denotes order of differentiation.

1 2 3 4 5 6 Page 5 of 6