Question: Simplifying and Combining

Hello,

I have the following expression

Ve*k21*ke*x1+Ve*k21*x1^2+k12*ke^2*x1[t]+2*k12*ke*x1*x1[t]+k12*x1^2*x1[t]+k21*ke
^2*x1[t]+2*k21*ke*x1*x1[t]+k21*x1^2*x1[t]+Ve*ke*x1[t]+ke^2*x1[t,t]+2*ke*x1*x1[t
,t]+x1^2*x1[t,t]


and I want to convert it to

x1[t,t]*(x1+ke)^2+(k12+k21)*x1[t]*(x1+ke)^2+Ve*x1[t]*ke+(k21*Ve)*x1*(x1+ke)

 

How can I do this opperation? This is just a simple example of a more general problem I am facing. Thanks in advance for your help

Please Wait...