{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# M3M6: Methods of Mathematical Physics\n",
    "\n",
    "$$\n",
    "\\def\\dashint{{\\int\\!\\!\\!\\!\\!\\!-\\,}}\n",
    "\\def\\infdashint{\\dashint_{\\!\\!\\!-\\infty}^{\\,\\infty}}\n",
    "\\def\\D{\\,{\\rm d}}\n",
    "\\def\\E{{\\rm e}}\n",
    "\\def\\dx{\\D x}\n",
    "\\def\\dt{\\D t}\n",
    "\\def\\dz{\\D z}\n",
    "\\def\\C{{\\mathbb C}}\n",
    "\\def\\R{{\\mathbb R}}\n",
    "\\def\\H{{\\mathbb H}}\n",
    "\\def\\CC{{\\cal C}}\n",
    "\\def\\HH{{\\cal H}}\n",
    "\\def\\FF{{\\cal F}}\n",
    "\\def\\I{{\\rm i}}\n",
    "\\def\\qqqquad{\\qquad\\qquad}\n",
    "\\def\\qqand{\\qquad\\hbox{and}\\qquad}\n",
    "\\def\\qqfor{\\qquad\\hbox{for}\\qquad}\n",
    "\\def\\qqwhere{\\qquad\\hbox{where}\\qquad}\n",
    "\\def\\Res_#1{\\underset{#1}{\\rm Res}}\\,\n",
    "\\def\\sech{{\\rm sech}\\,}\n",
    "\\def\\acos{\\,{\\rm acos}\\,}\n",
    "\\def\\erfc{\\,{\\rm erfc}\\,}\n",
    "\\def\\vc#1{{\\mathbf #1}}\n",
    "\\def\\ip<#1,#2>{\\left\\langle#1,#2\\right\\rangle}\n",
    "\\def\\norm#1{\\left\\|#1\\right\\|}\n",
    "\\def\\half{{1 \\over 2}}\n",
    "\\def\\fL{f_{\\rm L}}\n",
    "\\def\\fR{f_{\\rm R}}\n",
    "$$\n",
    "\n",
    "Dr Sheehan Olver\n",
    "<br>\n",
    "s.olver@imperial.ac.uk\n",
    "\n",
    "<br>\n",
    "Website: https://github.com/dlfivefifty/M3M6LectureNotes\n",
    "\n",
    "\n",
    "\n",
    "# Lecture 22:  Integral equations on the half-line and Riemann–Hilbert problems\n",
    "\n",
    "Our goal is to solve the integral equation\n",
    "$$\n",
    "\\lambda u(x) + \\int_{0}^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor 0 < x < \\infty.\n",
    "$$\n",
    "We will demonstrate the procedure for the special case $K(x) = \\E^{-\\gamma |x|}$. \n",
    "\n",
    "Taking Fourier transforms, we get functions analytic above or below the real axis, giving us a Riemann–Hilbert problem of finding $\\Phi(z)$ analytic off $(-\\infty,\\infty)$ such that\n",
    "$$\n",
    "\\Phi_+(s) - g(s)\\Phi_-(s) = h(s) \\qqand \\Phi(\\infty) = C\n",
    "$$\n",
    "where $\\Phi_\\pm(s) = \\lim_{\\epsilon \\rightarrow 0} \\Phi(s \\pm \\I \\epsilon)$ are the limits from above and below.  Here $g$ and $h$ are given, and $g(\\pm \\infty) = 1$.\n",
    "\n",
    "Outline:\n",
    "\n",
    "1. Integral equation to Riemann–Hilbert problem\n",
    "2. Cauchy transforms on the Real line\n",
    "   - Application: Calculating error functions\n",
    "\n",
    "## Integral equation to Riemann–Hilbert problem\n",
    "\n",
    "Recall the notation\n",
    "$$\n",
    "f_{\\rm R}(x) = \\begin{cases}f(t) & t \\geq 0 \\\\ 0 & \\hbox{otherwise} \\end{cases}\n",
    "$$\n",
    "and\n",
    "$$\n",
    "f_{\\rm L}(x) = \\begin{cases}f(t) & t < 0 \\\\ 0 & \\hbox{otherwise} \\end{cases}\n",
    "$$\n",
    "\n",
    "Using this, we can rewrite the integral equation on the half line\n",
    "$$\n",
    "\\lambda u(x) + \\int_{0}^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor 0 < x < \\infty.\n",
    "$$\n",
    "as an integral equation on the whole line:\n",
    "$$\n",
    "\\lambda u_{\\rm R}(x) + \\int_{-\\infty}^\\infty K(x-t)u_{\\rm R}(t) \\dt = f_{\\rm R}(x) + p_{\\rm L}(x)\\qqfor -\\infty < x < \\infty.\n",
    "$$\n",
    "where \n",
    "$$\n",
    "p(x) = \\int_{-\\infty}^\\infty K(x-t)u_{\\rm R}(t) \\dt\n",
    "$$\n",
    "Taking Fourier transforms, this becomes:\n",
    "$$\n",
    "(\\lambda + \\widehat K(s)) \\widehat{u_{\\rm R}}(s) = \\widehat{f_{\\rm R}}(s) + \\widehat{p_{\\rm L}}(s)\n",
    "$$\n",
    "As discussed last lecture, assuming $u$ is \"nice\" we are guaranteed that $\\widehat{ u_{\\rm R}}(s)$ is analytic in the lower half-plane and $\\widehat{ p_{\\rm L}}(s)$ is analytic in the upper-half plane.  Thus introduce the sectionally analytic function:\n",
    "$$\n",
    "\\Phi(z) = \\begin{cases}  \\widehat{p_{\\rm L}}(z) & \\Im z > 0 \\\\ \n",
    "                            \\widehat{u_{\\rm R}}(z) & \\Im z < 0 \n",
    "                            \\end{cases}\n",
    "$$\n",
    "Then our integral transformed integral equation becomes:\n",
    "$$\n",
    "\\underbrace{\\Phi_+(s)}_{\\widehat{p_{\\rm L}}(s)} - \\underbrace{g(s)}_{\\lambda + \\widehat K(s)} \\underbrace{\\Phi_-(s)}_{\\widehat{u_{\\rm R}}(s)} = \\underbrace{h(s)}_{-\\widehat{f_{\\rm R}}(s) } \\qqand \\Phi(\\infty) = 0\n",
    "$$\n",
    "\n",
    "Here there is one unknown $\\Phi(z)$, and we claim that in certain conditions this has one—and only—one solution. Thus we wish to:\n",
    "\n",
    "1. Find $\\Phi(z)$\n",
    "2. Recover $u(x)$ via the inverse Fourier transform ${\\cal F}^{-1} \\Phi_-$"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.0.0",
   "language": "julia",
   "name": "julia-1.0"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.1.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}