Question: How I can extract coefficients of some relations by using MAPLE?

Hi

I have an expression as the following:

exp2:= A*y(r)*diff(t(r),r)^2+B*t(r)/r+C*t(r)*y(r)+D*y(r)*t(r)^3+E*diff(y(r),r,r)*diff(t(r),r)+F*diff(y(r),r)*t(r)^2/r^2;

I want to extract coefficients of some functions (or relations) which is existence in expr2 by MAPLE. Please make an attention to following examples:

The coefficients of "diff(t(r),r)^2" is "A*y(r)".

The coefficients of "t(r)^2" is "F*diff(y(r),r)/r^2".

The coefficients of "y(r)" is "A*diff(t(r),r)^2+D*t(r)^3".

How I can extract coefficients of some relations by using MAPLE?

Thanks in advance.

 

Please Wait...