
188 CHAPTER 5. COMPLEX VARIABLES
5.1.2 The Stream Function
Human kindness is like a defective tap, the first gush may be
impressive but the stream soon dries up.
P. D. James, British mystery writer, Devices and Desires, (1989)
In aerodynamics and fluid mechanics, the functions φ and ψ in the analytic
function f(z = x + iy)=φ(x, y)+iψ(x, y) are called the velocity potential and
stream function, respectively. The velocity potential was introduced in Recipes
04-S21 and 04-S22. The curves ψ(x, y) = constant represent the tracks of the
fluid particles and are called streamlines. Consider φ = x
2
+4x − y
2
+2y.
(a) Confirm that φ satisfies Laplace’s equation so can represent the velocity
potential for steady-state fluid flow.
(b) Using the Cauchy–Riemann conditions, determine ψ(x, y).
(c) Make a contour plot, showing curves of constant φ and ψ. Use constrained
scaling to show that the two families of curves appear to be orthogonal.
Suggest a fluid flow problem where these contours might apply.
(d) Analytically show that the contours in (c) are orthogonal.
(e) Express f completely in terms of z.
The plots and VectorCalculus packages are loaded, the former needed for the
contourplot command, the latter for the Laplacian.
>
restart: with(plots): with(VectorCalculus):
The given function φ(x, y) is entered.
>
phi(x,y):=xˆ2+4*x-yˆ2+2*y;
φ(x, y):=x
2
+4x − y
2
+2y
Applying the Laplacian operator to φ in Cartesian coordinates yields 0, so φ
satisfies Laplace’s equation. Thus, φ is indeed a velocity potential for fluid flow.
>
LE:=Laplacian(phi(x,y),’cartesian’[x,y]);
LE := 0
The first Cauchy–Riemann condition, ∂ψ/∂y =∂φ/∂x, is calculated in CR1 .
>
CR1:=diff(psi(x,y),y)=diff(phi(x,y),x);
CR1 :=
∂
∂y
ψ(x, y)=2x +4
The form of ψ(x, y) is easily obtained by applying pdsolve to CR1 .
>
sol1:=pdsolve(CR1,psi(x,y));
sol1 := ψ(x, y)=2yx+4y +
F1(x)
The second C-R condition, ∂ψ/∂x= −∂φ/∂y, is calculated in CR2 .
>
CR2:=diff(psi(x,y),x)=-diff(phi(x,y),y);
CR2 :=
∂
∂x
ψ(x, y)=2y −2