mskalsi

290 Reputation

7 Badges

9 years, 190 days

MaplePrimes Activity


These are replies submitted by mskalsi

@Kitonum 

That's what we call a elegant solution. Thanks a lot.

The coefficient terms in {} get disorder is cause of concern.

Regards

@Carl Love 

I have worked it out in following way please check if it is good enough


expr1 := (A*a[1]+B*a[2])*U[1]+(C*a[1]+D*a[2])*U[2]

(A*a[1]+B*a[2])*U[1]+(C*a[1]+D*a[2])*U[2]

(1)

{seq(coeff(expr1, U[j]), j = 1 .. 2)}

{A*a[1]+B*a[2], C*a[1]+D*a[2]}

(2)

op(1, {A*a[1]+B*a[2], C*a[1]+D*a[2]})

A*a[1]+B*a[2]

(3)

coeff(op(1, {A*a[1]+B*a[2], C*a[1]+D*a[2]}), a[1])

A

(4)

seq(coeff(op(1, {A*a[1]+B*a[2], C*a[1]+D*a[2]}), a[i]), i = 1 .. 2)

A, B

(5)

{seq(coeff(op(1, {seq(coeff(expr1, U[j]), j = 1 .. 2)}), a[i]), i = 1 .. 2)}

{A, B}

(6)

{seq(coeff(op(2, {seq(coeff(expr1, U[j]), j = 1 .. 2)}), a[i]), i = 1 .. 2)}

{C, D}

(7)

M[1] := seq(coeff(op(1, {seq(coeff(expr1, U[j]), j = 1 .. 2)}), a[i]), i = 1 .. 2)

A, B

(8)

for s to 2 do M[s] := seq(coeff(op(s, {seq(coeff(expr1, U[j]), j = 1 .. 2)}), a[i]), i = 1 .. 2) end do:

Matrix([seq([M[i]], i = 1 .. 2)])

Matrix(2, 2, {(1, 1) = A, (1, 2) = B, (2, 1) = C, (2, 2) = D})

(9)

``


Download Construction_of_coefficients_from_Expression.mw

@Carl Love 

When coefficients of a[1] and a[2] are arbitrary, the procedure given by you is not working on Maple 18


expr1 := (A*a[1]+B*a[2])*U[1]+(C*a[1]+D*a[2])*U[2]

(A*a[1]+B*a[2])*U[1]+(C*a[1]+D*a[2])*U[2]

(1)

A := coeffs(expand(expr1), indets(expr1, indexed), 'T')

Error, recursive assignment

 

A[1] := coeffs(expand(expr1), indets(expr1, indexed), 'T')

A, B, C, D

(2)

Why it so?? That when we replace A by A[1]

eval(`<,>`(U[1], U[2]).`<|>`(a[1], a[2]), `~`[`=`]([T], [A[1]]))

Error, dimension bounds must be the same for all container objects in an elementwise operation

 

expr2 := (x^2*a[1]+x*y*a[2])*U[1]+(y*z*a[1]+z^2*a[2])*U[2]

(x^2*a[1]+x*y*a[2])*U[1]+(y*z*a[1]+z^2*a[2])*U[2]

(3)

B := coeffs(expand(expr2), indets(expr2, indexed), 'T')

x^2, x*y, y*z, z^2

(4)

See!!!! Now there is no error massage, why it is so ???

eval(`<,>`(U[1], U[2]).`<|>`(a[1], a[2]), `~`[`=`]([T], [B]))

Matrix(2, 2, {(1, 1) = x^2, (1, 2) = x*y, (2, 1) = y*z, (2, 2) = z^2})

(5)

Can you please explain why this error is ocurring when coefficient of a[1] and a[2]are replaced by arbitrary constant A, B, C, D? Procedure given by you works fine with coefficients of a[1] and a[2]as "x^(2), xy, yz, "and "z^(2)."


Download Construction_of_Matrix_from_Expression.mw

Dear Carl

You suggested me good solution to my problem. But you must also see solution given by Tomleslie.

@Carl Love 

Thank you very much Tomleslie.

I humbly appreciate your help .

@tomleslie 


I want to reduce following vector

V = V[1]*a[1]+V[2]*a[2]+V[3]*a[3]+V[4]*a[4]+V[5]*a[5]+V[6]*a[6]+V[7]*a[7]+V[8]*a[8]+V[9]*a[9]+V[10]*a[10]+V[11]*a[11]:

Through adjoint action

"Ad(exp(V[i]))V[j]= V[j]-epsilon[]*[V[j],V[i]]+(epsilon^(2))/(2)*[V[j],[V[j],V[i]]]-(epsilon^(3))/(6)*[V[j],[V[j],[V[j],V[i]]]]+................"

where [V[j], V[i]] = V[j]*V[i]-V[j]*V[i]is called Lie bracket.

into pair vectors which are pairwise inequivalent through above adjoint action. The are following commands available in package "SymmetryCommutator" of Maple for computing Lie bracket of Vectors.


 

@John Fredsted 

There is command

ExcelTools:-Import("C:\\Users\\Manjit\\Desktop\\File Name.xls", "Sheet1", "A2:A102")

To import data from selected column of excel file, this command succesfully picked the date from corresponding column of excel file, but when I typed command "glist := flist*~(xlist^~2-~1)", it shows me error like:

"Error, (in CurveFitting:-Spline) data points not in recognizable format"
Perhaps the desirable format of "list" may be creating problem.

But I could not able sort this out.

@Kitonum 

Dear Sir

I have started working with Maple just one year ago. Without any previous knowelgde of programming I am learning its very basic step by step on daily basis and transferring my learning to my friends and my fellow teachers. One thing that I am really grateful to is mapleprime community, where peoples are dying to help others. You peoples are just marvelous.

Thank you all.

@tomleslie 

Thank You very much. Although it simple and straight-forward but it will do for me.

@tomleslie 

Please don't misunderstood my query. I just want to give comparative view to my students. These days student understand better in interactive way as it becomes their habit.

@vv 

That's not actually I want, but still it is interesting and helpful. Actually I also want to print of formula of secant method at every step of iteration, so that it can be displayed to students that what actually Maple is doing.

@Doug Meade 

@Markiyan Hirnyk 

I am sorry I could not understand what you mean "Product(s)" line in the head of my question.

 

@tomleslie 

It was Win 8.1 issue because when I insalled Maple 18.02 on another computer; "solve" command started working. As I can not resolve Window issue myself so I re-installed Maple back to version 18, earlier it was 18.02.

I appreaicte your help and thanks for giving your time and nice comments. 

 

@tomleslie 

I have Maple 18.0 64bit working on Window 8.1 on which "solve" command works alright, but when I updated it(don't know which version it was) "solve" command start creating problem.

Morover, there is package "RAEEM" for calculating traveling wave solutions, I have loaded this package correctly but this package is not giving any result.

The package Catalogue identifier: ADUP_v1_0 and is available at http://cpc.cs.qub.ac.uk/.

3 4 5 6 7 Page 5 of 7