When the following command is entered in the CAS view

collect(a*z^2+q*z+p*z^2+o+n*z+y,z)

I get:

a*z^2 +n*z+o+p+z^2+q*z+y

whereas that same command was entered in XCas, and the answer was

z*(z*(a+p)+n+q)+o+y

which is the correct one as per the manual of HP Prime.

My HP Prime model is:

SW version: 2.1.14730

Hardware Version: D

OS: V2.060.650

Hi, amindanial

Collect (factors) results depends on CAS setting.

If you have Simplify=Max, factors get "simplified" away.

We do have a bug, variable supplied not working (Simplify=Min)

> collect(x^2+3x+2) → (x+1)*(x+2)

> collect(x^2+3x+2,x) → x*(x+3)+2 ???
Thanks Albert for your clarification.

However, what is the bug you are talking about "We do have a bug, variable supplied not working"?

collect(x^2+3x+2) and collect(x^2+3x+2, x) should give the same answer (x+1)*(x+2)

"collect(x^2+3x+2) and collect(x^2+3x+2, x) should give the same answer (x+1)*(x+2)"

No, these two expressions don't give the same answer according to XCAS engine which is used by HP Prime as shown in the following screenshot.[

attachment=13514]

XCas ans HP Prime use the same engine ... of course screenshot matched.

But is it right? How is

collect(Poly, Var) supposed to work?

collect(Poly, Var) \(\;\overset{?}{=}\;\) poly2symb(symb2poly(Poly, Var), Var)

XCas help does not even show this optional Var form, only collect(Poly or LstPoly)

XCas manual did (optional α, not Var), but no example of what to expect.