Authors: Russell C. Hibbeler
ISBN-13: 978-0133915426
See our solution for Question 12P from Chapter 7 from Hibbeler's Engineering Mechanics.
We are given the distributed load on beam is $w$, and the moment at the center of the shaft is $M = 0$.
We are asked the distance a between the bearings in terms of the shaft's length L.
The free body diagram of the system is:

We have the distance between the bearings A and B is a.
We have the shaft' length L.
The relation between the forces acting on the system in y-direction is,
\[\left[ \begin{array}{l} {A_y} + {B_y} - \frac{{w\left( {L - a} \right)}}{4}\\ - wa - \frac{{w\left( {L - a} \right)}}{4} \end{array} \right] = 0\]Due to symmetry in geometry of the system, ${A_y} = {B_y}$. Now, the above equation is reduced as:
\[\begin{array}{c} 2{A_y} - \frac{{w\left( {L - a} \right)}}{2} - wa = 0\\ {A_y} = {B_y} = \frac{w}{4}\left( {L + a} \right) \end{array}\]The free body diagram of symmetric shaft is:

The moment equilibrium condition of the system is,
\[\begin{array}{c} \Sigma M = 0\\ \left[ \begin{array}{l} - M - \frac{{wa}}{2}\left( {\frac{a}{4}} \right) - \frac{{w\left( {La} \right)}}{4}\left( {\frac{a}{2} + \frac{L}{6} - \frac{a}{6}} \right)\\ + \frac{w}{4}\left( {L + a} \right)\left( {\frac{a}{2}} \right) \end{array} \right] = 0 \end{array}\]Substitute the value $M = 0$ in the above expression.
\[\begin{array}{c} 3{a^2} + \left( {L - a} \right)\left( {L + 2a} \right) - 3a\left( {L + a} \right) = 0\\ 2{a^2} + 2aL - {L^2} = 0\\ a = 0.37L \end{array}\]