Example. Find the analytic function $f(z)$, if

$$
u(x, y)=\operatorname{Re} f(z)=x^{3}-3 x y^{2}+2 y \quad \text { and } \quad f(i)=2
$$
SOLUTION.

1. We find the partial derivatives of the function $u(x, y)$

$$
\frac{\partial u}{\partial x}=3 x^{2}-3 y^{2}, \quad \frac{\partial u}{\partial y}=-6 x y+2
$$

2. From the 2nd Cauchy-Riemann condition (1)

$$
\frac{\partial v}{\partial x}=-\frac{\partial u}{\partial y}=6 x y-2
$$

we find

$$
v=\int \frac{\partial v}{\partial x} d x+\varphi(y)=\int(6 x y-2) d x+g(y)=3 x^{2} y-2 x+g(y)
$$

Differentiating $v$ with respect to $y$, we get

$$
\frac{\partial v}{\partial y}=3 x^{2}+g^{\prime}(y)
$$

To find the function $g(y)$, we use the 1st Cauchy-Riemann condition (1). Equating $\partial v / \partial y=3 x^{2}+g^{\prime}(y)$ to the derivative

$$
\frac{\partial u}{\partial x}=3 x^{2}-3 y^{2}
$$

we obtain an ordinary differential equation of the 1st order

$$
g^{\prime}(y)=-3 y^{2}
$$

from which we determine $g(y)$

$$
g(y)=-\int 3 y^{2} d y=-y^{3}+C
$$

Thus, we obtain the function

$$
v(x, y)=3 x^{2} y-2 x-y^{3}+C
$$

3. We write the desired function $f(z)$ in the form

$$
f(z)=u+i v=x^{3}-3 x y^{2}+2 y+i\left(3 x^{2} y-y^{3}-2 x+C_{1}\right)
$$

Transforming the obtained expression into a function of the variable $z$, using expressions (2) or the equalities

$$
z=x+i y \quad u \quad z^{3}=(x+i y)^{3}=x^{3}-3 x y^{2}+i\left(3 x^{2} y-y^{3}\right) .
$$

We get

$$
f(z)=z^{3}-2 i z+C
$$

where $C$ is an arbitrary complex constant.

4. We find the value of $C$ from the condition $f(i)=2$ :

$$
2=i^{3}-2 i \cdot i+C
$$

We get $C=i$ and, consequently,

$$
f(z)=z^{3}-2 i z+i
$$

Answer. $f(z)=z^{3}-2 i z+i$.

PROBLEM CONDITIONS. Find the analytic function $f(z)$, if its real or imaginary part and the value of $f(z)$ at some point $z_{0}$ are given.

1. $\operatorname{Re} f(z)=x^{2}-y^{2}+2 x, f(i)=2 i-1$. $2 . \operatorname{Re} f(z)=x /\left(x^{2}+y^{2}\right)$, $f(\pi)=1 / \pi . \quad 3 . \operatorname{Im} f(z)=\operatorname{arctg}(y / x), f(1)=0 . \quad 4 . \operatorname{Re} f(z)=$ $=3 x^{2}-4 x y-3 y^{2}, f(-i)=-3-2 i . \quad 5 . \operatorname{Im} f(z)=10 x y-6 y$, $f(1 / 5)=-1 . \quad 6 . \operatorname{Im} f(z)=\sin y \operatorname{ch}(x+1), \quad f(-1+\pi i / 2)=i$. 7. $\operatorname{Im} f(z)=2 y\left[y^{2}+(x+1)^{2}\right], f(i)=i . \quad 8 . \operatorname{Im} f(z)=x /\left(x^{2}+y^{2}\right)+x$, $f(1)=-2 i . \quad 9$. $\operatorname{Re} f(z)=e^{-y}(x \cos x-y \sin x), f(0)=0$. 10. $\operatorname{Re} f(z)=x \sin x \operatorname{ch} y-y \cos x \operatorname{sh} y, f(0)=0$.

Answers.

1. $f(z)=z^{2}+2 z$. 2. $f(z)=1 / z .3 . f(z)=\ln z .4 . f(z)=z^{2}(3+2 i)$. 5. $f(z)=5 z^{2}-6 z . \quad 6 . f(z)=\operatorname{sh}(z+1)$. 7. $f(z)=(z-1) /(z+1)$. 8. $f(z)=i / z+i z$. 9. $f(z)=z e^{i z}$. 10. $f(z)=z \sin z$.

## 1.5. Integral of a Function of a Complex Variable

PROBLEM STATEMENT. Calculate the integral

$$
\int_{L} f(z) d z
$$

where $L$ is a piecewise smooth curve lying in a domain $D$ where the function $f(z)$ is continuous.

SOLUTION PLAN. The integral of the function $f(z)=u(x, y)+i v(x, y)$, continuous in the domain $D$, is expressed through line integrals of the second kind by the formula

$$
\int_{L} f(z) d z=\int_{L} u d x-v d y+i \int_{L} u d y+v d x
$$

1. We write $f(z)$ in algebraic form

$$
f(z)=u(x, y)+i v(x, y)
$$

2. Using formula (1), we represent the desired integral as the sum of two line integrals of the second kind of the functions $u(x, y)$ and $v(x, y)$ of two real variables $x$ and $y$.
3. We write the equations of the curve $L$ in explicit form $y=y(x)$ (or $x=x(y))$ or parametrically $y=y(t), x=x(t)$.
4. We compute the line integrals by reducing them to definite integrals and write the answer.

Remark. The integral of a function of a complex variable can also be computed using the formula

$$
\int_{L} f(z) d z=\int_{\alpha}^{\beta} f(z(t)) z^{\prime}(t) d t
$$

where $z=z(t)$ is the parametric equation of the curve $L$ in complex form.