# Defining stream function and velocity potential function

I'm struggling with the definition of the stream function. Please check if my following understanding correct:

First we start with an undefined analytical function that we are going to call "complex potential": $$W=\phi+i\psi$$. From the properties of analytic functions, we have $$\frac{dW}{dz}=\phi_x-i\phi_y$$. Now, we are going to define $$\phi$$: $$\nabla{\phi}=(\phi_x,\phi_y):=(u,v)$$, where $$(u,v)$$ is the velocity field of our given 2-dimensional flow. We call $$\phi$$ the velocity potential function. Now, we are going to define the stream function as the imaginary part $$\psi$$ of the complex potential $$W$$. The uniqueness follows from analyticity of $$W$$.

We can now obtain the physical meaning of $$\psi$$ by noticing that from the Cauchy-Riemann equations it follows that $$(\phi_x,\phi_y)=(\psi_y,-\psi_x)$$. Since $$(\psi_x,\psi_y)\cdot(\psi_y,-\psi_x)=0$$, tangent curves of $$\phi$$ are orthogonal to the tangent curves of $$\psi$$. Now i refer to the theorem that states: "Theorem: If the function f is differentiable, the gradient of f at a point is either zero, or perpendicular to the level set of f at that point.". From this theorem and $$\nabla{\phi}=(\phi_x,\phi_y):=(u,v)$$ it follows that level curves of $$\phi$$ are orthogonal to the velocity field $$(u,v)$$. And since tangent curves of $$\phi$$ are orthogonal to the tangent curves of $$\psi$$, i conclude that level curves of $$\psi$$ are parallel to the velocity field $$(u,v)$$, in other words, the fluid flow follows the lines $$\psi=const$$.

Is this sound or not? When i started explaining the stream function like i wrote above, the professor said that my question was about the stream function and not about the complex potential. And my answer wasn't accepted.

Usually, you define the streamfunction as a scalar $$\psi$$ whose isocontours represent flow lines, and then determine the mathematical form of the streamfunctions for potential flows using a complex potential followed by your argument.