Answer: [tex]q+\dfrac12+q^2[/tex]
Step-by-step explanation:
Let y gives the length of the segment having Q.
Then, the other pat = 1-y
Now, the expected length of the segment that contains Q = [tex]\int^{q}_0(1-x)dx+\int^{1}_{q}x dx\\\\=|x-\dfrac{x^2}{2}|^{q}_0+|\dfrac{x^2}{2}|^{1}_{q}\\\\=(q-\dfrac{q^2}{2})+\dfrac{1}{2}-\dfrac{q^2}{2}=q+\dfrac12+q^2[/tex]
The expected length of the segment that contains Q [tex]=q+\dfrac12+q^2[/tex]