Clear["Global`*"]

(1-(x^2))((d^2)y/d(x^2))-2x(dy/dx)+n(n+1)y=0.

tmp=LegendreP[n,z]

(1-(z^2))D[tmp,{z,2}]- 2 z D[tmp,z]+ n(n+1)tmp  //Simplify

(1-(z^2))D[tmp,{z,2}]

- 2 z D[tmp,z]

n(n+1)tmp

?D

?LegendreP

tmp=LegendreP[3,x]

((D[(1-(x^2))D[tmp,x],x])/tmp) //Simplify

Solve[x(x+1)==12,x]

u=a (r^(el+1)) + b (r^(-el))

D[u,{r,2}] - ((el(el+1))/(r^2))u //Simplify

tmp= (r^el)

(1/(r^el))D[(r^(2 ))D[tmp,r],r]

((Sin[θ])/θ)D[Sin[θ] LegendreP[m,Cos[θ]],θ]+ λ ((Sin[θ])^2) //FullSimplify

t2= ((D[(1-(z^2))D[LegendreP[n,z],z]])/(LegendreP[n,z])) //FullSimplify

t2 /.{n->3} //Simplify

((D[ (1-(z^2))D[LegendreP[n,z],z]])/(LegendreP[n,z])) //FullSimplify

tmp=LegendreP[3,z]

((D[ (1-(z^2))D[tmp,z]])/tmp) //FullSimplify