dsolve(diff(diff(y(x),x),x) = diff(phi(x),x)/(phi(x)-phi(a))*diff(y(x),x)-(-n*(n+1)*(phi(x)-phi(a))^2+`@@`(D,2)(phi)(a))/(phi(x)-phi(a))*y(x),y(x))