IV. Differential equations and advanced analysis
35. Functions of a complex variable
The Cauchy–Riemann equations of f(z) are checked by cr(z^2 + 3z); the function may be written in z, z̄ (conj(z)), |z|, Re z, Im z or directly in x and y. The app splits f = u + iv, computes the partial derivatives and substitutes into u_x = v_y, u_y = −v_x. If they hold everywhere, the function is analytic and the result is the derivative f'(z) written in z; otherwise the app says where they hold (points or a curve) and the function is not analytic. For a harmonic function harmonic(u = x^2 - y^2) it finds the harmonic conjugate by integrating the equations and the whole f(z) by putting x = z, y = 0; the imaginary part can be given too, harmonic(v = 2xy).
Values of the elementary functions in ℂ: the principal logarithm ln(1 + i) = ln|w| + i Arg w with all values differing by 2kπi, a power with a complex exponent i^i = e^(i Log i), sin, cos, sinh and cosh of a complex number by the addition formulas. The argument is in the same interval as for complex numbers (the “Principal argument” chip). The equations sin z = 2, cos z = 3, sinh z = i, cosh z = 2 are solved by the substitution w = e^(iz) (e^z) and a quadratic equation, e^z = 1 + i by the logarithm; the result is the general solution with k ∈ ℤ and several solutions in the Gauss plane. An equation in x without a real solution (sin x = 2) offers the complex solution button.
Singularities and residues: singularities(f) finds the roots of the denominator and the essential singularities (e^(1/z), sin(1/z)), tells their kind – removable, a pole of order m, essential – and computes the residues: at a simple pole g(a)/q'(a), at a higher pole by the derivative of (z − a)^m f(z), at an essential singularity from the Laurent series. Res(f, z = a) computes one residue. The Laurent series of a rational function in an annulus laurent(f, 1 < |z| < 2) (or |z| > 1, 0 < |z − a| < r, around a point laurent(f, z = a)) is built from the partial fractions over ℂ and the geometric series of each fraction – by whether its pole lies inside or outside the annulus. The integral over a circle oint(f, |z − a| = r) (from a photo \oint_{|z−a|=r}) is computed by the residue theorem; with no singularity inside it is zero, a singularity on the circle is reported.
Residues in real analysis: an improper integral of a rational function over the whole axis, with cos ax or sin ax (Jordan's lemma) and from 0 to ∞ of an even function; an integral of a rational function of cos t and sin t over ⟨0; 2π⟩ by z = e^(it). Integrals with a cosine or sine and over ⟨0; 2π⟩ go by residues at once, for the others choose the “By residues” chip (back by “The usual way”). The same chip on a series sums Σ R(n) from 1 (from 0 or another whole number) by the kernel π cot πz, an alternating series by π/sin πz; a sum over all whole numbers from −∞ goes at once. The inverse Laplace transform of a rational function invlaplace(F) (from a photo \mathcal{L}^{-1}\{F\}) is computed as the sum of the residues of F(s)e^(st).
Rouché's theorem rouche(p, |z| < r) counts the roots of a polynomial in a disc by the term that dominates the sum of the others on the circle, in an annulus r < |z| < R as the difference of two discs; the roots are shown in the Gauss plane. A conformal map w = f(z) is split into u and v, the app tells where it is conformal (f' ≠ 0) and for a Möbius transformation (αz + β)/(γz + δ) finds the fixed points and the images of the real and imaginary axis and of the unit circle. The graph shows the image of the grid of lines x = c and y = c.
The Fourier transform of a rational function ftransform(1/(1 + t^2)) (from a photo \mathcal{F}\{f\}) is computed by residues - for ω > 0 the path is closed in the lower half-plane, for ω < 0 in the upper one - and for an even (odd) function the result is written with |ω|. For a density in x it gives the distribution's characteristic function up to the sign of ω, for the symmetric Cauchy distribution e^(−|t|) directly. The inverse Z-transform invz(F) (\mathcal{Z}^{-1}\{F\}) is the sum of the residues of F(z)zⁿ⁻¹ with the initial value x[0] = lim F(z) for z → ∞. Their use in filters, control and optics is in the chapter Applications of complex analysis.
How to enter it
cr(z^2 + 3z), cr(conj(z)) | The Cauchy–Riemann equations and the derivative. |
harmonic(u = x^2 - y^2), harmonic(v = 2xy) | The harmonic conjugate of a real (imaginary) part. |
ln(1 + i), i^i, sin(1 + i), sin z = 2 | The logarithm, powers, trigonometric functions and equations in ℂ. |
Res(f, z = a), singularities(f) | A residue at a point, all singularities. |
laurent(f, 1 < |z| < 2), laurent(f, z = a) | A Laurent series in an annulus or around a point. |
oint(f, |z - a| = r) | An integral over a circle by the residue theorem. |
int(cos(x)/(x^2 + 1), x, -oo, oo), int(1/(2 + cos(t)), t, 0, 2pi) | Real integrals by residues. |
residues(sum(1/n^2, n, 1, oo)) | A sum of a series by residues. |
rouche(z^5 + 3z + 1, |z| < 1) | The number of roots of a polynomial in a disc or annulus. |
w = (z - i)/(z + i) | A conformal map, a Möbius transformation. |
invlaplace(s/(s^2 + 4)) | The inverse Laplace transform by residues. |
ftransform(1/(1 + t^2)) | The Fourier transform by residues. |
invz(z/(z - 1/2)) | The inverse Z-transform by residues. |
Examples
cr(z^2 + 3z)
cr(x^2 + i y^2)
harmonic(u = x^2 - y^2 + x)
ln(1 + i)


i^i


sin z = 2


singularities(sin(z)/(z^3 (z - 1)))


Res(z^2 e^(1/z), z = 0)


laurent(1/((z - 1)(z - 2)), 1 < |z| < 2)


oint(e^z/(z - i)^2, |z - i| = 1)


int(cos(x)/(x^2 + 1), x, -oo, oo)


int(1/(2 + cos(t)), t, 0, 2pi)


residues(sum(1/n^2, n, 1, oo)) By residues


rouche(z^5 + 3z + 1, 1 < |z| < 2)


w = (z - i)/(z + i)


invlaplace(s/((s + 1)(s^2 + 4)))


ftransform(1/(1 + t^2))


ftransform(1/(pi (1 + x^2)))


invz(z^2/((z - 1)(z - 1/2)))


Known limitations
- Singularities are found for functions with a polynomial in the denominator (and the essential singularities of e^h, sin h, cos h); a denominator like sin z (infinitely many poles) is not supported yet.
- The Laurent series in an annulus works for rational functions, at an essential singularity only around the point when the function has no other singularity.
- Integrals over other curves than a circle (a square, an ellipse), the principal value of an integral with a pole on the axis and the general argument principle are not supported yet.
- A sum of a series from 1 by residues needs an even rational function R; poles of R at whole numbers other than zero are not allowed.
- A conformal map shows the image of a grid; the image of a given region (a half-plane, a strip) only for the axes and the unit circle of a Möbius transformation.
- The Fourier transform works for rational functions without poles on the real axis, the inverse Z-transform for rational functions without a pole at zero.