Π[f_] := (∫_0^L)(EI /2 (D[f, {x, 2}])^2  +  q0 f)  \[DifferentialD]x

w3[x_] := 
      c1 x ( L  - x)  +  c2 x^2 (L - x) +  
        c3 x ^3 (L - x)

Π3  =  Π[w3[x]]
eq1  =  
      Collect[D[Π3, c1], {c1, c2, c3, 
          q0}] 
eq2  =  
      Collect[D[Π3, c2] , {c1, c2, c3, 
          q0}]
eq3  =  
      Collect[D[Π3, c3]  , {c1, c2, c3, q0}]

sol  =  
      Solve[{eq1 == 0,  eq2 == 0,  eq3 == 0}, {c1, c2, 
          c3}]

w3[x]  /.  sol  /.  x -> L/2