kill(all)$

transforming linear differential equations of the second order 'p1a' into
   =>  Normal Form 'p9','version 1.0'
peter.vlasschaert@gmail.com ,27/05/2018.

p1a:'diff(y,x,2)+p(x)*'diff(y,x)+q(x)*y =0;

set : y=u(x)*v(x) ,needed for the transformation.p

depends(p,x);

u:exp(-1/2*integrate(p(x),x));

s1:diff(u,x);

s2:diff(u,x,2);

depends(v,x);

t1:diff(v(x),x,2);

depends(q,x);

p1: u*t1+v*(s2+p(x)*s1+q(x)*u)=0;

p2:factor(p1);

p3:part(lhs(p2),1,2)=rhs(p2);

p4:solve([p3], ['diff(v(x),x,2)])[1];

p5:factor(rhs(p4));

p6:part(p5,1,2)/part(p5,2);

p7:part(p5,1,1);

transformed : "transforming linear sec. order  differential  equations"

p8:ρ(x) =-p6;

p9:t1+v*lhs(p8)=0;

example : diff(y,x,2)+3*x*diff(y,x)-6*y =0
                     p(x) = 3*x ,q(x)=-6

p10:'diff(y,x,2)+3*x*'diff(y,x)-6*y = 0;

p11:coeff(lhs(p10),'diff(y,x,2));
p12:p(x)=coeff(lhs(p10),'diff(y,x,1));
p13:q(x) = ev(lhs(p10),y=1);

p14:ev(p8,p12,p13,diff);

p15:ev(p9,p14);

p16:y=v(x)*u;

p17:ev(p16,p12,integrate);

p18:ev(p1a,p12,p13,p17,diff);

p19:ratsimp(p18);

p20:ev(p19,p15);

p21:part(p20,1,1,2)=rhs(p20);

find : coef   'diff(v(x),x,2))

p22:coeff(lhs(p21),'diff(v(x),x,2));

p23:radcan(p21/p22);

you see 'p15' = 'p23' when  v=v(x).