Off[General::spell,  General::spell1]
    
v = 
      A Sin[Pi x/L]; v2=D[
        v, {x, 2}]
      
W = 
      Integrate[EI v2^2/2 - w v, {x, 0, L}] -  
        P ( v /. x -> L/2)
    vr = v/.Solve[
            D[W, A] == 0, A][[1]]

ve=((w (x^4))/(24 EI)) - (((w (L^2) + 2 P L - 2 d P) (x^3))/(12 EI L)) - (((-w (L^4) - 8 d P (L^2) + 12 (d^2) P L - 4 (d^3) P) x)/(24 EI L)) + (((d^2) P (x - d) UnitStep(x - d))/(2 EI)) - ((d P ((x^2) - (d^2)) UnitStep(x - d))/(2 EI)) + ((P ((x^3) - (d^3)) UnitStep(x - d))/(6 EI));
ve2=((w (x^2))/(2 EI)) - (((w (L^2) + 2 P L - 2 d P) x)/(2 EI L)) + ((P (x - d) UnitStep(x - d))/EI);
  
valuep = {EI -> 1, L -> 1, d -> 0.5, P -> 1, 
          w -> 0};
valuew = {EI -> 1, 
          L -> 1, d -> 0.5, P -> 0, 
          w -> 1};
vr2 = 
      D[vr, {x, 2}]
nvrp = 
      vr /. valuep
nvr2p = 
      vr2 /. valuep
nvrw = 
      vr /. valuew
nvr2w = 
      vr2 /. valuew
nvp = 
        ve /. valuep;
nv2p = 
        ve2 /. valuep;
nvw = 
        ve /. valuew;
nv2w = ve2 /. valuew;
  
Plot[{nvrp, 
        nvp}, {x, 0, 1}, 
      PlotStyle -> {Hue[1], Hue[0.3]}]
Plot[{nvrw, nvw}, {x, 0, 1}, 
        PlotStyle -> {Hue[1], Hue[0.3]}]
  
Plot[{-nvr2p, -nv2p}, {x, 0, 1}, 
      PlotStyle -> {Hue[1], 
          Hue[0.3]}]
Plot[{-nvr2w, -nv2w}, {x, 0, 1}, PlotStyle -> {Hue[1], Hue[0.3]}]

{nvp /. x -> 0.5, nvw /. x -> 0.5, 
      nvp /. x -> 0.25, 
      nvw /. x -> 0.25}
   {nvrp /. x -> 0.5, nvrw /. x -> 0.5, 
      nvrp /. x -> 0.25, nvrw /. x -> 0.25}

{-nv2p /. x -> 0.5, -nv2w /. 
        x -> 0.5, -nv2p /. x -> 0.25, -nv2w /. 
        x -> 0.25}
   {-nvr2p /. x -> 0.5, -nvr2w /. 
        x -> 0.5, -nvr2p /. x -> 0.25, -nvr2w /. 
        x -> 0.25}