l0[x_]:=((x-0.5)(x-1)(x-1.5))/((0-0.5)(0-1)(0-1.5))

l1[x_]:=((x-0)(x-1)(x-1.5))/((0.5-0)(0.5-1)(0.5-1.5))

l2[x_]:=((x-0)(x-0.5)(x-1.5))/((1-0)(1-0.5)(1-1.5))

l3[x_]:=((x-0)(x-0.5)(x-1))/((1.5-0)(1.5-0.5)(1.5-1))

[Ln[x_]:=l0[x]*1+l1[x]*2+l2[x]*3+l3[x]*4]

Expand[Ln[x]]