Question: display pde in desired form

 How to display the result in the desired form in partial differential equation and also collect the same terms

i am attaching sample codes

restart:
with(DETools):
P[o](z):=C[o]*exp(lambda*z)+D[o]*exp(-lambda*z):
u[o](r,z):=(1-r^2)*diff(P[o](z),z):
v[o](r,z):=(2*r-r^3)*diff(P[o](z),z,z):
A1:=P[o](z)*u[o](r,z):
# we want the result out put  like this
A1 := lambda*(C[o]^2*exp(2*lambda*z)-D[o]^2*exp(-2*lambda*z))*(1-r^2):
A2:=P[o](z)*(1+r^2)+v[o](r,z)+A1:
#we want the  resultant output like this
A2:=lambda^2*(C[o]*exp(lambda*z)+D[o]*exp(-lambda*z))*(1+r^2+2*r-r^3)+A1:
 

Please Wait...