Definiciones Básicas.

Ejercicio 1.1.1

Verify that the equation \(x^4+2x^2+1=0\) has no solutions among the real numbers.

Factorizando el polinomio anterior tenemos \((x^2+1)^2=0\), y por lo tanto, las raíces deben cumplir \(x^2=-1\) que no tiene solución en los números reales.

Ejercicio 1.1.2

Find the value of \(i^{15}\).

\[ i^{15}=(i^{12})(i^3)=(i^4\cdot i^4\cdot i^4)(i^3)=i^3=(i^2)i=-i \]

Lo anterior se cumple puesto que \(i^2=-1\) (por definición) y \(i^4=(i^2)(i^2)=(-1)(-1)=1\).

En particular, tenemos el siguiente patrón para cualquier \(n\) entera:

  • \(i^{4n}=1\)
  • \(i^{4n+1}=i\)
  • \(i^{4n+2}=-1\)
  • \(i^{4n+3}=-i\)

Ejercicio 1.1.3

Let \(c_1=-3+i\) and \(c_2=2-4i\). Calculate \(c_1+c_2\) and \(c_1\times c_2\).

\[ c_1+c_2 = (-3+i)+(2-4i) = -3+2+i-4i = -1-3i \]

\[ \begin{aligned} c_1\times c_2 &= (-3+i)\times (2-4i) = 2(-3+i)-4i(-3+i)\\ &= -6+2i+12i-4i^2 = -6+14i-4(-1)\\ &= -6+14i+4 = -2+14i \end{aligned} \]

Ejercicio 1.1.4

Verify that the complex number \(-1+i\) is a solution for the polinomial equation \(x^2+2x+2=0\).

\[ (-1+i)^2+2(-1+i)+2 = (1-2i+i^2)-2+2i+2 = 1-1+2i-2i+2-2 = 0 \]

Práctica de Programación 1.1.1

Write a program that accepts two complex numbers and outputs their sum and their product.

En Rust podemos lograr lo anterior creando un struct que represente los números complejos (con parte real e imaginaria) como el siguiente

pub struct Complex {
    real: f64,
    imaginary: f64,
}

Luego, para implementar la funcionalidad de suma y producto pudimos haber creado funciones del tipo `suma(x: Complex, y: Complex)`, pero es mejor utilizar los traits `Add` y `Mul`, que nos permiten utilizar sobrecarga de operadores, para utilizar la sintaxis usual `c1 + c2`:

impl Add for Complex {
    type Output = Self;

    fn add(self, other: Self) -> Self {
        Self::new(self.real + other.real, self.imaginary + other.imaginary)
    }
}

impl Mul for Complex {
    type Output = Self;

    fn mul(self, other: Self) -> Self {
        let real_part = (self.real * other.real) - (self.imaginary * other.imaginary);
        let imaginary_part = (self.real * other.imaginary) + (self.imaginary * other.real);
        Self::new(real_part, imaginary_part)
    }
}

El código completo se encuentra en mi repositorio JPYamamoto/quantum_computing_studies.

Álgebra de los Números Complejos.

Ejercicio 1.2.1

Let \(c_1 = (-3,-1)\) and \(c_2=(1,-2)\). Calculate their product.

De la definición de multiplicación dada en el libro:

\[\begin{aligned} (-3,-1)\times (1,-2) &= (-3\cdot 1 - (-1)\cdot (-2), -3\cdot (-2) +(-1)\cdot 1)\\ &= (-3-2,6-1)=(-5,5)\end{aligned} \]

Ejercicio 1.2.2

Verify that multiplication of complex numbers is associative.

Sean \(c_1=(a_1,b_1), c_2=(a_2,b_2), c_3=(a_3,b_3)\) números complejos. Por la definición de la multiplicación y propiedades de los reales tenemos:

\[\begin{aligned} \left((a_1,b_1)\cdot (a_2,b_2)\right)\cdot (a_3,b_3) &= (a_1a_2-b_1b_2,a_1b_2+a_2b_1)\cdot (a_3,b_3)\\ &=\left(\left(a_1a_2-b_1b_2\right)a_3-\left(a_1b_2+a_2b_1\right)b_3,\left(a_1a_2-b_1b_2\right)b_3+a_3\left(a_1b_2+a_2b_1\right)\right)\\ &=\left(a_1a_2a_3-b_1b_2a_3-a_1b_2b_3+a_2b_1b_3,a_1a_2b_3-b_1b_2b_3+a_3a_1b_2+a_3a_2b_1\right)\\ &=\left(a_1\left(a_2a_3-b_2b_3\right)-b_1\left(b_2a_3-a_2b_3\right),a_1\left(a_2b_3+a_3b_2\right)+\left(a_2a_3-b_2b_3\right)b_1\right)\\ &=(a_1,b_1)\cdot\left(a_2a_3-b_2b_3,a_3b_2-a_2b_3\right)\\ &=(a_1,b_1)\cdot\left(\left(a_2,b_2\right)\cdot\left(a_3,b_3\right)\right) \end{aligned} \]

Ejercicio 1.2.3

Let \(c_1=3i\) and \(c_2=-1-i\). Calculate \(\frac{c_1}{c_2}\).

Usando la fórmula dada por el libro para la división:

\[\begin{aligned} \dfrac{3i}{-1-i} &= \dfrac{0(-1)+3(-1)}{(-1)^2+(-1)^2}+\dfrac{(-1)(3)-(0)(-1)}{(-1)^2+(-1)^2}i\\ &=\dfrac{-3}{2}+\dfrac{-3}{2}i \end{aligned} \]

Ejercicio 1.2.4

Calculate the modulus of \(c=4-3i\).

Usando la fórmula del libro:

\[ \left|4-3i\right| = \sqrt{4^2+(-3)^2} = \sqrt{16+9} = \sqrt{25} = 5 \]

Ejercicio 1.2.5

Verify that given two arbitrary complex numbers \(c_1\) and \(c_2\), the following equality always holds: \[ \left|c_1\right|\left|c_2\right|=\left|c_1c_2\right|. \]

Tenemos que la igualdad del ejercicio se cumple si y sólo si \(\left|c_1\right|^2\left|c_2\right|^2 = \left|c_1c_2\right|^2\). Podemos ver que lo del lado izquierdo es lo mismo que \(\left(a_1^2+b_1^2\right)\left(a_2^2+b_2^2\right)\). Mientras que para el lado derecho sucede que \(c_1c_2=\left(a_1a_2-b_1b_2\right)+\left(a_1b_2+a_2b_1\right)i\), y el módulo de eso es \(\left(a_1a_2-b_1b_2\right)^2+\left(a_1b_2+a_2b_1\right)^2\).

Usando únicamente propiedades del producto (cuyo desarrollo no escribo completo) podemos llegar a que lo anterior es igual que \(\left(a_1^2+b_1^2\right)\left(a_2^2+b_2^2\right)\), cumpliéndose la igualdad.

Ejercicio 1.2.6

Prove that \[ \left|c_1+c_2\right|\leq\left|c_1\right|+\left|c_2\right|. \] When are they, in fact, equal?

Esencialmente esta es la demostración de la desigualdad triangular, pero haré una prueba más “algebraica”.

Elevando al cuadrado ambos lados de la desigualdad:

\[ (a_1+a_2)^2+(b_1+b_2)^2 \leq \left(\left|c_1\right|+\left|c_2\right|\right)^2 \]

Manipulando el lado izquierdo tenemos:

\[ a_1^2 + 2 a_1 a_2 + a_2^2 + b_1^2 + b_2^2 + 2 b_1 b_2 \]

Mientras que del lado derecho tenemos:

\[ \left|c_1\right|^2+\left|c_2\right|^2+2\left|c_1\right|\left|c_2\right| \]

Por la propiedad del cuadrado del módulo, lo anterior es:

\[ a_1^2+b_1^2+a_2^2+b_2^2+2\left|c_1\right|\left|c_2\right| \]

Cancelando los términos en ambos lados de la desigualdad nos queda:

\[ a_1 a_2 + b_1 b_2 \leq \left|c_1\right|\left|c_2\right| \]

Elevando nuevamente al cuadrado ambos lados tenemos:

\[ \left(a_1 a_2 + b_1 b_2\right)^2 \leq \left|c_1\right|^2\left|c_2\right|^2 \]

Y del lado izquierdo nos queda:

\[ a_1^2a_2^2 + b_1^2b_2^2 + 2 a_1a_2b_1b_2 \]

mientras que del lado derecho tenemos:

\[ \left(a_1^2 + b_1^2\right) \cdot \left(a_2^2 + b_2^2\right) = a_1^2a_2^2 + a_1^2b_2^2 + a_2^2b_1^2 + b_1^2b_2^2 \]

Volvemos a juntar y cancelar términos con lo que nos queda:

\[ 2 a_1a_2b_1b_2 \leq a_1^2b_2^2 + a_2^2b_1^2 \]

Restando en ambos lados \(2 a_1a_2b_1b_2\) nos queda:

\[ 0 \leq a_1^2b_2^2 + a_2^2b_1^2 - 2 a_1a_2b_1b_2 \]

Pero vemos que es lo mismo:

\[ 0 \leq \left(a_1b_2 - a_2b_1\right)^2 \]

Y por las propiedades de los números reales sabemos que lo anterior siempre se cumple. En particular, podemos concluir que sí se cumple la igualdad cuando \(a_1 b_2 = a_2 b_1\).

Ejercicio 1.2.7

Show that for all \(c\in\Complex\), we have \(c+(0,0)=(0,0)+c=c\). That is, \((0,0)\) is an additive identity.

Sea \(c=(a,b)\). Luego \(c+(0,0)=(a,b)+(0,0)=(a+0,b+0)\). Por la propiedad conmutativa de los reales lo anterior es igual que \((0+a, 0+b)=(0,0)+c\).

De igual manera, \((a+0,b+0)=(a,b)=c\) por ser 0 el neutro aditivo en los reales.

Ejercicio 1.2.8

Show that for all \(c\in\Complex\) we have \(c\times(1,0)=(1,0)\times c=c\). That is, \((1,0)\) is a multiplicative identity.

Sea \(c=(a,b)\). Luego \(c\times(1,0)=(a,b)\times(1,0)=(a1-b0, a0+1b)=(a,b)=c\) (por la definición del producto y propiedades de los reales). De la misma manera \((a1-b0,a0+1b)=(1a-0b,1b+a0)=(1,0)\times (a,b)=(1,0)\times c\).

Ejercicio 1.2.9

Verify that multiplication by \((-1,0)\) changes the sign of the real and imaginary components of a complex number.

Sea \(c=(a,b)\in\Complex\). Tenemos que \(c\times(-1,0)=(a,b)\times(-1,0)=(a(-1)-b(0),a(0)+(-1)b)\). Lo anterior es igual que \((-a,-b)\) demostrando la proposición.

Ejercicio 1.2.10

Show that conjugation respects addition, i.e., \[ \overline{c_1}+\overline{c_2}=\overline{c_1+c_2}. \]

Sean \(c_1=a_1+b_1i, c_2=a_2+b_2i\) números complejos. Si obtenemos la suma de los conjugados nos da:

\[ \overline{a_1+b_1i}+\overline{a_2+b_2i}=a_1-b_1i+a_2+b_2i = (a_1+a_2)-(b_1+b_2)i \]

Por otro lado, el conjugado de la suma es:

\[ \overline{(a_1+b_1i)+(a_2+b_2i)} = \overline{(a_1+a_2)+(b_1+b_2)i} = (a_1+a_2)-(b_1+b_2)i \]

Claramente ambos son iguales, y se demuestra la proposición.

Ejercicio 1.2.11

Show that conjugation respects multiplicatio, i.e., \[\overline{c_1}\times\overline{c_2}=\overline{c_1\times c_2}.\]

\[\begin{aligned} \overline{a_1+b_1i}\times\overline{a_2+b_2i} &= (a_1-b_1i)\times(a_2-b_2i)\\ &= (a_1a_2-(-b_1)(-b_2),a_1(-b_2)+a_2(-b_1))\\ &= (a_1a_2-b_1b_2,-(a_1b_2+a_2b_1))\end{aligned} \]

Podemos ver que el resultado es igual al producto usual, con la diferencia de que la segunda entrada tiene el signo invertido, que es igual que \(\overline{c_1\times c_2}\).

Ejercicio 1.2.12

Consider the operation given by flipping the sign of the real part. Is this a field isomorphism of \(\Complex\)?

No lo es, puesto que no respeta el producto. Ejemplo:

\[ -\left[(2+i)\times(1+i)\right] = -1+3i \]

por otro lado

\[ -(2+i)\times -(1+i) = 1-3i \]

Práctica de Programación 1.2.1

Take the program that you wrote in the last programming drill and make it also perform subtraction and division of complex numbers. In addition, let the user enter a complex number and have the computer return its modulus and conjugate.

Resolver este problema implica implementar algunos traits más en Rust. El primer trait a implementar es Sub que nos permite realizar restas:

impl Sub for Complex {
    type Output = Self;

    fn sub(self, other: Self) -> Self::Output {
        self + -other
    }
}

Podemos ver que hemos definido la resta en función de la negación de un operando. Para lograr que el operador unario - funcione como negación, debemos implementar el trait Neg:

impl Neg for Complex {
    type Output = Self;

    fn neg(self) -> Self::Output {
        Self::new(-self.real, -self.imaginary)
    }
}

Para la división de números complejos implementamos el algoritmo dado por el libro, en el trait Div, únicamente teniendo cuidado del caso de división entre 0:

impl Div for Complex {
    type Output = Self;

    fn div(self, other: Self) -> Self::Output {
        if other.real == 0.0 && other.imaginary == 0.0 {
            panic!("Cannot divide by zero!");
        }

        let Complex { real: r1, imaginary: i1 } = self;
        let Complex { real: r2, imaginary: i2 } = other;

        let real_part = ((r1 * r2) + (i1 * i2)) / (f64::powi(r2, 2) + f64::powi(i2, 2));
        let imaginary_part = ((r2 * i1) - (r1 * i2)) / (f64::powi(r2, 2) + f64::powi(i2, 2));

        Self::new(real_part, imaginary_part)
    }
}

Finalmente, creamos los siguientes 2 métodos para calcular el módulo y conjugado de un número complejo:

pub fn abs(self) -> f64 {
    let Complex { real: r, imaginary: i } = self;
    f64::sqrt(f64::powi(r, 2) + f64::powi(i, 2))
}

pub fn conjugate(self) -> Self {
    let Complex { real: r, imaginary: i } = self;
    Self::new(r, -i)
}

El código completo se encuentra en mi repositorio JPYamamoto/quantum_computing_studies.

Geometría de los Números Complejos

Ejercicio 1.3.1

Draw the complex numbers \(c_1=2-i\) and \(c_2=1+i\) in the complex plane, and add them using the parallelogram rule. Verify that you would get the same result as adding them algebraically.

Figura 1: Solución al ejercicio 1.3.1

Figura 1: Solución al ejercicio 1.3.1

Del gráfico anterior podemos ver que la solución es \(3\), mediante la solución gráfica. De manera algebraica tendríamos que la solución es $ 2-i+1+i = 3$.

Ejercicio 1.3.2

Let \(c_1=2-i\) and \(c_2=1+i\). Subtract \(c_2\) from \(c_1\) by first drawing \(-c_2\) and then adding it to \(c_1\) using the parallelogram rule.

Figura 2: Solución al ejercicio 1.3.2

Figura 2: Solución al ejercicio 1.3.2

Ejercicio 1.3.3

Draw the complex number given by the polar coordinates \(\rho=3\) and \(\theta=\frac{\pi}{3}\). Compute its Cartesian coordinates.

Sus coordenadas cartesianas para el número \(a+bi\) son \(a=3\cos\frac{\pi}{3}=1.5\) y \(b=3\sin\frac{\pi}{3}=\frac{3\sqrt{3}}{2}\approx 2.59\).

Figura 3: Solución al ejercicio 1.3.3

Figura 3: Solución al ejercicio 1.3.3

Práctica de Programación 1.3.1

Write a program that converts a complex number from its Cartesian representation to its polar representation and vice versa.

Claramente necesitamos dos posibles representaciones de números complejos (cartesianos y complejos), sin embargo, tener una segunda estructura introduce complejidad innecesaria. Por eso, simplemente creé 2 structs: Cartesian y Polar.

Idealmente, cada una de esas representa un punto en coordenadas de su tipo correspondiente. Además, ambas implementan el trait From para pasar de una a otra representación. El siguiente es el código para las coordenadas polares:

struct Polar(f64, f64);

impl From<Cartesian> for Polar {
    fn from(Cartesian(x, y): Cartesian) -> Self {
        Polar(f64::sqrt(f64::powi(x, 2) + f64::powi(y, 2)), f64::atan(y / x))
    }
}

Y para coordenadas cartesianas:

struct Cartesian(f64, f64);

impl From<Polar> for Cartesian {
    fn from(Polar(magnitude, phase): Polar) -> Self {
        Cartesian(magnitude * f64::cos(phase), magnitude * f64::sin(phase))
    }
}

Además incluí la opción para convertir ambos a Complex y viceversa, mas no incluyo el código aquí porque la conversión es bastante directa tomando en cuenta que podemos ir en cualquier caso a la representación cartesiana.

El código completo se encuentra en mi repositorio JPYamamoto/quantum_computing_studies.

Ejercicio 1.3.4

Multiply \(c_1=-2-i\) and \(c_2=-1-2i\) using both the algebraic and the geometric method; verify that results are identical.

\[ (-2-i)(-1-2i) = \left((-2)(-1)-(-1)(-2)\right)+\left((-2)(-2)+(-1)(-1)\right)i = 5i \]

Para calcular el resultado de la forma geométrica primero convertimos los números a su forma polar:

\[ c_1=\left(\sqrt{(-2)^2+(-1)^2},\tan^{-1}\left(\frac{-1}{-2}\right)\right) = \left(\sqrt{5},\tan^{-1}\left(\frac{1}{2}\right)\right) \]

\[ c_2=\left(\sqrt{(-1)^2+(-2)^2},\tan^{-1}\left(\frac{-2}{-1}\right)\right) = \left(\sqrt{5},\tan^{-1}\left(2\right)\right) \]

Y luego utilizamos la fórmula dada por el libro para multiplicarlos:

\[ c_1c_2=\left(\sqrt{5}\sqrt{5}, \tan^{-1}\left(\frac{1}{2}\right)+\tan^{-1}\left(2\right)\right) = \left(5, \dfrac{\pi}{2}\right) \]

Finalmente regresamos el resultado a su forma cartesiana

\[ \left(5\cos\frac{\pi}{2}\right)+\left(5\sin\frac{\pi}{2}\right)i = 0+5i = 5i \]

Ejercicio 1.3.5

Describe the geometric effect on the plane obtained by multiplying by a real numebr, i.e., the function \[c\mapsto c\times r_0,\] where \(r_0\) is a fixed real number.

Puesto que \(r_0\) es un número real, este tiene fase \(\theta=0\). Por lo tanto, dado \(c\) arbitrario, veremos que la multiplicación de estos dos es:

\[ r_0c=\left(r_0 \rho, 0+\theta\right) = \left(r_0\rho,\theta\right) \]

Es decir, lo único que hacemos es escalar el valor de \(\rho\), análogo a lo que sucede en la multiplicación por escalar de vectores.

Ejercicio 1.3.6

Describe the geometric effect on the plane obtained by multiplying by a generic complex number, i.e., the function \[ c\mapsto c\times c_0,\] where \(c_0\) is a fixed complex number.

Sean \(c=(\rho, \theta)\) y \(c_0=(\rho_0, \theta_0)\). Luego su producto es

\[ c\times c_0=\left(\rho\rho_0, \theta+\theta_0\right) \]

por lo tanto, rotamos en un ángulo de \(\theta_0\) y escalamos por el factor \(\rho_0\).

Práctica de Programación 1.3.2

Write a program that accepts a small drawing around the origin of the complex plane and a complex number. The program should change the drawing by multiplying every point of the diagram by a complex number.

Inicialmente pensaba hacer algo un poco más complejo con alguna biblioteca para gráficos en Rust. Sin embargo, dada la complejidad de la tarea y los conocimientos necesarios que quedan fuera del alcance de la práctica, mejor solo hice la rotación de una matriz pequeña de valores booleanos.

El algoritmo únicamente toma un factor (un número complejo que definimos a partir de su forma polar), y multiplica las posiciones en la matriz para obtener la nueva posición.

Adelante dejo el código reducido, que es lo principal del algoritmo. El código completo se puede encontrar en mi repositorio JPYamamoto/quantum_computing_studies.

let factor = Complex::from(Polar(2.0, PI / 4.0));

for (y, row) in matrix.iter().enumerate() {
    for (x, elem) in row.iter().enumerate() {
        // El offset corresponde a la mitad de la matriz,
        // para asegurar que el centro de la matriz es el origen.

        let mut c = Complex::new((x as f64) - offset, (y as f64) - offset);
        c = c * factor;
        let Complex { real: r, imaginary: i } = c;
        let new_x = (r as i64) + offset;
        let new_y = (i as i64) + offset;

        if new_x >= 0 && new_x < (row.len() as i64) {
            if new_y >= 0 && new_y < (matrix.len() as i64) {
                new_matrix[(new_y as usize)][(new_x as usize)] = *elem;
            }
        }
    }
}

Ejercicio 1.3.7

Divide \(2+2i\) by \(1-i\) using both the algebraic and the geometrical method and verify that the result are the same.

Usando el método algebraico tenemos

\[ \dfrac{2+2i}{1-i}=\dfrac{(2)(1)+(2)(-1)}{1^2+(-1)^2}+\dfrac{(1)(2)-(2)(-1)}{1^2+(-1)^2}i=\dfrac{2-2}{2}+\dfrac{2+2}{2}i=2i \]

Usando el método geométrico primero debemos convertir los números a su representación polar:

\[ c_1=\left(\sqrt{2^2+2^2},\tan^{-1}\left(\frac{2}{2}\right)\right) = \left(2\sqrt{2},\dfrac{\pi}{4}\right) \]

\[ c_2=\left(\sqrt{1^2+(-1)^2},\tan^{-1}\left(\frac{-1}{1}\right)\right) = \left(\sqrt{2},-\dfrac{\pi}{4}\right) \]

Luego usamos la fórmula dada por el libro para la división:

\[ \dfrac{c_1}{c_2}=\left(\dfrac{2\sqrt{2}}{\sqrt{2}},\dfrac{\pi}{4}-\left(-\dfrac{\pi}{4}\right)\right)=\left(2,\dfrac{\pi}{2}\right) \]

Finalmente regresamos a la forma cartesiana para hacer evidente que los resultados son iguales:

\[ \dfrac{c_1}{c_2}=2\cos\dfrac{\pi}{2}+2\sin\dfrac{\pi}{2}i=2i \]

Ejercicio 1.3.8

Let \(c=1-i\). Convert it to polar coordinates, calculate its fifth power, and revert the answers to Cartesian coordinates.

Del ejercicio anterior tenemos que \(c= \left(\sqrt{2},-\frac{\pi}{4}\right)\). Usamos la fórmula dada en el libro para obtener la potencia 5:

\[ c^5 = \left(\sqrt{2}^5,5\left(-\dfrac{\pi}{4}\right)\right)=\left(4\sqrt{2},-\dfrac{5\pi}{4}\right) \]

Y regresamos a la forma cartesiana:

\[ c^5=4\sqrt{2}\cos-\dfrac{5\pi}{4}+4\sqrt{2}\sin-\dfrac{5\pi}{4}i=-4-4i \]

Técnicamente debí obtener el módulo \(2\pi\) de la fase en el último ejercicio, pero por no escribir más, dejé que la calculadora se encargara.

Ejercicio 1.3.9

Find all cube roots of \(c=1+i\).

Primero obtenemos la forma polar \(c=\left(\sqrt{1^2+1^2},\tan^{-1}\frac{1}{1}\right)=\left(\sqrt{2},\frac{\pi}{4}\right)\). Con la fórmula del libro, y sabiendo que las raíces cúbicas siempre tienen 3 soluciones, nos queda lo siguiente:

\[ \sqrt[3]{c}=\left(\sqrt[6]{2},\dfrac{1}{3}\left(\frac{\pi}{4}+k2\pi\right)\right),k=0,1,2 \]

Por lo tanto, tenemos las soluciones:

\[ \sqrt[3]{c}_1=\left(\sqrt[6]{2},\frac{\pi}{12}\right) \] \[ \sqrt[3]{c}_2=\left(\sqrt[6]{2},\frac{3\pi}{4}\right) \] \[ \sqrt[3]{c}_3=\left(\sqrt[6]{2},\frac{17\pi}{12}\right) \]

Los anteriores en su forma cartesiana son: \(\sqrt[3]{c}_1\approx 1.08421+0.29051i, \sqrt[3]{c}_2\approx -0.7937+0.7937i, \sqrt[3]{c}_3\approx -0.29051-1.08421i\).

Utilizo números decimales en vez de la representación exacta para ser consistente con las soluciones que propone el libro.

Ejercicio 1.3.10

Prove De Moivre’s formula: \[ \left(e^{\theta i}\right)^n = \cos\left(n\theta\right)+i\sin\left(n\theta\right). \]

Fórmula de Euler: \[ e^{i\theta}=\cos\theta+i\sin\theta \]

Inicialmente uno podría pensar que se cumple la regla \((a^m)^n=a^{mn}\) al igual que con los números reales, de manera que la demostración sería directa. Esto no es así con los números complejos y es por ello que no podemos aplicar tal regla.

Lo que sí podemos hacer es utilizar la fórmula de Euler enunciada anteriormente, con lo que tenemos que basta demostrar

\[ \left(\cos\theta + i\sin\theta\right)^n=\cos\left(n\theta\right)+i\sin\left(n\theta\right) \]

Procedemos por inducción. Sea \(n=1\):

\[ \left(\cos\theta+i\sin\theta\right)^1=\cos\left(1\theta\right)+i\sin\left(1\theta\right) \]

Puesto que el \(1\) es el neutro tanto en la exponenciación y en el producto, se cumple la igualdad. Como hipótesis inductiva asumimos que se cumple el enunciado para \(n-1\), y vemos que se cumpla para \(n\):

\[\begin{aligned} &\left(\cos\theta + i\sin\theta\right)^n\\ =&\left(\cos\theta + i\sin\theta\right)^{n-1}\left(\cos\theta + i\sin\theta\right)\\ =&\left(\cos\left((n-1)\theta\right)+i\sin\left((n-1)\theta\right)\right)\left(\cos\theta + i\sin\theta\right)\end{aligned}\]

Expandiendo lo anterior tenemos:

\[ \cos\theta\cos\left((n-1)\theta\right)+i\cos\theta\sin\left((n-1)\theta\right)+ i\sin\theta\cos\left((n-1)\theta\right)+i^2\sin\theta\sin\left((n-1)\theta\right) \]

Por las identidades de sumas para senos y cosenos tenemos que

\[ \cos\theta\sin\left((n-1)\theta\right) + \sin\theta\cos\left((n-1)\theta\right) = \sin\left(\theta+(n-1)\theta\right) = \sin\left(n\theta\right) \]

\[ \cos\theta\cos\left((n-1)\theta\right) - \sin\theta\sin\left((n-1)\theta\right) = \cos\left(\theta+(n-1)\theta\right) = \cos\left(n\theta\right) \]

Por lo tanto, la expresión que teníamos antes es igual que:

\[ \cos\left(n\theta\right)+i\sin\left(n\theta\right) \]

Y queda demostrado.

Ejercicio 1.3.11

Write the number \(c=3-4i\) in exponential form.

Primero obtenemos la forma polar

\[ c=\left(\sqrt{3^2+(-4)^2}, \tan^{-1}\left(\frac{-4}{3}\right)\right) = \left(5, \tan^{-1}\left(\frac{-4}{3}\right)\right) \]

Y lo reescribimos de forma exponencial:

\[ c=5e^{i\tan^{-1}\left(\frac{-4}{3}\right)} \]

Ejercicio 1.3.12

Rewrite the law for dividing complex numbers in exponential form.

Recordemos la división de números complejos en su forma polar:

\[ \dfrac{c_1}{c_2}=\left(\dfrac{\rho_1}{\rho_2},\theta_1-\theta_2\right) \]

Si tomamos \(\rho=\dfrac{\rho_1}{\rho_2}\) y \(\theta=\theta_1-\theta_2\) tenemos que la forma exponencial es:

\[ \dfrac{c_1}{c_2} = \dfrac{\rho_1}{\rho_2}e^{i\left(\theta_1-\theta_2\right)} \]

Ejercicio 1.3.13

Draw all the fifth roots of unity.

Figura 4: Solución al ejercicio 1.3.13

Figura 4: Solución al ejercicio 1.3.13

Ejercicio 1.3.14

Describe the geometric meaning of the function \[c\mapsto c^n\] from \(\Complex\to\Complex\).

Geométricamente podemos decir que estamos elevando la longitud del vector a la potencia \(n\), e incrementando el ángulo \(n\) veces.

Ejercicio 1.3.15

Describe the geometric meaning of the function \[c\mapsto c + c_0\] from \(\Complex\to\Complex\).

En este caso la representación cartesiana nos da una mejor intuición. Puesto que se suman los valores reales e imaginarios, podemos decir que estamos trasladando el vector \(c\) en la dirección y magnitud de \(c_0\).

Ejercicio 1.3.16

When \(a=d=0\) and \(b=c=1\), we get \(R(x)=\frac{1}{x}\). Describe the geometrical effect of this transformation.

La transformación realiza dos cosas. Primero, refleja el punto en el plano sobre el eje real. También contrae a los elementos afuera del círculo unitario de manera que quedan dentro, y mientras mayores son, más cerca quedan del origen. Y viceversa, cuando los puntos están dentro del círculo, los manda afuera.

Ejercicio 1.3.17

Prove that the composition of two Möbius transformations is a Möbius transformation. In other words, if \(R_{a,b,c,d}\) and \(R_{a’,b’,c’,d’}\) are two Möbius transformations, the transformation \(R_{a’,b’,c’,d’}\circ R_{a,b,c,d}\) given by \[R_{a’,b’,c’,d’}\circ R_{a,b,c,d}(x)=R_{a’,b’,c’,d’}\left(R_{a,b,c,d}(x)\right)\] is also a Möbius transformation.

La evaluación de \(x\) en \(R_{a,b,c,d}\) nos genera:

\[ R_{a,b,c,d}(x)=\dfrac{ax+b}{cx+d} \]

Luego, si evaluamos \(R_{a’,b’,c’,d’}\) con el resultado anterior obtenemos:

\[ R_{a’,b’,c’,d’}\left(\dfrac{ax+b}{cx+d}\right)=\dfrac{a’\left(\dfrac{ax+b}{cx+d}\right)+b’}{c’\left(\dfrac{ax+b}{cx+d}\right)+d’} \]

Por un proceso un tanto largo de simplificación algebraica (que voy a omitir), lo anterior es igual que:

\[ R_{a’,b’,c’,d’}\left(\dfrac{ax+b}{cx+d}\right)=\dfrac{a’\left(\dfrac{ax+b}{cx+d}\right)+b’}{c’\left(\dfrac{ax+b}{cx+d}\right)+d’} \]

Y si lo simplificamos (nuevamente omito el álgebra) nos queda

\[ \dfrac{(a’ a + b’ c)x+(a’ b+b’ d)}{(ac’+cd’)x+(bc’+d’ d)} \]

Para confirmar que es una transformación de Möbius se debe cumplir

\[ (a’ a+b’ c)(bc’+d’ d)-(a’ b+b’ d)(ac’ +cd’) \neq 0\]

Realizamos la expansión de lo anterior y cancelamos términos inversos para llegar a

\[ (a’ ad’ d+b’ bc’ c) - (a’ bcd’ +ab’ c’ d) \]

y si continuamos con el álgebra veremos que lo anterior es igual a

\[ (a’ d’-b’ c’)(ad-bc) \]

Dado que ambas transformaciones eran de Möbius, sabemos que \(ad-bc\neq 0\) y \(a’ d’-b’ c’\neq 0\). Por lo tanto, su producto también es distinto de 0.

Ejercicio 1.3.18

Show that the identity transformation, i.e., the transformation that leaves every point fixed, is a Möbius transformation.

El libro no nos dice explícitamente cuál es esta transformación, pero fácilmente podemos deducir que debe tener denominador \(1\) y numerador \(x\). La única opción es que \(a=d=1\) y \(b=c=0\).

Fácilmente podemos ver que \(ad-bc=1-0=1\), y por lo tanto es una transformación de Möbius.

Ejercicio 1.3.19

Show that each Möbius transformation has an inverse that is also a Möbius transformation, i.e., for each \(R_{a,b,c,d}\) you can find $Ra’,b’,c’,d’ such that \[ R_{a’,b’,c’,d’}\circ R_{a,b,c,d} (x)=x. \]

Sea \(R_{a,b,c,d}=\dfrac{ax+b}{cx+d}\) una transformación de Möbius arbitraria. Podemos ver que si \(a’=d,b’=-b,c’=-c,d’=a\), entonces la transformación \(R_{a’,b’,c’,d’}\) es la inversa:

\[ \left(\dfrac{dx-b}{-cx+a}\right)\circ\left(\dfrac{ax+b}{cx+d}\right)=x \]

(Omito el álgebra que implica deducir lo anterior, pero es fácil confirmar que el resultado es correcto. Únicamente sustituimos las \(x\) en \(R_{a’,b’,c’,d’}\) por \(R_{a,b,c,d}\) y simplificamos la expresión.)

Por lo tanto, se cumple la proposición.

Práctica de Programación 1.3.3

Expand your program. Add functions for multiplication, division, and returning the polar coordinates of a number.

Omito este ejercicio puesto que, si bien podría implementar los algoritmos nuevos que tenemos para operar sobre las representaciones polares o exponenciales, desde una perspectiva práctica resulta más sencillo usar las funcionalidades que ya tenemos de antes para operar números complejos, y para transformar entre representaciones de un número complejo.