A steady current I is flowing through a straight wire of finite length

A steady current I is flowing through a straight wire of finite length.
Find B1, the magnitude of the magnetic field generated by this wire at a point P located a distance x from the centre of the wire. Assume that at P the angle subtended from the midpoint of the wire to each end is θm. Express your answer in terms of I, x, θm, k = μ0/( 4π).