Harry Garst

219 Reputation

5 Badges

16 years, 337 days

MaplePrimes Activity


These are replies submitted by Harry Garst

@Carl Love 

 

Amazing!

(My only consolation is that there seems to be no single Maple command to accomplish the splitting of polynomials this way. Perhaps no one thinks this is a fruitful strategy).

@John Fredsted 

Thank a lot! 

(It took me a whole day to write the proc and you write only one line and the result is the same!)

@Kitonum 

Thanks a lot!

I still cannot find it in the HELP pages. 

Harry


 

restart; with(LinearAlgebra); M := Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]); r := RowDimension(M); L := Matrix(1, 3, [a, b, c])

_rtable[18446746060682104694]

 

Matrix(%id = 18446746060751755134)

(1)

Let_me_sit_on_row := proc (M::Matrix, R::Matrix, rij::integer)::Matrix; local K, Z, N, i, r, w; r := RowDimension(M); K := `<|>`(IdentityMatrix(RowDimension(M)), ZeroVector(RowDimension(M))); w := r+3-rij; Z := Matrix(4, 1, [1, 2, 3, 4]); for i from 0 to w-3 do Z := RowOperation(IdentityMatrix(r+1), [r-i, r-i+1]).Z end do; Z := convert(Z, list); N := `<,>`(K[() .. (), Z])^%T.M+`<,>`(`<,>`(ZeroMatrix(r, r), R)[Z, () .. ()]); return N end proc

Let_me_sit_on_row(M, L, 1); Let_me_sit_on_row(M, L, 2); Let_me_sit_on_row(M, L, 3); Let_me_sit_on_row(M, L, 4)

_rtable[18446746060751748622]

 

_rtable[18446746060751737670]

 

_rtable[18446746060751733934]

 

Matrix(%id = 18446746060751729478)

(2)

``


 

Download def_mapleprimes_insert_row.mw

@_Maxim_

 

Thanks a lot!

I was able to modify your code to get what I wanted (without knowing anything of a Groebner basis at all) .

kind regards,

Harry Garst

@Kitonum 

 

Thanks a lot! This is a very interesting solution.

kind regards,

Harry Garst

as I said I looking for a combination of factored polynomials. What I have done so far is to factor subsets of the polynomial. That strategy worked for smaller problems (see attached maple file), but now I would like to find out the most efficient strategy. I guess that this is also a well-known problem for mathematicians (I myself am a psychologist).

yes, indeed. Both replies are extremely helpful. (Although there are good reasons for trying a matrix solution: the expression is an element from a matrix inversion).

 

Thanks a lot.

Harry Garst

@Harry Garst 

 

When I square the denominator in your example both subs and algsubs give the intended result.

subs_versus_algsubs2.mw

@Kitonum 

replacing the first algsubs with subs gives the intended result:

Expr1 := a/(a+b+c);

subs(a+b+c = d, Expr1);

Expr2 := b/(a+b+c);

algsubs(a+b+c = d, Expr2);

Expr3 := c/(a+b+c);

algsubs(a+b+c = d, Expr3);
                                    a    
                       Expr1 := ---------
                                a + b + c
                               a
                               -
                               d
                                    b    
                       Expr2 := ---------
                                a + b + c
                               b
                               -
                               d
                                    c    
                       Expr3 := ---------
                                a + b + c
                               c
                               -
                               d
 

@Kitonum 

 

Thanks al lot!

My only reason for substitutions is to make seemingly complex matrix results so simple that I can understand its structure. Unfortunately, at this moment I am unable to accomplish this in Maple. 

Paradoxically, the 'simplify' command makes things more complicated by expanding all terms out.

the first and the second example are completely the same (except for the indices [1,1] versus [2,1].

I made a new maple file. The second example is a copied version of the first example, but the indices are changed. The output differs.

mapleprimes2.mw

@Preben Alsholm 

Thanks for diving in this issue.

Now it is time for the maple software engineer who wrote the 'forget' function (error message: Error, (in forget) lexically scoped parameter out of context). Strange name for a function. 

best regards,

Harry Garst

error_message.mw

no_error_message.mw 

 

sorry, I hoped it was something obvious I missed from my part.

In the meantime, I switched to the Optimization package, where I did not encounter any problems.

but, I still am curious why that error occurred.

kind regards,

Harry Garst

@Preben Alsholm 

 

Thanks! You are right!

kind regards,

Harrry

1 2 3 4 Page 2 of 4