Skip to content

Instantly share code, notes, and snippets.

@asukakenji
Last active September 29, 2019 03:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asukakenji/581323aa053aab70dd21c4fdd5efdd76 to your computer and use it in GitHub Desktop.
Save asukakenji/581323aa053aab70dd21c4fdd5efdd76 to your computer and use it in GitHub Desktop.
Solving sin(š¯‘§)=2 (Trigonometric Equations with Complex Numbers)
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Solving sin(z)=2 (Trigonometric Equations with Complex Numbers)\n",
"\n",
"## Step 1: Writing sin(z) in terms of z\n",
"\n",
"Start with Euler's formula:\n",
"\n",
"$$\n",
"e^{i\\theta} = \\cos\\theta + i\\sin\\theta\n",
"$$\n",
"\n",
"Put $\\theta = z$:\n",
"\n",
"$$\n",
"e^{iz} = \\cos{z} + i\\sin{z}\n",
"$$\n",
"\n",
"Put $\\theta = -z$:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"e^{-iz} &= \\cos(-z) + i\\sin(-z) \\\\\n",
"&= \\cos{z} - i\\sin{z}\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Subtract the 2 formulae above and make $\\sin{z}$ the subject:\n",
"\n",
"$$\n",
"\\begin{array}{rrl}\n",
" & e^{iz} \\!\\!\\!\\!\\! &= \\cos{z} + i\\sin{z} \\\\\n",
"- & e^{-iz} \\!\\!\\!\\!\\! &= \\cos{z} - i\\sin{z} \\\\\n",
"\\hline\n",
"& e^{iz} - e^{-iz} \\!\\!\\!\\!\\! &= 2i\\sin{z} \\\\\n",
"& \\implies \\sin{z} \\!\\!\\!\\!\\! &= \\displaystyle\\frac{e^{iz} - e^{-iz}}{2i}\n",
"\\end{array}\n",
"$$\n",
"\n",
"## Step 2: Solving the equation\n",
"\n",
"Substitute the result from above:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\sin{z} &= 2 \\\\\n",
"\\displaystyle\\frac{e^{iz} - e^{-iz}}{2i} &= 2 \\\\\n",
"e^{iz} - e^{-iz} &= 4i \\\\\n",
"(e^{iz})^2 - 1 &= 4i(e^{iz}) \\\\\n",
"(e^{iz})^2 - 4i(e^{iz}) - 1 &= 0 \\\\\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"Apply quadratic formula by substituting $u = e^{iz}$:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"e^{iz} &= \\displaystyle\\frac{-(-4i) \\pm \\sqrt{(-4i)^2 - 4(1)(-1)}}{2(1)} \\\\\n",
"&= (2 \\pm \\sqrt{3})i \\\\\n",
"iz &= \\ln((2 \\pm \\sqrt{3})i) \\\\\n",
"&= \\ln(2 \\pm \\sqrt{3}) + \\ln(i) \\\\\n",
"iz \\cdot (-i) &= \\left[ \\ln(2 \\pm \\sqrt{3}) + \\ln(i) \\right] \\cdot (-i) \\\\\n",
"z &= -\\ln(2 \\pm \\sqrt{3})i - \\ln(i)i\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"## Step 3: Calculating ln(i)\n",
"\n",
"Calculate $\\ln(i)$ by writing $i$ in exponential form:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"i &= \\cos\\theta + i\\sin\\theta \\\\\n",
"&= \\cos(\\pi/2 + 2k\\pi) + i\\sin(\\pi/2 + 2k\\pi) & \\forall k \\in \\mathbb{Z} \\\\\n",
"&= e^{(\\pi/2 + 2k\\pi)i} \\\\\n",
"\\ln(i) &= \\ln(e^{(\\pi/2 + 2k\\pi)i}) \\\\\n",
"&= (\\pi/2 + 2k\\pi)i\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"## Step 4: Rewriting the solution\n",
"\n",
"Rewrite the solution:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"z &= -\\ln(2 \\pm \\sqrt{3})i - \\ln(i)i \\\\\n",
"&= -\\ln(2 \\pm \\sqrt{3})i - [(\\pi/2 + 2k\\pi)i]i \\\\\n",
"&= -\\ln(2 \\pm \\sqrt{3})i + (\\pi/2 + 2k\\pi) \\\\\n",
"&= (\\pi/2 + 2k\\pi) - \\ln(2 \\pm \\sqrt{3})i\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"--------\n",
"\n",
"This gist was inspired by [Math for fun, sin(z)=2](https://youtu.be/3C_XD_cCeeI)."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment