To find the velocity potential The question is

A simple source of strength $m$ is fixed at the origin $O$ in a
  uniform stream of incompressible fluid moving with velocity $U \vec{i}$. 
Show that the velocity potential $\phi$ at any point $P$ in the stream
  is given by $$ \phi = \frac{m}{r}-Ur \cos \theta$$ where $OP = r$ and
  $\theta$ is the angle which $\vec{OP}$ makes with the direction
  $\vec{i}$.

But the complex potential for a simple source in a stream flow with velocity $U \vec{i}$ is given by $w= - m \log z - U z$
So velocity potential would be $\phi = - m \log r - U r \cos \theta$, wouldn't it?
 A: To resolve your confusion here, you have to distinguish between two-dimensional and three-dimensional flow.
The complex potential is a very useful tool for analyzing two-dimensional flows that can be characterized as potential flows -- that is, inviscid, irrotational and incompressible. If the velocity field in terms of Cartesian components is $(u,v)$ then we find in two-dimensional potential flow, the complex velocity $u - iv$ is related to a complex potential $w(z)$  by
$$u - iv = - \frac{dw}{dz}$$
where we introduce the complex variable $z = x+iy \in \mathbb{C}.$
For a two-dimensional line source at the origin, the contribution to the complex potential due to the source is indeed $-m \log z.$
However, the problem appears to pertain to three-dimensional flow affected by a point source, where complex analysis is not generally applicable.
The notion of a velocity potential in three-dimensions arises when the 
flow is irrotational.  In this case, the curl of the velocity field vanishes (as it would in two-dimensional flow as well), and the velocity field can be expressed in terms of the gradient of a real-valued scalar potential function
$$\mathbb{u} = - \nabla \phi.$$
Ignoring the uniform stream which is handled in a straighforward way, if a point source emits incompressible fluid at a volumetric rate $4\pi m$, then conservation of mass requires that the flux through any spherical surface centered at the source is constant and 
$$\tag{*} 4 \pi m = \int_0^{2 \pi} \int_0^\pi\mathbb{u} \cdot \mathbb{e}_r r^2 \sin \theta \, d\theta \,d \phi. $$
By symmetry only the radial component $u_r$ is non-zero and depends only on the radial coordinate $r$. Whence, (*) is satisfied for every $r > 0$ if 
$$- \nabla \phi = \frac{d \phi}{dr } \mathbb{e}_r = \frac{m}{r^2} \mathbb{e}_r,$$
and the source contribution to the velocity potential is
$$\phi = \frac{m}{r}.$$
