Question: Re: How to collect using a term by multiplication of variables

Hello there, 

Would you allow me to ask this question?

Is there any way to apply 'collect' command using a term by multiplication of variables?

The following worksheet shows an example. What I wanted to see is the 'desired' expression, while multiple attempts with 'collect' command failed. 


 

restart;

eq_e5_10z := Psi[q0]*Delta*delta = 1/(omega[0])*p(Delta*Psi[q])+Delta*Psi[d]+Psi[d0]*1/(omega[0])*p(Delta*delta);

Psi[q0]*Delta*delta = p(Delta*Psi[q])/omega[0]+Delta*Psi[d]+Psi[d0]*p(Delta*delta)/omega[0]

(1)

eq_e5_10za := Delta*Psi[d] = Psi[q0]*Delta*delta - op(1, rhs(eq_e5_10z)) - op(3, rhs(eq_e5_10z));

Delta*Psi[d] = Psi[q0]*Delta*delta-p(Delta*Psi[q])/omega[0]-Psi[d0]*p(Delta*delta)/omega[0]

(2)

eq_e5_10zb := subs({p(Delta*Psi[q])=0}, eq_e5_10za);

Delta*Psi[d] = Psi[q0]*Delta*delta-Psi[d0]*p(Delta*delta)/omega[0]

(3)

collect(rhs(eq_e5_10zb), {Delta*delta});# error

Error, (in collect) cannot collect Delta*delta

 

collect(rhs(eq_e5_10zb), [Delta*delta]);# error

Error, (in collect) cannot collect Delta*delta

 

collect(rhs(eq_e5_10zb), [Delta, delta]);# did not work  

Psi[q0]*Delta*delta-Psi[d0]*p(Delta*delta)/omega[0]

(4)

Desired := (psi__q0 - psi__d0*p/omega__0)*(Delta*delta);

(psi__q0-psi__d0*p/omega__0)*Delta*delta

(5)

 


 

Download Q20220602.mw

Please Wait...