a = DSolve[(x^2 + 1) y''[x] - 6 y[x] == 0, y[x], x]

b = DSolve[{(x^2 + 1) y''[x] - 6 y[x] == 0, y[0]==0}, y[x], x]

y[x_] = y[x]/.b[[1,1]]

Simplify[(x^2 + 1) D[y[x], {x, 2}] - 6 y[x]]

Simplify[(x^2 + 1) D[y[x], {x, 2}] - 6 y[x] == 0]