{ "cells": [ { "cell_type": "code", "execution_count": 15, "metadata": { "scrolled": true }, "outputs": [], "source": [ "using Plots, ComplexPhasePortrait, ApproxFun, SingularIntegralEquations, OscillatoryIntegrals\n", "import ApproxFun: UnionDomain\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\\CC{{\\cal C}}\n", "\\def\\HH{{\\cal H}}\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", "$$\n", "\n", "Dr. Sheehan Olver\n", "<br>\n", "s.olver@imperial.ac.uk\n", "\n", "\n", "<br>\n", "Website: https://github.com/dlfivefifty/M3M6LectureNotes\n", "\n", "# Chapter 4: The Wiener–Hopf method\n", "\n", "The Wiener–Hopf method is an approach for solving integral equations of the form\n", "$$\n", "\\lambda u(x) + \\int_0^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor 0 \\leq x < \\infty.\n", "$$\n", "Here $f$ and $K$ are given functions, $\\lambda$ is a given constant, and we want to find $u$. The approach similarly extends to integro-differential equations of the form\n", "$$\n", "c_1 u''(x) + c_2 u'(x) + \\lambda u(x) + \\int_0^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor 0 \\leq x < \\infty.\n", "$$\n", "Here $c_1, c_2, \\lambda$ are given constants and again we want to find $u$.\n", "\n", "\n", "In this course, we will only consider $K(x) = \\E^{-\\gamma |x|}$, though the methodology translates to other choices of $K$. \n", "\n", "\n", "# Lecture 20: Integral equations on the real line\n", "\n", "Before discussing problems on the half line, we consider problems on the whole line:\n", "$$\n", "\\lambda u(x) + \\int_{-\\infty}^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor -\\infty < x < \\infty.\n", "$$\n", "Outline:\n", "\n", "1. Fourier transforms and convolutions\n", "2. Some simple examples\n", "\n", "## Fourier transforms and convolutions\n", "\n", "\n", "Recall the Fourier transform of a function (using $s$ so I don't get confused with $K$):\n", "$$\n", " {\\hat{K}}(s) = {\\cal F} K (s) = \\int_{-\\infty}^\\infty K(t) \\E^{-\\I s t} \\dt\n", "$$\n", "so that\n", "$$\n", "K(x) = {\\cal F}^{-1} \\hat K(x) = {1 \\over 2\\pi}\\int_{-\\infty}^\\infty \\hat K(s) \\E^{ \\I s x} \\D s\n", "$$\n", "What effect does translating a function have on it's Fourier transform? \n", "$$\n", "\\int_{-\\infty}^\\infty K(t+x_0) \\E^{-\\I s t} \\dt = \\int_{-\\infty}^\\infty K(\\tau) \\E^{-\\I s (\\tau - x_0)} \\dt = \\E^{\\I s x_0} \\hat K(s)\n", "$$\n", "\n", "We are interested in the Fourier transform of the _convolution_ term \n", "$$\n", "\\int_{-\\infty}^\\infty K(x-t)u(t) \\dt \n", "$$\n", "But we have\n", "$$\n", "\\int_{-\\infty}^\\infty \\E^{-\\I s x} \\int_{-\\infty}^\\infty K(x-t)u(t) \\dt \\dx = \\int_{-\\infty}^\\infty \\int_{-\\infty}^\\infty \\E^{-\\I s x} K(x-t)\\dx u(t) \\dt =\n", "\\int_{-\\infty}^\\infty \\E^{-\\I s t} \\hat K(s) u(t) \\dt = \\hat K(s) \\hat u(s)\n", "$$\n", "That is, convolution becomes multiplication. Thus our integral equation in Fourier space becomes:\n", "$$\n", "(\\lambda + \\hat K(s)) \\hat u(s) = \\hat f(s) \\qqfor -\\infty < s < \\infty\n", "$$\n", "Or in other words,\n", "$$\n", "u(x) = {\\cal F}^{-1} \\left[{\\hat f \\over \\lambda + \\hat K }\\right](x)\n", "$$\n", "\n", "### Example: \n", "\n", "Consider the kernel $K(x) = \\E^{-\\gamma |x|}$. Then we have\n", "\\begin{align*}\n", "\\hat K(s) &= \\int_{-\\infty}^\\infty K(t) \\E^{-\\I s t} \\dt = \\int_{-\\infty}^0 \\E^{( \\gamma - \\I s ) t} \\dt + \\int_0^\\infty \\E^{(-\\gamma - \\I s ) t} = {1 \\over \\gamma - \\I s} - {1 \\over -\\gamma - \\I s } \\\\\n", "&= {2\\gamma \\over \\gamma^2 + s^2}\n", "\\end{align*}" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-3.553823901825126e-13 - 8.326672684688674e-17im" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "γ = 2.0\n", "Γ = ApproxFun.UnionDomain((-Inf .. 0) , (0 .. Inf)) # Line split in two\n", "K = Fun(x -> exp(-γ*abs(x)), Γ)\n", "K̂ = s -> fourier(K, -s) # magic routine for Fourier transforms\n", "K̂(2.0) - 2γ/(γ^2+2.0^2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Consider a simple RHS like\n", "$$\n", "f(x) = {1 \\over x^2 + a^2}\n", "$$\n", "Because of the decay, we can use Residue calculus to determine, for $s < 0$ deforming to the upper half plane,\n", "$$\n", "\\hat f(s) = \\int_{-\\infty}^\\infty {\\E^{-\\I s t} \\over t^2 + a^2}\\dt = 2 \\pi \\I \\Res_{z = a \\I}{\\E^{-\\I s z} \\over z^2 + a^2} = \\pi {\\E^{s a} \\over a}\n", "$$\n", "and for $s > 0$ deforming to the lower half plane\n", "$$\n", "\\hat f(s) =-2 \\pi \\I \\Res_{z =- a \\I}{\\E^{-\\I s z} \\over z^2 + a^2} = \\pi {\\E^{-s a} \\over a}\n", "$$\n", "and for $s = 0$ the results match:\n", "$$\n", "\\hat f(0) = {\\pi \\over a}\n", "$$\n", "\n", "**Remark** The Fourier transform of smooth functions that exponentially decay are smooth functions that exponentially decay. When we only have algebraic decay, that indicates that the Fourier transform is smooth apart from at $0$. " ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "9.594547378810603e-13" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = 2.0\n", "f = Fun(x -> 1/(x^2 + a^2), Γ)\n", "f̂ = s -> fourier(f, -s)\n", "f̂(0) - π/a" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.5959455978986625e-16 + 0.0im" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f̂(2.0) - (π*exp(-2.0*a)/a)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.5959455978986625e-16 + 0.0im" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f̂(-2.0) - (π*exp(-2.0*a)/a)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So we can now solve the integral equation\n", "$$\n", "\\lambda u(x) + \\int_{-\\infty}^\\infty K(x-t)u(t) \\dt = f(x)\\qqfor -\\infty < x < \\infty.\n", "$$\n", "by\n", "converting to Fourier space\n", "$$\n", "(\\lambda + \\hat K(s)) \\hat u(s) = \\hat f(s)\\qqfor -\\infty < x < \\infty.\n", "$$\n", "to get\n", "$$\n", "\\hat u(s) = {\\pi \\over a} { \\E^{-a |s|} (\\gamma^2+s^2) \\over \\lambda (\\gamma^2+s^2) + 2\\gamma} \n", "$$\n", "Therefore, $u(x)$ is the inverse Fourier transform of this. We calculate it numerically first:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 2400 1600\">\n", "<defs>\n", " <clipPath id=\"clip5200\">\n", " <rect x=\"0\" y=\"0\" width=\"2000\" height=\"2000\"/>\n", " </clipPath>\n", "</defs>\n", "<defs>\n", " <clipPath id=\"clip5201\">\n", " <rect x=\"0\" y=\"0\" width=\"2400\" height=\"1600\"/>\n", " </clipPath>\n", "</defs>\n", "<polygon clip-path=\"url(#clip5201)\" points=\"\n", "0,1600 2400,1600 2400,0 0,0 \n", " \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n", "<defs>\n", " <clipPath id=\"clip5202\">\n", " <rect x=\"480\" y=\"0\" width=\"1681\" height=\"1600\"/>\n", " </clipPath>\n", "</defs>\n", "<polygon clip-path=\"url(#clip5201)\" points=\"\n", "188.156,1503.47 2321.26,1503.47 2321.26,47.2441 188.156,47.2441 \n", " \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n", "<defs>\n", " <clipPath id=\"clip5203\">\n", " <rect x=\"188\" y=\"47\" width=\"2134\" height=\"1457\"/>\n", " </clipPath>\n", "</defs>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 248.527,1503.47 248.527,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 751.618,1503.47 751.618,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 1254.71,1503.47 1254.71,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 1757.8,1503.47 1757.8,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 2260.89,1503.47 2260.89,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,1462.26 2321.26,1462.26 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,1252.65 2321.26,1252.65 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,1043.04 2321.26,1043.04 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,833.428 2321.26,833.428 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,623.818 2321.26,623.818 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,414.207 2321.26,414.207 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n", " 188.156,204.596 2321.26,204.596 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,1503.47 2321.26,1503.47 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,1503.47 188.156,47.2441 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 248.527,1503.47 248.527,1481.63 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 751.618,1503.47 751.618,1481.63 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 1254.71,1503.47 1254.71,1481.63 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 1757.8,1503.47 1757.8,1481.63 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 2260.89,1503.47 2260.89,1481.63 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,1462.26 220.153,1462.26 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,1252.65 220.153,1252.65 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,1043.04 220.153,1043.04 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,833.428 220.153,833.428 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,623.818 220.153,623.818 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,414.207 220.153,414.207 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 188.156,204.596 220.153,204.596 \n", " \"/>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 248.527, 1557.47)\" x=\"248.527\" y=\"1557.47\">-10</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 751.618, 1557.47)\" x=\"751.618\" y=\"1557.47\">-5</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1254.71, 1557.47)\" x=\"1254.71\" y=\"1557.47\">0</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1757.8, 1557.47)\" x=\"1757.8\" y=\"1557.47\">5</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 2260.89, 1557.47)\" x=\"2260.89\" y=\"1557.47\">10</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 1479.76)\" x=\"164.156\" y=\"1479.76\">0.00</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 1270.15)\" x=\"164.156\" y=\"1270.15\">0.02</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 1060.54)\" x=\"164.156\" y=\"1060.54\">0.04</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 850.928)\" x=\"164.156\" y=\"850.928\">0.06</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 641.318)\" x=\"164.156\" y=\"641.318\">0.08</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 431.707)\" x=\"164.156\" y=\"431.707\">0.10</text>\n", "</g>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 164.156, 222.096)\" x=\"164.156\" y=\"222.096\">0.12</text>\n", "</g>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 248.527,1412.23 258.589,1411.26 268.651,1410.26 278.713,1409.23 288.774,1408.18 298.836,1407.09 308.898,1405.97 318.96,1404.81 329.022,1403.62 339.084,1402.4 \n", " 349.145,1401.13 359.207,1399.83 369.269,1398.48 379.331,1397.1 389.393,1395.66 399.454,1394.18 409.516,1392.65 419.578,1391.07 429.64,1389.44 439.702,1387.75 \n", " 449.763,1386.01 459.825,1384.2 469.887,1382.33 479.949,1380.39 490.011,1378.39 500.072,1376.31 510.134,1374.15 520.196,1371.92 530.258,1369.6 540.32,1367.19 \n", " 550.381,1364.7 560.443,1362.1 570.505,1359.41 580.567,1356.6 590.629,1353.69 600.691,1350.66 610.752,1347.5 620.814,1344.21 630.876,1340.78 640.938,1337.21 \n", " 651,1333.49 661.061,1329.6 671.123,1325.54 681.185,1321.3 691.247,1316.87 701.309,1312.24 711.37,1307.39 721.432,1302.32 731.494,1297 741.556,1291.43 \n", " 751.618,1285.59 761.679,1279.46 771.741,1273.02 781.803,1266.26 791.865,1259.15 801.927,1251.67 811.989,1243.8 822.05,1235.5 832.112,1226.76 842.174,1217.54 \n", " 852.236,1207.81 862.298,1197.52 872.359,1186.65 882.421,1175.15 892.483,1162.98 902.545,1150.08 912.607,1136.41 922.668,1121.91 932.73,1106.51 942.792,1090.15 \n", " 952.854,1072.75 962.916,1054.25 972.977,1034.57 983.039,1013.61 993.101,991.28 1003.16,967.498 1013.22,942.164 1023.29,915.181 1033.35,886.455 1043.41,855.896 \n", " 1053.47,823.425 1063.53,788.977 1073.6,752.508 1083.66,714.006 1093.72,673.5 1103.78,631.073 1113.84,586.872 1123.9,541.125 1133.97,494.156 1144.03,446.394 \n", " 1154.09,398.386 1164.15,350.799 1174.21,304.418 1184.28,260.13 1194.34,218.901 1204.4,181.739 1214.46,149.645 1224.52,123.555 1234.58,104.279 1244.65,92.4476 \n", " 1254.71,88.4582 1264.77,92.4476 1274.83,104.279 1284.89,123.555 1294.96,149.645 1305.02,181.739 1315.08,218.901 1325.14,260.13 1335.2,304.418 1345.26,350.799 \n", " 1355.33,398.386 1365.39,446.394 1375.45,494.156 1385.51,541.125 1395.57,586.872 1405.64,631.073 1415.7,673.5 1425.76,714.006 1435.82,752.508 1445.88,788.977 \n", " 1455.94,823.425 1466.01,855.896 1476.07,886.455 1486.13,915.181 1496.19,942.164 1506.25,967.498 1516.32,991.28 1526.38,1013.61 1536.44,1034.57 1546.5,1054.25 \n", " 1556.56,1072.75 1566.62,1090.15 1576.69,1106.51 1586.75,1121.91 1596.81,1136.41 1606.87,1150.08 1616.93,1162.98 1627,1175.15 1637.06,1186.65 1647.12,1197.52 \n", " 1657.18,1207.81 1667.24,1217.54 1677.3,1226.76 1687.37,1235.5 1697.43,1243.8 1707.49,1251.67 1717.55,1259.15 1727.61,1266.26 1737.67,1273.02 1747.74,1279.46 \n", " 1757.8,1285.59 1767.86,1291.43 1777.92,1297 1787.98,1302.32 1798.05,1307.39 1808.11,1312.24 1818.17,1316.87 1828.23,1321.3 1838.29,1325.54 1848.35,1329.6 \n", " 1858.42,1333.49 1868.48,1337.21 1878.54,1340.78 1888.6,1344.21 1898.66,1347.5 1908.73,1350.66 1918.79,1353.69 1928.85,1356.6 1938.91,1359.41 1948.97,1362.1 \n", " 1959.03,1364.7 1969.1,1367.19 1979.16,1369.6 1989.22,1371.92 1999.28,1374.15 2009.34,1376.31 2019.41,1378.39 2029.47,1380.39 2039.53,1382.33 2049.59,1384.2 \n", " 2059.65,1386.01 2069.71,1387.75 2079.78,1389.44 2089.84,1391.07 2099.9,1392.65 2109.96,1394.18 2120.02,1395.66 2130.09,1397.1 2140.15,1398.48 2150.21,1399.83 \n", " 2160.27,1401.13 2170.33,1402.4 2180.39,1403.62 2190.46,1404.81 2200.52,1405.97 2210.58,1407.09 2220.64,1408.18 2230.7,1409.23 2240.77,1410.26 2250.83,1411.26 \n", " 2260.89,1412.23 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5203)\" style=\"stroke:#e26f46; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 248.527,1462.26 258.589,1462.26 268.651,1462.26 278.713,1462.26 288.774,1462.26 298.836,1462.26 308.898,1462.26 318.96,1462.26 329.022,1462.26 339.084,1462.26 \n", " 349.145,1462.26 359.207,1462.26 369.269,1462.26 379.331,1462.26 389.393,1462.26 399.454,1462.26 409.516,1462.26 419.578,1462.26 429.64,1462.26 439.702,1462.26 \n", " 449.763,1462.26 459.825,1462.26 469.887,1462.26 479.949,1462.26 490.011,1462.26 500.072,1462.26 510.134,1462.26 520.196,1462.26 530.258,1462.26 540.32,1462.26 \n", " 550.381,1462.26 560.443,1462.26 570.505,1462.26 580.567,1462.26 590.629,1462.26 600.691,1462.26 610.752,1462.26 620.814,1462.26 630.876,1462.26 640.938,1462.26 \n", " 651,1462.26 661.061,1462.26 671.123,1462.26 681.185,1462.26 691.247,1462.26 701.309,1462.26 711.37,1462.26 721.432,1462.26 731.494,1462.26 741.556,1462.26 \n", " 751.618,1462.26 761.679,1462.26 771.741,1462.26 781.803,1462.26 791.865,1462.26 801.927,1462.26 811.989,1462.26 822.05,1462.26 832.112,1462.26 842.174,1462.26 \n", " 852.236,1462.26 862.298,1462.26 872.359,1462.26 882.421,1462.26 892.483,1462.26 902.545,1462.26 912.607,1462.26 922.668,1462.26 932.73,1462.26 942.792,1462.26 \n", " 952.854,1462.26 962.916,1462.26 972.977,1462.26 983.039,1462.26 993.101,1462.26 1003.16,1462.26 1013.22,1462.26 1023.29,1462.26 1033.35,1462.26 1043.41,1462.26 \n", " 1053.47,1462.26 1063.53,1462.26 1073.6,1462.26 1083.66,1462.26 1093.72,1462.26 1103.78,1462.26 1113.84,1462.26 1123.9,1462.26 1133.97,1462.26 1144.03,1462.26 \n", " 1154.09,1462.26 1164.15,1462.26 1174.21,1462.26 1184.28,1462.26 1194.34,1462.26 1204.4,1462.26 1214.46,1462.26 1224.52,1462.26 1234.58,1462.26 1244.65,1462.26 \n", " 1254.71,1462.26 1264.77,1462.26 1274.83,1462.26 1284.89,1462.26 1294.96,1462.26 1305.02,1462.26 1315.08,1462.26 1325.14,1462.26 1335.2,1462.26 1345.26,1462.26 \n", " 1355.33,1462.26 1365.39,1462.26 1375.45,1462.26 1385.51,1462.26 1395.57,1462.26 1405.64,1462.26 1415.7,1462.26 1425.76,1462.26 1435.82,1462.26 1445.88,1462.26 \n", " 1455.94,1462.26 1466.01,1462.26 1476.07,1462.26 1486.13,1462.26 1496.19,1462.26 1506.25,1462.26 1516.32,1462.26 1526.38,1462.26 1536.44,1462.26 1546.5,1462.26 \n", " 1556.56,1462.26 1566.62,1462.26 1576.69,1462.26 1586.75,1462.26 1596.81,1462.26 1606.87,1462.26 1616.93,1462.26 1627,1462.26 1637.06,1462.26 1647.12,1462.26 \n", " 1657.18,1462.26 1667.24,1462.26 1677.3,1462.26 1687.37,1462.26 1697.43,1462.26 1707.49,1462.26 1717.55,1462.26 1727.61,1462.26 1737.67,1462.26 1747.74,1462.26 \n", " 1757.8,1462.26 1767.86,1462.26 1777.92,1462.26 1787.98,1462.26 1798.05,1462.26 1808.11,1462.26 1818.17,1462.26 1828.23,1462.26 1838.29,1462.26 1848.35,1462.26 \n", " 1858.42,1462.26 1868.48,1462.26 1878.54,1462.26 1888.6,1462.26 1898.66,1462.26 1908.73,1462.26 1918.79,1462.26 1928.85,1462.26 1938.91,1462.26 1948.97,1462.26 \n", " 1959.03,1462.26 1969.1,1462.26 1979.16,1462.26 1989.22,1462.26 1999.28,1462.26 2009.34,1462.26 2019.41,1462.26 2029.47,1462.26 2039.53,1462.26 2049.59,1462.26 \n", " 2059.65,1462.26 2069.71,1462.26 2079.78,1462.26 2089.84,1462.26 2099.9,1462.26 2109.96,1462.26 2120.02,1462.26 2130.09,1462.26 2140.15,1462.26 2150.21,1462.26 \n", " 2160.27,1462.26 2170.33,1462.26 2180.39,1462.26 2190.46,1462.26 2200.52,1462.26 2210.58,1462.26 2220.64,1462.26 2230.7,1462.26 2240.77,1462.26 2250.83,1462.26 \n", " 2260.89,1462.26 \n", " \"/>\n", "<polygon clip-path=\"url(#clip5201)\" points=\"\n", "1958.43,312.204 2249.26,312.204 2249.26,130.764 1958.43,130.764 \n", " \" fill=\"#ffffff\" fill-opacity=\"1\"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 1958.43,312.204 2249.26,312.204 2249.26,130.764 1958.43,130.764 1958.43,312.204 \n", " \"/>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#009af9; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 1982.43,191.244 2126.43,191.244 \n", " \"/>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:start;\" transform=\"rotate(0, 2150.43, 208.744)\" x=\"2150.43\" y=\"208.744\">y1</text>\n", "</g>\n", "<polyline clip-path=\"url(#clip5201)\" style=\"stroke:#e26f46; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n", " 1982.43,251.724 2126.43,251.724 \n", " \"/>\n", "<g clip-path=\"url(#clip5201)\">\n", "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:start;\" transform=\"rotate(0, 2150.43, 269.224)\" x=\"2150.43\" y=\"269.224\">y2</text>\n", "</g>\n", "</svg>\n" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "λ = 1.0\n", "û = π/a*Fun(s -> exp(-a*abs(s))*(γ^2 + s^2)/(λ*(γ^2 + s^2) + 2γ), Γ)\n", "\n", "u = Fun(x -> fourier(û, x), Γ)/(2π)\n", "\n", "plot(-10.0:0.1:10.0, u)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.894040480010517e-13 + 6.805472279452433e-19im" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "λ*u(0.0) + sum(u*K) - f(0.0)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.3935020632137594e-12 + 1.5832361733373612e-15im" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x =2.0\n", "\n", "λ*u(x) + sum(Fun(t -> K(x-t)*u(t), UnionDomain(-Inf .. x, x .. Inf))) - f(x)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Working out the analytic formula for this example takes a lot more work and involves other special functions, and is outside the scope of the course." ] } ], "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 }