Off[General::spell,  General::spell1]
    
Cs = {A2};n = Length[Cs];
v = x^2 Sum[Cs[[i]] x^(i - 1), {i, n}]; 
      v2 = D[v, {x, 2}];
      
W = Integrate[EI v2^2/2 - w v, {x, 0, L}]
   
grad = 
        Table[D[W, Cs[[i]]], {i, 
            n}];
AA = Solve[grad == 0, 
          Cs][[1]]
v = v /. AA;  
    v2 = v2 /. AA;

ve=(x^2) (((w (L^2))/(4 EI)) - ((w x L)/(6 EI)) + ((w (x^2))/(24 EI)));ve2 = D[ve, {x, 2}];
  
valw = {EI -> 1, L -> 1, w -> 1}; 
vw = v /. valw;  
    vew = ve /. valw;
v2w = v2 /. valw;  ve2w = ve2 /. valw;
  
Plot[{vw, vew + 0.001}, {x, 
        0, 1}, PlotStyle -> {Hue[1], 
          Hue[0.3]}]
Plot[{v2w, 
        ve2w + 0.005}, {x, 0, 1}, 
      PlotStyle -> {Hue[1], Hue[0.3]}]