## 957 Reputation

14 years, 305 days
University of Kent
Dr

## I will try my best....

@Carl Love Hi, sorry that it was not obvious enough.

Say I have the function:

f:=(xid,yid)->sum(x[i],i=1..xid)*sum(y[i],i=1..yid);

and a term:

myterm:=(f(3,4)+f(2,2))*f(1,1):
myterm:=expand(myterm);

and I “dont” know how my term is created. But I do know the function 'f'.

Can I get from 'myterm', to have

(f(3,4)+f(2,2))*f(1,1)

## Not a variable??...

I haven't tried this in latex, but in your syntax, Maple no longer treat variables as they should be.

I still want the variables to be able to work. Otherwise, they are no use to me.

## At the same time...

@Preben Alsholm Yes, I believe I just found out that 'add' works.

## "first term"?...

@Markiyan Hirnyk I am not sure what you meant by the "first term". But it still does not work for me.

Note that my problem is not with latex, but the latex code produced from Maple. Thanks,

## Not the right way to input the Maple syn...

@Markiyan Hirnyk I dont think it's a 'correct' Maple syntax to input the variables I want.

This is completely wrong and does not make any sense.

## definitely sequence...

@Carl Love I think i a sequence is 'faster'? so i will definitely use sequence for it.

## ascii text, with no 2D math...

@Joe Riel Yes, I want them as ascii text, with no 2D math.

val := [0,0,1]:

printf("%d%d%d\n", op(val));
001

This is fine. I wonder though, could I use a simpler way. Instead of %d%d%d, is it possible to use a single %d to represent this? as my 'val' is not fixed length. So if I have

val := [0,0,1,0]:

I would have to use

printf("%d%d%d%d\n", op(val));

Every time, I will have to adjust the number of '%d's.

Thanks,

Ghostyc

## alright...

@Carl Love Yes, of course they are effectively the same. I guess at this point, Maple just can't run it with a single (using some recursive) line.

I might run into some more "complex" substitutions where I might just have to do the subs (or simplify) in groups then.

## alright...

@Carl Love Yes, of course they are effectively the same. I guess at this point, Maple just can't run it with a single (using some recursive) line.

I might run into some more "complex" substitutions where I might just have to do the subs (or simplify) in groups then.

## yes goal is to use the substitutions sst...

Yes, goal is to use the substitutions sstest3(4,2).

sskappa( sstest(4,2) , kappa );

in ssTwoStage the procedure basically converts s2,s8,s9,s10,s11 to the s8,s9,s10 in sstest3(4,2).

The s1 to s10 from sstest3(4,2) was constructed based on sstest3(4,2).

If I remember correctly, it does

{s8=s2*s8+s9, s9=-s2^2*s8+s10,s10=s2^3*s8+s11}

Simply put, I can't subs sstest3(4,2) in a single step, so I did it in two steps.

## yes goal is to use the substitutions sst...

Yes, goal is to use the substitutions sstest3(4,2).

sskappa( sstest(4,2) , kappa );

in ssTwoStage the procedure basically converts s2,s8,s9,s10,s11 to the s8,s9,s10 in sstest3(4,2).

The s1 to s10 from sstest3(4,2) was constructed based on sstest3(4,2).

If I remember correctly, it does

{s8=s2*s8+s9, s9=-s2^2*s8+s10,s10=s2^3*s8+s11}

Simply put, I can't subs sstest3(4,2) in a single step, so I did it in two steps.

## "ranked by complexity"...

Hi Carl,

As you mentioned it, what exactly does "complexity" mean in this case?

From what I understand, the last 3 terms are ordered in order of "power". I would think "powers" are more "complex" than "plus" or "minus"?

Also, my current method

sskappa( sstest(4,2) , kappa );

ssTwoStage(%,4);

take less than 20 sec.

If you have a look at

sstest3(K,2)

for increasing K.

Are they not in the right order by "complexity" then?

Casper

## "ranked by complexity"...

Hi Carl,

As you mentioned it, what exactly does "complexity" mean in this case?

From what I understand, the last 3 terms are ordered in order of "power". I would think "powers" are more "complex" than "plus" or "minus"?

Also, my current method

sskappa( sstest(4,2) , kappa );

ssTwoStage(%,4);

take less than 20 sec.

If you have a look at

sstest3(K,2)

for increasing K.

Are they not in the right order by "complexity" then?

Casper

## A shorter version...

@Carl Love Hi Carl,

I just updated the top (original post) with attachment.

I was not sure this modfied version is "smaller" as it is the "smallest" example I am working at the moment.

But I did try to use less words to describe it. Hopefully, I had given a better explanation of what I want.

sstest3(4,2) is the final subs I hope to use to simplify kappa.

For now, I do it twice using

sskappa( sstest(4,2) , kappa );

ssTwoStage(%,4);

If my coding is correct, equation (7) is the simplified expression of kappa using sstest3(4,2).

Casper

## Why would you want that?...

Just curious, why would you need to do that? Can you not just "check" it in the normal way?

 4 5 6 7 8 9 10 Last Page 6 of 22
﻿