Solution (source code)

= Solution

<Wavefunction normalization> cancels in the ratio of integrals:
$$
\boxed{P(a/2<x<a)=\frac{\int_{a/2}^a(a^2+x^2)dx}{\int_0^a(a^2+x^2)dx}
=\frac{19a^3/24}{4a^3/3}=\frac{19}{32}.}
$$
A normalized version of the specified <wavefunction> is $\sqrt3(a+ix)/(2a^{3/2})$ on its support.