{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"using Plots, ComplexPhasePortrait, ApproxFun, SingularIntegralEquations, OscillatoryIntegrals, \n",
" SpecialFunctions\n",
"gr();"
]
},
{
"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{for}\\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\\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",
"
\n",
"s.olver@imperial.ac.uk\n",
"\n",
"
\n",
"Website: https://github.com/dlfivefifty/M3M6LectureNotes\n",
"\n",
"\n",
"\n",
"# Lecture 21: Laplace transforms\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",
"A key tool will be the half-Fourier transforms\n",
"$$\n",
"\\int_{-\\infty}^0 u(t) \\E^{-\\I s t} \\dt \\qqand \\int_0^\\infty u(t) \\E^{-\\I s t} \\dt\n",
"$$\n",
"and the Laplace transform\n",
"$$\n",
"\\int_0^\\infty u(t) \\E^{-z t} \\dt\n",
"$$\n",
"in particular we are interested in the analyticity properties with respect to $s$/$z$. \n",
"\n",
"Outline:\n",
"\n",
"2. Analyticity properties of Fourier transforms\n",
" - Inverse Fourier transform on shifted contours\n",
"1. Half-Fourier transforms\n",
" - Inverting the Half-Fourier transform\n",
" - Relationship to Laplace transform\n",
"2. Application: solving differential equations on the half-line\n",
"\n",
"## Analyticity properties of Fourier transforms\n",
"\n",
"\n",
"Consider the Fourier transform of \n",
"$$\n",
"\\sech x = {2 \\over \\E^x + \\E^{-x}}\n",
"$$\n",
"This function has exponential decay in both directions:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xx = -10:0.01:10\n",
"plot(xx,sech.(xx))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now the Fourier transform of $\\sech x$ is\n",
"$$\n",
"\\FF\\sech(s) = \\int_{-\\infty}^\\infty \\sech t \\, \\E^{-\\I s t} \\dt = \\pi \\sech{\\pi s \\over 2}\n",
"$$\n",
"This is calculated via Residue theorem with a bit of work."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.2710149513994194 + 0.0im"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"f = Fun(sech, Line())\n",
"fourier(f, 2.0)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.2710149513994184"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"π*sech(π*2.0/2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that\n",
"$$\n",
"\\pi \\sech {\\pi z \\over 2} = {2 \\pi \\over \\E^{\\pi z \\over 2} + \\E^{-{\\pi z \\over 2}}}\n",
"$$\n",
"is analytic for $-1 < \\Im z < 1$."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"phaseplot(-3..3, -3..3, z -> π*sech(π*z/2))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is because of the expontial decay. \n",
"\n",
"**Theorem (Analyticity of Fourier transforms)** Suppose $|f(x) \\E^{\\gamma x}| < |M(x)|$ where $M$ is absolutely integrable for all $a < \\gamma < b$. Then \n",
"$$\n",
"\\widehat f(z) = \\int_{-\\infty}^\\infty f(t) \\E^{-\\I z t} \\dt\n",
"$$\n",
"is analytic for $a < \\Im z < b$.\n",
"\n",
"**Proof** Let $z = s + \\I \\gamma$ and note that $|f(t) \\E^{\\I z t}| = |f(t) \\E^{\\gamma t}|$. Thus for $a < \\gamma < b$, we can exchange differentiation and integration to get\n",
"$$\n",
"{\\D \\widehat f \\over \\dz} = -\\I z \\hat f(z)\n",
"$$\n",
"⬛️\n",
"\n",
"**Remark** We don't need $f$ to be analytic at all! Decay in $f$ gives analyticity.\n",
"\n",
"In the case of $\\sech x$, we get exponential decay in both directions: that is $\\sech x \\E^{|\\gamma| x}$ is absolutely integrable for $\\gamma < 1$.\n",
"\n",
"Another example is $\\E^{-x^2/2}$, which is absolutely integrable for any $\\gamma$. Therefore, it's Fourier transform is in fact entire:\n",
"$$\n",
"\\FF[\\E^{-\\diamond^2/2}](z) = \\sqrt{2\\pi} \\E^{-{z^2 \\over 2}}\n",
"$$\n",
"\n",
"\n",
"### Inverse Fourier transform on shifted contours\n",
"\n",
"A neglected fact of the Fourier transform is that we can think of $\\hat f(z)$ living on any line $(-\\infty + \\I \\gamma, \\infty+\\I \\gamma)$, and in fact we can recover $f$ from the Fourier transform only on this line. This works even if $\\hat f(s)$ is not defined on the real-axis, the real-axis is NOT special!\n",
"\n",
"**Theorem** Suppose $f(x) \\E^{\\gamma x}$ is square integrable. Then \n",
"$$\n",
"f(x) = {1 \\over 2 \\pi} \\int_{-\\infty+\\I \\gamma}^{\\infty + \\I \\gamma} \\widehat f(\\zeta) \\E^{\\I x \\zeta} \\D \\zeta\n",
"$$\n",
"\n",
"**Proof** Note for $g(x) = f(x) \\E^{\\gamma x}$ \n",
"$$\n",
"\\widehat g(s) = \\int_{-\\infty}^\\infty f(t) \\E^{\\gamma t - \\I s t} \\dt = \\widehat f(s + \\I \\gamma).\n",
"$$\n",
"Therefore we have\n",
"\\begin{align*}\n",
"\\E^{\\gamma x} f(x) &= g(x) = \\FF^{-1} \\widehat g(x) = {1 \\over 2 \\pi} \\int_{-\\infty}^{\\infty} \\widehat g(s) \\E^{\\I x s} \\D s ={1 \\over 2 \\pi} \\int_{-\\infty}^{\\infty} \\widehat f(s + \\I \\gamma) \\E^{\\I x s} \\D s \\\\\n",
" & = {1 \\over 2 \\pi} \\int_{-\\infty+ \\I \\gamma}^{\\infty+ \\I \\gamma} \\widehat f(\\zeta) \\E^{\\I x (\\zeta - \\I \\gamma)} \\D \\zeta \\\\\n",
" &= {1 \\over 2 \\pi} \n",
" \\E^{\\gamma x} \\int_{-\\infty+ \\I \\gamma}^{\\infty+ \\I \\gamma} \\widehat f(\\zeta) \\E^{\\I x \\zeta} \\D \\zeta\n",
"\\end{align*}\n",
"Which shows the result by cancelling out $\\E^{\\gamma x}$.\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Half-Fourier transforms\n",
"\n",
"Consider now \n",
"$$\n",
"\\int_0^\\infty f(t) \\E^{-\\I s t} \\dt\n",
"$$\n",
"This is in fact the Fourier transform of $f$ extended to the negative real axis by zero:\n",
"$$\n",
"\\int_{-\\infty}^\\infty \\begin{cases}f(t) & t \\geq 0 \\\\ 0 & \\hbox{otherwise} \\end{cases} \\E^{-\\I s t} \\dt\n",
"$$\n",
"To make sure we remember the domain of definition, we introduce 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",
"Therefore \n",
"$$\n",
"\\widehat\\fR(s) = \\int_0^\\infty f(t) \\E^{-\\I s t} \\dt \\qqand \\widehat\\fL(s) = \\int_{-\\infty}^0 f(t) \\E^{-\\I s t} \\dt\n",
"$$\n",
"\n",
"Because it is identically zero on the negative real axis, we immediately get the following:\n",
"\n",
"**Corollary (analyticity of Half-Fourier transform)** Suppose $f(x)$ is bounded for $x \\geq 0$. Then $\\widehat{\\fR}(z)$ is analytic in the lower half plane \n",
"$$\\H_+ = \\{ z : \\Im z < 0 \\}.$$\n",
"\n",
"More generally, $f$ can even have exponential decay: if $f(x) \\E^{\\gamma x}$ is bounded then $\\widehat\\fR(z)$ is analytic in $\\{z : \\Im z < \\gamma \\}$. As before, the same inversion formula follows:\n",
"\n",
"**Corollary (inverting Half-Fourier transform)** Suppose $f(x) \\E^{\\gamma x}$ is square integrable for $x \\geq 0$. Then \n",
"$$\n",
"f(x) = {1 \\over 2 \\pi} \\int_{-\\infty + \\I M}^{\\infty + \\I M} \\widehat{\\fR}(\\zeta) \\E^{\\I x \\zeta} \\D \\zeta\n",
"$$\n",
"for any choice of $-\\infty < M \\leq \\gamma$.\n",
"\n",
"\n",
"**Example** Consider $f(x) = x \\E^{-x}$ for $0 \\leq x < \\infty$. Note that $f(x) \\E^{\\gamma x}$ is square integrable for any $\\gamma < 1$, and we have\n",
"$$\n",
"\\widehat\\fR(z) = \\int_0^\\infty t \\E^{-t -\\I s t} \\dt = {1 \\over (1+\\I s)^2}\n",
"$$\n",
"is analytic for $\\Im z < 1$. Thus for any $M < 1$ we have\n",
"\\begin{align*}\n",
"f(x) &= {1 \\over 2 \\pi} \\int_{-\\infty+\\I M}^{\\infty +\\I M}\\widehat\\fR(\\zeta) \\E^{\\I x \\zeta}\\D \\zeta \\\\\n",
" &={1 \\over 2 \\pi} \\int_{-\\infty+\\I M}^{\\infty +\\I M}{1 \\over (1+\\I \\zeta)^2} \\E^{\\I x \\zeta}\\D \\zeta\n",
"\\end{align*}\n",
"\n",
"Since $x > 0$, we can use Residue calculus in the upper-half plane, which confirms the result:\n",
"$$\n",
"\\Res_{z = -\\I} {\\E^{\\I x z} \\over (1+\\I z)^2} = \\Res_{z = -\\I} {\\E^{- x} + \\I x \\E^{-x} (z +\\I) + O(z+\\I)^2 \\over -(z-\\I)^2} = -\\I x \\E^{-x}.\n",
"$$\n",
"**Example** Consider $f(x) = x$. This function is not square-integrable, but we have $f(x) \\E^{\\gamma x}$ is square integrable for any $\\gamma < 0$, and we find for $\\Im z < 0$\n",
"$$\n",
"\\widehat{\\fR}(z) = -{1 \\over z^2}\n",
"$$\n",
"Thus we can still use the result to say, for any $M < 0$, \n",
"$$\n",
"f(x) =-{1 \\over 2 \\pi} \\int_{-\\infty+\\I M}^{\\infty +\\I M} {1 \\over \\zeta^2} \\E^{\\I x \\zeta}\\D \\zeta\n",
"$$\n",
"\n",
"\n",
"Note that the results have corresponding analogues for $\\fL$:\n",
"\n",
"**Corollary (analyticity of left Half-Fourier transform)** Suppose $f(x) \\E^{\\gamma x}$ is bounded for $x \\leq 0$. Then $\\widehat{\\fL}(z)$ is analytic for $\\{z : \\Im z > \\gamma \\}$.\n",
"\n",
"\n",
"**Corollary (inverting left Half-Fourier transform)** Suppose $f(x) \\E^{\\gamma x}$ is square integrable for $x < 0$. Then \n",
"$$\n",
"f(x) = {1 \\over 2 \\pi} \\int_{-\\infty + \\I M}^{\\infty + \\I M} \\widehat{\\fL}(\\zeta) \\E^{\\I x \\zeta} \\D \\zeta\n",
"$$\n",
"for any choice of $\\gamma \\leq M < \\infty $.\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Laplace transforms\n",
"\n",
"Now consider the Laplace transform\n",
"$$\n",
"\\check f(z) = \\int_0^\\infty f(t) \\E^{-z t} \\dt\n",
"$$\n",
"but this is just the half Fourier transform evaluated on the negative imaginary axis!\n",
"$$\n",
"\\check f(z) = \\widehat\\fR (-\\I z)\n",
"$$\n",
"Thus if $f(x) \\E^{\\gamma x}$ is square integrable, then $\\check f(z)$ is well-defined for $\\Re z \\geq \\gamma$. \n",
"\n",
"NEVER think of the Laplace transform as a real-valued object: it only makes sense as a complex object. This is seen from the inverse Laplace transform\n",
"$$\n",
"f(x) = {1 \\over 2 \\pi \\I} \\int_{-\\I \\infty - M}^{\\I \\infty - M} \\check f(\\zeta) \\E^{\\zeta x} \\D \\zeta\n",
"$$\n",
"which is of course just the inverse Fourier transform in disguise.\n",
"\n",
"\n",
"## Application: solving differential equations on the half-line\n",
"\n",
"Consider the following ODE for $x \\geq 0$:\n",
"\\begin{align*}\n",
"u''(x) + 2u'(x) + u(x) = f(x)\n",
"\\end{align*}\n",
"with initial conditions $u(0) = u'(0) = 0$. Note that we have by integration-by-parts\n",
"\\begin{align*}\n",
"\\check{u'}(z) = \\int_0^\\infty u'(t) \\E^{-z t} \\dt = u(0) + z \\int_0^\\infty u(t) \\E^{-z t} \\dt = u(0) + z \\check u(z) \\\\\n",
"\\check{u''}(z) = u'(0) + z \\check{u'}(z) = u'(0) + z u(0) + z^2 \\check u(0)\n",
"\\end{align*}\n",
"Thus taking into account the initial conditions, are equation in Laplace space becomes\n",
"$$\n",
"(z^2 + 2z + 1) \\check u(z) = \\check f(z)\n",
"$$\n",
"Hence we have\n",
"$$\n",
"\\check u(z) = {1 \\over 2 \\pi \\I}\\int_{-\\I\\infty-M}^{\\I \\infty-M} {\\check f(\\zeta) \\over \\zeta^2 + 2\\zeta+1} \\E^{x \\zeta} \\D \\zeta \n",
"$$\n",
"Consider the case $f(x) = x$, so that\n",
"$$\n",
"\\check f(z) = {1 \\over z^2}\n",
"$$\n",
"Here we need $M < 0$ hence we are integrating on a contour in the right-half plane. Using Residue calculus, we have\n",
"$$\n",
"u(z) = \\left(\\Res_{z = -1} + \\Res_{z=0}\\right) {\\E^{z x} \\over z^2 (z +1)^2} = \\Res_{z = -1} {\\E^{-x} +\\E^{-x}(x+2) (z+1) +O(z+1)^2 \\over (z +1)^2} + \\Res_{z=0} {1 + (x-2) z +O(z)^2 \\over z^2} \\\\\n",
" = (x+2)\\E^{-x} + x-2\n",
"$$\n",
"\n",
"\n",
"## Laplace transform of rational functions\n",
"\n",
"\n",
"We now consider the question of calculating Laplace transforms (or equivalently, half-Fourier transforms)\n",
"$$\n",
"\\check f(s) = \\int_0^\\infty f(t) \\E^{-s t} \\D t\n",
"$$\n",
"where $f$ is rational.\n",
"We're going to do something seemingly crazy: we'll first calculate the Cauchy transform\n",
"$$\n",
"\\CC[f \\E^{-s \\diamond}](z) = {1 \\over 2 \\pi \\I} \\int_0^\\infty {f(t) \\E^{-s t} \\over t- z} \\D t\n",
"$$\n",
"so that\n",
"$$\n",
"\\check f(s) = -2 \\pi \\I\\lim_{z \\rightarrow \\infty} z \\CC[f \\E^{-s \\diamond}](z) \n",
"$$\n",
"Note that the exponential decay in the integrand allows us to use Plemelj's lemma: if we find a function $\\phi(z)$ such that\n",
"1. $\\phi(z)$ is analytic off $[0,\\infty)$\n",
"2. $\\lim_{z \\rightarrow \\infty} \\phi(z) = 0$ for any angle of approach\n",
"3. $\\phi$ has weaker than pole singularities at 0\n",
"4. $\\phi_+(x) - \\phi_-(x) = f(x) \\E^{-s x}$\n",
"\n",
"\n",
"Then we have calculated the Cauchy transform:\n",
"$$\\phi(z) = \\CC[f \\E^{-s \\diamond}](z).$$\n",
"\n",
"\n",
"Let's start with $f(x) = 1$ and $s = 1$, that is, what is the Cauchy transform of $\\E^{-x}$? Consider the exponential integral:\n",
"$$\n",
"{\\rm Ei}(z) = \\int_{-\\infty}^z {\\E^\\zeta \\over \\zeta} \\D \\zeta\n",
"$$\n",
"Without loss of generality, the contour of integration is\n",
"$$\n",
"(\\infty,-1) \\cup [-1, z)\n",
"$$\n",
"that is, a straight line to $-1$ and a straightline from $-1$ to $z$. Thus we have a branch cut on $[0,\\infty)$ which has the jump\n",
"$$\n",
"{\\rm Ei}^+(x) - {\\rm Ei}^-(x) = -\\oint {\\E^\\zeta \\over \\zeta} \\D \\zeta = -2 \\pi \\I\n",
"$$\n",
"where \n",
"$$\n",
"{\\rm Ei}^\\pm(x) = \\lim_{\\epsilon \\rightarrow 0} {\\rm Ei}(x\\pm\\I \\epsilon)\n",
"$$\n",
"Consider\n",
"$$\n",
"\\phi(z) = -{\\E^{-z} {\\rm Ei}(z) \\over 2 \\pi \\I }\n",
"$$\n",
"1. This is analytic off $[0,\\infty)$\n",
"2. Integrating by parts we have decay at $\\infty$ in all directions:\n",
"$$\n",
"\\E^{-z} {\\rm Ei}(z) = {1 \\over z} - \\int_{-\\infty}^z {\\E^{\\zeta-z} \\over \\zeta^2} \\D \\zeta = O(z^{-1})\n",
"$$\n",
"3. $\\phi$ has a logarithmic singularity at 0\n",
"4. \n",
"$$\\phi_+(x) - \\phi_-(x) = \\E^{-x}.$$\n",
"\n",
"Thus \n",
"$$\n",
"\\CC[ \\E^{-s \\diamond}](z) = \\phi(s z) = - {\\E^{-s z} {\\rm Ei}(s z) \\over 2 \\pi \\I}\n",
"$$\n",
"\n",
"Let's make sure I didn't make a mistake. Here we first define Ei:"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"ei (generic function with 1 method)"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"const ei₋₁ = let ζ = Fun(-50 .. -1)\n",
" sum(exp(ζ)/ζ)\n",
"end\n",
"function ei(z) \n",
" ζ = Fun(Segment(-1 , z))\n",
" ei₋₁ + sum(exp(ζ)/ζ)\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"#9 (generic function with 1 method)"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"φ = (z) -> -exp(-z)*ei(z)/(2π*im)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The expression matches the Cauchy transform:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.02534853710699088 + 0.017828329563678025im"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t = Fun(0 .. 50)\n",
"s = 2.0\n",
"z = 2.0+2.0im\n",
"sum(exp(-s*t)/(t-z))/(2π*im)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.02534853710699058 + 0.017828329563677824im"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"φ(s*z)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We then recover the Laplace transform by taking the limit:\n",
"$$\n",
"\\check 1(s) = -2 \\pi \\I \\lim_{z\\rightarrow \\infty} z \\phi(s z) = \\lim_{z\\rightarrow \\infty} {z \\over s z} = {1 \\over s}\n",
"$$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"What about rational $f$? Do the same trick of subtracting off the singularities. For example, consider $f(z) = 1/(z+1)$. Then\n",
"$$\n",
"{\\phi(s z) - \\phi(-s) \\over z+1}\n",
"$$\n",
"satisfies all the necessary properties."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.0174397493357667 + 0.013485355450154557im"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"t = Fun(0 .. 50)\n",
"s = 2.0\n",
"z = 2.0+2.0im\n",
"f = 1/(t+1)\n",
"sum(exp(-s*t)*f/(t-z))/(2π*im)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.017439749335766603 + 0.01348535545015462im"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(φ(s*z)-φ(-s))/(z+1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" Therefore, \n",
"$$\n",
"\\check f(s) = -2 \\pi \\I \\lim_{z\\rightarrow \\infty} z {\\phi(s z) - \\phi(-s) \\over z+1} = \n",
"2 \\pi \\I \\phi(-s) = -\\E^{s} {\\rm Ei}(-s)\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"sum(exp(-s * t) * f) = 0.3613286168882254\n",
"(2π) * im * φ(-s) = 0.3613286168882283 + 0.0im\n",
"-(exp(s)) * ei(-s) = 0.3613286168882283\n"
]
}
],
"source": [
"@show sum(exp(-s*t)*f)\n",
"@show 2π*im*φ(-s)\n",
"@show -exp(s)*ei(-s);"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 1.0.2",
"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
}