data={L->0.5,IE->(((((0.03))^4)π)/64)210 (10^9),F1->-4500,M1->2000,p0->-300};

ω[x_]:=(x^2)(x-4L)

w[x_]:=ω[x]((Subscript[a, 0])+(Subscript[a, 1])x)

U=(1/2)(∫_0^(7L))IE (((w''[x]))^2)\[DifferentialD]x

W=(∫_(3L)^(7L))p0 w[x]\[DifferentialD]x+F1 w[2L]+M1 w'[L]

Π=U-W

mego=First[Solve[{(∂_(Subscript[a, 0]))Π==0,(∂_(Subscript[a, 1]))Π==0},{(Subscript[a, 0]),(Subscript[a, 1])}]]

w[x]/.mego/.data

Plot[%,{x,0,3.5}]