Solving the differential equation for problem 1

Clear[xmin, xmax, xmid, psol1, psol2, y1, y2, dy1, dy2, W]

xmin= 0.0001
xmax = 20
xmid = 3

Define the weight

w[x_] = x^3/(x^2 + 1)^2

Construct the solution for small x

y1small[e_, x_/; 0≤ x ≤ 1] := 1- e/8 x^2

dy1small[e_, x_/; 0 ≤ x ≤ 1] := -e/4 x

Construct the solution for x up to xmid

psol1 =ParametricNDSolve[{ -D[ x^3 D[y[x],x],x] == ee w[x]  y[x],y[xmin]==y1small[ee,xmin],y'[xmin]==dy1small[ee,xmin]},y,{x,xmin, xmid}, {ee}]

y1[e_?NumericQ, x_/; xmin ≤ x ≤ xmid] := Evaluate[ y[e][x] /. psol1]

dy1[e_?NumericQ, x_/; xmin ≤ x ≤ xmid] := Evaluate[ y[e]'[x]/. psol1]

Construct the solution for x from xmid up to xmax

psol2 = ParametricNDSolve[{ -D[ x^3 D[y[x],x],x] == ee w[x] y[x],y[xmax]==1/xmax^2,y'[xmax]==-2/xmax^3},y,{x,xmax, xmid}, {ee}]

y2[e_?NumericQ, x_/; xmid≤ x ≤ xmax] := Evaluate[ y[e][x] /. psol2]

dy2[e_?NumericQ, x_/; xmid ≤ x ≤ xmax] := Evaluate[ y[e]'[x] /. psol2]