Wolfram Language

Partial Differential Equations

Construct a Complex Analytic Function

Construct a complex analytic function, starting from the values of its real and imaginary parts on the axis.

The real and imaginary parts u and v satisfy the CauchyRiemann equations.

In[1]:=
Click for copyable input
creqns = {D[u[x, y], x] == D[v[x, y], y], D[v[x, y], x] == -D[u[x, y], y]};

Prescribe the values of u and v on the axis.

In[2]:=
Click for copyable input
xvals = {u[x, 0] == x^3, v[x, 0] == 0};

Solve the CauchyRiemann equations.

In[3]:=
Click for copyable input
sol = DSolve[{creqns, xvals}, {u, v}, {x, y}]
Out[3]=

Verify that the solutions are harmonic functions.

In[4]:=
Click for copyable input
Laplacian[{u[x, y], v[x, y]} /. sol[[1]], {x, y}]
Out[4]=

Visualize the streamlines and equipotentials generated by the solution.

In[5]:=
Click for copyable input
ContourPlot[{u[x, y], v[x, y]} /. sol[[1]], {x, -5, 5}, {y, -5, 5}, ContourStyle -> {Red, Blue}]
Out[5]=

Construct a complex analytic function from the solution.

In[6]:=
Click for copyable input
f[x_, y_] = u[x, y] + I v[x, y] /. sol[[1]]
Out[6]=

This represents the function .

In[7]:=
Click for copyable input
(f[x, y] // Factor) /. {x + I y -> z}
Out[7]=

Related Examples

de es fr ja ko pt-br ru zh