Why do you want to group them? For a nicer display? To perform some
further calculation?
If it's just for a nicer display, you could do something like this:
qq:
2*exp(-3*t/2)*(18*sinh(sqrt(5)*t/2)/sqrt(5)-6*cosh((sqrt(5)*t/2)))+12,exponentialize,expand;
""(part(qq,[1,2])) + ""(part(qq,[3,4])) <<< apply the function with a
null name to each part (!)
This is fine for display, but not very useful for further manipulation. (A
trickier way uses ' "("(...), but I don't want to confuse you *too* much.)
If you want to manipulate the parts separately, you might want to put them
into a list, like this:
qql: [ part(qq,[1,2]), part(qq,[3,4]) ]
Though another way to manipulate each part separately is with "substpart",
e.g.:
substpart(factor(piece),qq,[1,2])
substpart(factor(piece),%,[2,3]) <<< note that piece [1,2] became just
one term
As I say, the correct answer to your question depends on *why* you want to
group them.
-s
On Fri, Sep 7, 2012 at 10:02 AM, Dionisio De Zolt <ddzolt at libero.it> wrote:
> Hi, just a simple question ... could you please tell me how to group first
> and
> second term as well as third and fourth of the following expression
>
> (%i1) 2*exp(-3*t/2)*
> (18*sinh(sqrt(5)*t/2)/sqrt(5)-6*cosh((sqrt(5)*t/2)))+12,
> exponentialize,expand;
>
> Thanks
>
> Regards
> Dionisio
>