para = {h -> (E^(-s)), R1 ->  P/2, 
        R2 ->  P/2}
para1 = {P ->  1, L ->  1, 
        w ->  1}
para2 = {UnitStep[(L/2)] ->  1, 
        UnitStep[-(L/2)] ->  0, DiracDelta[L] ->  0, 
        UnitStep[-L] ->  0}

example  7.9 pin-pin  Load P at x=L/2   p.157

fs = 
      PowerExpand[+ R1 -  P h^( L/2) + R2 h^L /. 
          para]

qs = Expand[fs/s]
qx = InverseLaplaceTransform[qs, s, x]
qxL = qx /. x ->  L /. para2

ms = qs/s;
mx = InverseLaplaceTransform[ms, s, x]
mxL = mx /. x ->  L /. para2

Plot[{qx /. para1, mx /. para1}, {x, 0, 1}, 
      PlotRange ->  {-0.6, 0.6}, 
      PlotStyle ->  {Hue[0.9], Hue[0.7]}, 
      AspectRatio ->  0.3]

ypx = InverseLaplaceTransform[-ms/s^2, s, x]

yx = c0 + c1 x + ypx

ans = Solve[{(yx /. x ->  0) == 
                0, (yx /. x ->  L) == 0}, {c0, 
              c1}][[1]] /. para2

δx = yx /. ans
% /. x -> L/2 /. para2

Simplify[δx - (P L^2 x/16 - P x^3/12 + 
            P (x - L/2)^3/6 UnitStep[x - (L/2)])]

Plot[-δx /. para1, {x, 0, 1}, 
      PlotRange -> {{0, 1},  {-0.03, 0}}, 
      PlotStyle ->  Hue[0.9], AspectRatio ->  0.3, 
      GridLines ->  Automatic]