This question is regarding the following problem from Bending stresses in beams
Problem:
My solution and hence the answer doesn't match with the answer in the textbook.
My Solution: The planks A will experience water pressure which will vary along the length of the wooden posts. The pressure at any depth d from the surface will be,
$$P=P_{atm} + \rho g d$$ or at any distance x from the bottom (in the figure below)
$$P=P_{atm} + \rho g (h-x)$$
If we talk about any one the wooden posts, the pressure at any distance x from the bottom will be,
$$P=\rho g (h-x)$$
since the pressure also acts on the post from the other side equal to atmospheric
At any distance x, I consider an area on the wooden post $dA= b\,dx$
The pressure P at this x can be written as
$$P = \frac{\delta F}{dA}$$ $$Pb=\frac{\delta F}{dx}$$
where $\delta F$ is the distributed force over area dA
The quantity $\frac{\delta F}{dx}= q_x$ represents the intensity of the load at any x. Thus, $$q_x = Pb= \rho g (h-x) b$$ maximum intensity occurs at x=0,
$$q_{max}= q = \rho g hb$$
The post is like a cantilever beam subjected to linearly varying load with a maximum intensity at the fixed end, for such a beam the maximum bending moment is given by $qL^2 /6$
Thus maximum bending moment in the post will be
$$M_{max}=\frac{\rho g hb \, h^2}{6}=\frac{\rho g b h^3}{6}$$
Finally, maximum bending stress
$$\sigma_{max} = \frac{\frac{\rho g b h^3}{6}. b/2}{\frac{b^4}{12}}$$
$$\sigma_{max}= \frac{\rho g h^3}{b^2} $$
This maximum stress has to be less than or equal to the allowable bending stress
$$\sigma_{max}= \frac{\rho g h^3}{b^2} \leqslant \sigma_{allow}$$
$$b \geqslant (\frac{\rho g h^3}{\sigma_{allow}})^{1/2}$$
substituting the values gives $b \geqslant 99.04mm $
However the answer in the textbook is 199mm
Where am I going wrong?