(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 76156, 2430]*) (*NotebookOutlinePosition[ 76864, 2455]*) (* CellTagsIndexPosition[ 76820, 2451]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Series Solution Examples", "Title", TextAlignment->Center, TextJustification->0, Background->RGBColor[0, 1, 0]], Cell["\<\ This notebook is by Steven Amgott. Please send any questions or comments to \ samgott1@swarthmore.edu. Feel free to use and distribute this notebook, but \ keep this author information in any copy you use or distribute.\ \>", "SmallText"], Cell[TextData[{ "In any input cell containing ", StyleBox["xxx", FontColor->RGBColor[1, 0, 1]], " , you must replace it with your input before evaluating the cell. In \ general, anything in ", StyleBox["magenta", FontColor->RGBColor[1, 0, 1]], " is something you can, and possibly should, change (in particular if you \ wish to do a different example)." }], "Text"], Cell[CellGroupData[{ Cell["\<\ Initialization (Can be skipped, if you answer \"Yes\" to the initialization \ request.)\ \>", "Section"], Cell["\<\ The cell in this section is an initialization cell, and will be automatically \ evaluated if you answer \"Yes\" to the initialization request. If you do not \ answer \"Yes\" to this request, you must evaluate it before creating the \ graphs in the second section below.\ \>", "Text"], Cell[BoxData[ \(Needs["\"]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[TextData[{ "Eliminating some unnecessary warning messages. ", StyleBox["(Should be skipped)", FontColor->RGBColor[1, 0, 1]] }], "Subsubsection"], Cell[BoxData[{ \(\(Off[General::"\"];\)\), "\n", \(\(Off[General::"\"];\)\)}], "Input", InitializationCell->True] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["A first example (which you can easily modify)", "Section"], Cell[CellGroupData[{ Cell["The equation and the recurrence relation", "Subsection"], Cell["Here we try to solve the differential equation", "Text"], Cell[TextData[{ "(2 + ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]]], ") y\" - x y' + 4 y = 0." }], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`0\ is\ an\ ordinary\ point\ for\ this\ equation, \ so\ we\ assume\ a\ solution\ of\ the\ form\)], "Text"], Cell[BoxData[ \(TextForm\`y \((x)\) = \[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) \(\(x\^n\)\(.\)\)\)], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`The\ differential\ equation\ gives\ us\)], "Text"], Cell[BoxData[ \(TextForm\`\((2 + x\^2)\) \(\[Sum]\+\(n = 2\)\%\[Infinity] n \((n - 1)\) \(a\_n\) x\^\(n - 2\)\) - x \(\[Sum]\+\(n = 1\)\%\[Infinity] n\ \(a\_n\) x\^\(n - 1\)\) + 4\ \(\[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) x\^n\) = 0\)], "Text", TextAlignment->Center], Cell["which (after index shifts) reduces to", "Text"], Cell[BoxData[ \(TextForm\`\[Sum]\+\(n = 0\)\%\[Infinity]\((2 \((n + 2)\) \((n + 1)\) a\_\(n + 2\) + n \((n - 1)\) a\_n - n\ a\_n + 4\ a\_n)\) x\^n = 0. \)], "Text", TextAlignment->Center], Cell["The recurrence relation is then", "Text"], Cell[BoxData[ \(TextForm\`2 \((n + 2)\) \((n + 1)\) a\_\(n + 2\) + n \((n - 1)\) a\_n - n\ a\_n + 4\ a\_n = 0. \)], "Text", TextAlignment->Center], Cell["or equivalently", "Text"], Cell[BoxData[ \(TextForm\`\(\(\ \)\(a\_\(n + 2\) = \(\(-\((n\^2 - 2 n + 4)\)\)\/\(2 \((n + 2)\) \((n + 1)\)\)\) \(\(a\_n\)\(.\)\)\)\)\)], "Text", TextAlignment->Center], Cell[TextData[{ "We can generate as many coefficients as we wish. To get up to the \ coefficient of ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], StyleBox["k", FontSlant->"Plain"]], TraditionalForm]]], " (you can change k), use" }], "Text"], Cell[BoxData[{\(Clear[a, k, n, x]\), "\n", RowBox[{ RowBox[{"k", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(a[0] = a0;\), "\n", \(a[1] = a1;\), "\n", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ StyleBox[\(a[ n + 2] = \(\(-\((n\^2 - 2 n + 4)\)\) a[n]\)\/\(2 \ \((n + 2)\) \((n + 1)\)\)\), FontColor->RGBColor[1, 0, 1]], ",", \({n, 0, k - 2}\)}], "]"}], ",", \(a[1]\)}], "]"}], ",", \(a[0]\)}], "]"}], ".", \(Table[x\^n, {n, 0, k}]\)}]}], "Input"], Cell["\<\ I don't think it will be too easy to get the general term in this example.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["An initial value problem with animated graphs", "Subsection"], Cell["\<\ Let's assume we have some initial conditions, say y(0) = -1 and y'(0) = 2. \ This tells us that a0 = -1 and a1=2. Once again we can generate polynomial \ approximations of any degree (within computational reason).\ \>", "Text"], Cell[BoxData[{\(Clear[a, k, n, x]\), "\n", RowBox[{ RowBox[{"k", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[0]\), "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[1]\), "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ StyleBox[\(a[ n + 2] = \(\(-\((n\^2 - 2 n + 4)\)\) a[n]\)\/\(2 \ \((n + 2)\) \((n + 1)\)\)\), FontColor->RGBColor[1, 0, 1]], ",", \({n, 0, k - 2}\)}], "]"}], ",", \(a[1]\)}], "]"}], ",", \(a[0]\)}], "]"}], ".", \(Table[x\^n, {n, 0, k}]\)}]}], "Input"], Cell[TextData[{ "We can animate the graphs of polynomial approximations of increasing \ degree using the cell below. To see the animation, evaluate the cell, select \ the entire collection of output graphs by clicking on the bracket containing \ all of them, and choose ", StyleBox["Animate Selected Graphics", FontColor->RGBColor[0, 0, 1]], " from the ", StyleBox["Cell", FontColor->RGBColor[0, 0, 1]], " menu item. You can control the speed and direction of the animation \ using the VCR-like controls at the lower left corner of the notebook window." }], "Text"], Cell[TextData[{ StyleBox["m", FontColor->RGBColor[1, 0, 1]], " is the maximal degree polynomial to be plotted, ", StyleBox["a[0]", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["a[1]", FontColor->RGBColor[1, 0, 1]], " come from the initial conditions, ", StyleBox["xmin", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["xmax", FontColor->RGBColor[1, 0, 1]], " are the bounds on the x-axis, and ", StyleBox["ymin", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["ymax", FontColor->RGBColor[1, 0, 1]], " are the bounds on the y-axis. A numerical solution is generated and \ graphed in black, while the polynomial approximation is graphed in ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], "." }], "Text"], Cell[BoxData[{\(Clear[a, k, x, y, n, m, xmin, xmax, ymin, ymax, solution, solPlot]\), "\n", RowBox[{ RowBox[{"m", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[0]\), "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[1]\), "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-3\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["3", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"solution", " ", "=", " ", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ StyleBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"2", "+", FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], "TraditionalForm"]}], ")"}], " ", \(\(y''\)[x]\)}], " ", "-", " ", \(x\ \(y'\)[x]\), " ", "+", " ", \(4\ y[x]\)}], "==", " ", "0"}], FontColor->RGBColor[1, 0, 1]], ",", RowBox[{ RowBox[{"y", "[", StyleBox["0", FontColor->RGBColor[1, 0, 1]], "]"}], "\[Equal]", \(a[0]\)}], ",", RowBox[{ RowBox[{\(y'\), "[", StyleBox["0", FontColor->RGBColor[1, 0, 1]], "]"}], "\[Equal]", \(a[1]\)}]}], "}"}], ",", "y", ",", \({x, xmin, xmax}\)}], "]"}]}], ";", \(solPlot = Plot[Evaluate[y[x]\ /. \ solution], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, DisplayFunction \[Rule] Identity]\), ";"}], "\n", RowBox[{ RowBox[{"Animate", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{"solPlot", ",", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Prepend", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ StyleBox[\(a[ n + 2] = \(\(-\((n\^2 - 2 n + 4)\)\) \ a[n]\)\/\(2 \((n + 2)\) \((n + 1)\)\)\), FontColor->RGBColor[1, 0, 1]], ",", \({n, 0, k - 2}\)}], "]"}], ",", \(a[1]\)}], "]"}], ",", \(a[0]\)}], "]"}], ".", \(Table[x\^n, {n, 0, k}]\)}], ",", \({x, xmin, xmax}\), ",", \(PlotRange \[Rule] {ymin, ymax}\), ",", \(PlotStyle \[Rule] {RGBColor[1, 0, 0]}\), ",", \(DisplayFunction \[Rule] Identity\)}], "]"}], ",", \(PlotLabel \[Rule] "\" <> ToString[k]\), ",", \(DisplayFunction \[Rule] $DisplayFunction\)}], "]"}], ",", \({k, 1, m, 1}\)}], "]"}], ";"}]}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Legendre's equation", "Section"], Cell[CellGroupData[{ Cell["The equation and the recurrence relation", "Subsection"], Cell["\<\ Legendre's equation is the second order differential equation\ \>", "Text"], Cell[TextData[{ "(1 - ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]]], ") y\" - 2 x y' + p (p+1) y = 0." }], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`0\ is\ an\ ordinary\ point\ for\ this\ equation, \ so\ we\ assume\ a\ solution\ of\ the\ form\)], "Text"], Cell[BoxData[ \(TextForm\`y \((x)\) = \[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) \(\(x\^n\)\(.\)\)\)], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`The\ differential\ equation\ gives\ us\)], "Text"], Cell[BoxData[ \(TextForm\`\((1 - x\^2)\) \(\[Sum]\+\(n = 2\)\%\[Infinity] n \((n - 1)\) \(a\_n\) x\^\(n - 2\)\) - 2 x \(\[Sum]\+\(n = 1\)\%\[Infinity] n\ \(a\_n\) x\^\(n - 1\)\) + p \((p + 1)\)\ \(\[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) x\^n\) = 0\)], "Text", TextAlignment->Center], Cell["which (after index shifts) reduces to", "Text"], Cell[BoxData[ \(TextForm\`\[Sum]\+\(n = 0\)\%\[Infinity]\((\((n + 2)\) \((n + 1)\) a\_\(n + 2\) - n \((n - 1)\) a\_n - 2 n\ a\_n + p \((p + 1)\)\ a\_n)\) x\^n = 0. \)], "Text", TextAlignment->Center], Cell["The recurrence relation is then", "Text"], Cell[BoxData[ \(TextForm\`\((n + 2)\) \((n + 1)\) a\_\(n + 2\) - n \((n - 1)\) a\_n - 2 n\ a\_n + p \((p + 1)\)\ a\_n = 0. \)], "Text", TextAlignment->Center], Cell["or equivalently", "Text"], Cell[BoxData[ \(TextForm\`\(\(\ \)\(a\_\(n + 2\) = \(\(\(-\((p - n)\)\) \((p + n + 1)\)\)\/\(\((n + 2)\) \((n + 1)\)\)\) \(\(a\_n\)\(.\)\)\)\)\)], "Text", TextAlignment->Center], Cell[TextData[{ "We can generate as many coefficients as we wish. To get up to the \ coefficient of ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], StyleBox["k", FontSlant->"Plain"]], TraditionalForm]]], " (you can change k), use" }], "Text"], Cell[BoxData[{\(Clear[p, a, k, n, x]\), "\n", RowBox[{ RowBox[{"k", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(a[0] = a0;\), "\n", \(a[1] = a1;\), "\n", \(Prepend[ Prepend[Table[ a[n + 2] = \(\(-\((p - n)\)\) \((p + n + 1)\) a[n]\)\/\(\((n + 2)\ \) \((n + 1)\)\), {n, 0, k - 2}], a[1]], a[0]] . Table[x\^n, {n, 0, k}]\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Polynomial solutions and series solutions with animated graphs\ \>", "Subsection"], Cell[TextData[{ "We can get two linearly independent solutions by setting y(0)=a[0]=", StyleBox["1", FontColor->RGBColor[1, 0, 1]], " and y'(0)=a[1]=", StyleBox["0", FontColor->RGBColor[1, 0, 1]], " for one solution and y(0)=a[0]=", StyleBox["0", FontColor->RGBColor[1, 0, 1]], " and y'(0)=a[1]=", StyleBox["1", FontColor->RGBColor[1, 0, 1]], " for another one. Notice that one of the two solutions we obtain this way \ is a terminating series (and therefore a polynomial) if ", StyleBox["p", FontColor->RGBColor[1, 0, 1]], " is a non-negative integer. For even ", StyleBox["p", FontColor->RGBColor[1, 0, 1]], " it is the first of these that terminates, while for odd ", StyleBox["p", FontColor->RGBColor[1, 0, 1]], " it is the second. Such solutions are called the Legendre polynomials \ (once they have been scaled by multiplying by a constant for reasons you may, \ or may not, see later). You can obtain them by varying ", StyleBox["p", FontColor->RGBColor[1, 0, 1]], ", ", StyleBox["a[0]", FontColor->RGBColor[1, 0, 1]], ", and ", StyleBox["a[1]", FontColor->RGBColor[1, 0, 1]], " in the cell below. The default values produce the second Legendre \ polynomial if we set a[0] = ", Cell[BoxData[ FormBox[ StyleBox[\(-\(1\/2\)\), FontColor->RGBColor[1, 0, 1]], TraditionalForm]]], " instead of 1. (Notice that although we set k = ", StyleBox["10", FontColor->RGBColor[1, 0, 1]], ", only terms up to ", Cell[BoxData[ \(x\^2\)]], " appear because the series terminates.)" }], "Text"], Cell[BoxData[{\(Clear[p, a, k, n, x, xmin, xmax, solution]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"k", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[0]\), "=", StyleBox[\(-\(1\/2\)\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[1]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(solution = Prepend[Prepend[ Table[a[n + 2] = \(\(-\((p - n)\)\) \((p + n + 1)\) a[n]\)\/\(\((n + \ 2)\) \((n + 1)\)\), {n, 0, k - 2}], a[1]], a[0]] . Table[x\^n, {n, 0, k}]\), "\n", \(Plot[ solution, {x, xmin, xmax}];\)}], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], ", of course, has the Legendre polynomials as built-in functions, so you \ can compare with the cell above and see what the value of a[0] needs to be to \ get the actual Legendre polynomial ." }], "Text"], Cell[BoxData[ \(LegendreP[p, x]\)], "Input"], Cell[TextData[{ "We can animate the graphs of polynomial approximations of increasing \ degree using the cell below. This is more interesting if the solution is one \ corresponding to an infinite series rather than a polynomial (whose graph we \ can produce in the cell above anyway). To see the animation, evaluate the \ cell, select the entire collection of output graphs by clicking on the \ bracket containing all of them, and choose ", StyleBox["Animate Selected Graphics", FontColor->RGBColor[0, 0, 1]], " from the ", StyleBox["Cell", FontColor->RGBColor[0, 0, 1]], " menu item. You can control the speed and direction of the animation \ using the VCR-like controls at the lower left corner of the notebook window." }], "Text"], Cell[TextData[{ StyleBox["m", FontColor->RGBColor[1, 0, 1]], " is the maximal degree polynomial to be plotted, ", StyleBox["a[0]", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["a[1]", FontColor->RGBColor[1, 0, 1]], " come from the initial conditions, ", StyleBox["xmin", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["xmax", FontColor->RGBColor[1, 0, 1]], " are the bounds on the x-axis, and ", StyleBox["ymin", FontColor->RGBColor[1, 0, 1]], " and ", StyleBox["ymax", FontColor->RGBColor[1, 0, 1]], " are the bounds on the y-axis. A numerical solution is generated and \ graphed in black, while the polynomial approximation is graphed in ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], ". The default values produce the \"Legendre function of the second kind \ of order p = ", StyleBox["2", FontColor->RGBColor[1, 0, 1]], "\" (i.e. the infinite series solution) if we set a[1] =", StyleBox[" -2", FontColor->RGBColor[1, 0, 1]], " instead of 1." }], "Text"], Cell[BoxData[{\(Clear[p, a, k, x, y, n, m, xmin, xmax, ymin, ymax, solution, solPlot]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"m", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[0]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(a[1]\), "=", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"solution", " ", "=", " ", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ StyleBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], "TraditionalForm"]}], ")"}], " ", \(\(y''\)[x]\)}], " ", "-", " ", \(2 x\ \(y'\)[x]\), " ", "+", " ", \(p \((p + 1)\)\ y[x]\)}], "==", " ", "0"}], FontColor->RGBColor[1, 0, 1]], ",", \(y[0] \[Equal] a[0]\), ",", \(\(y'\)[0] \[Equal] a[1]\)}], "}"}], ",", "y", ",", \({x, xmin, xmax}\)}], "]"}]}], ";", \(solPlot = Plot[Evaluate[y[x]\ /. \ solution], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, DisplayFunction \[Rule] Identity]\), ";"}], "\n", \(Animate[ Show[solPlot, Plot[Prepend[ Prepend[ Table[a[ n + 2] = \(\(-\((p - n)\)\) \((p + n + 1)\) \ a[n]\)\/\(\((n + 2)\) \((n + 1)\)\), {n, 0, k - 2}], a[1]], a[0]] . Table[x\^n, {n, 0, k}], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] {RGBColor[1, 0, 0]}, DisplayFunction \[Rule] Identity], PlotLabel \[Rule] "\" <> ToString[k], DisplayFunction \[Rule] $DisplayFunction], {k, 1, m, 1}];\)}], "Input"], Cell[TextData[{ "Once again, ", StyleBox["Mathematica", FontSlant->"Italic"], " has solutions of this type as built-in functions. We chose a[1]=", StyleBox["-2", FontColor->RGBColor[1, 0, 1]], " in the cell above to make them match for p = ", StyleBox["2", FontColor->RGBColor[1, 0, 1]], ". The next cell compares the solution graph we got to the graph of ", StyleBox["LegendreQ[p,x]", FontColor->RGBColor[1, 0, 0]], ". The first graph is that of the function LegendreQ[p,x] and the second \ overlays the solution plot from the previous cell on top of it. Make sure \ that cell was evaluated before evaluating this one." }], "Text"], Cell[BoxData[{ \(Clear[x, legendrePlot]\), "\n", \(\(legendrePlot = Plot[LegendreQ[p, x], {x, xmin, xmax}, PlotStyle \[Rule] RGBColor[0, 1, 0], PlotRange \[Rule] {ymin, ymax}];\)\), "\n", \(\(Show[solPlot, legendrePlot, DisplayFunction \[Rule] $DisplayFunction];\)\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Bessel's equation", "Section"], Cell["Bessel's equation is the second order differential equation", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]]], " y\" + x y' + (", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], TraditionalForm]]], " - ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], TraditionalForm]]], ") y = 0." }], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`We\ will\ assume\ p\ is\ positive . \ \ 0\ is\ a\ regular\ \ singular\ point\ for\ this\ equation, \ so\ we\ assume\ a\ solution\ of\ the\ form\)], "Text"], Cell[BoxData[ \(TextForm\`y \((x)\) = \[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) \(\(x\^\(n + r\)\)\(.\)\)\)], "Text", TextAlignment->Center, TextJustification->0], Cell[BoxData[ \(TextForm\`The\ differential\ equation\ gives\ us\)], "Text"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{\(\(x\^2\) \(\[Sum]\+\(n = 0\)\%\[Infinity]\((n + r)\) \((n + r - 1)\) \(a\_n\) x\^\(n + r - 2\)\)\), "+", \(x \(\[Sum]\+\(n = 1\)\%\[Infinity]\((n + r)\)\ \(a\_n\) x\^\(n + r - 1\)\)\), "+", RowBox[{ RowBox[{"(", RowBox[{ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], "2"], "TraditionalForm"], "-", FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], "TraditionalForm"]}], ")"}], \(\[Sum]\+\(n = 0\)\%\[Infinity]\( a\_n\) x\^\(n + r\)\)}]}], "=", "0"}], TextForm]], "Text", TextAlignment->Center], Cell["which (after index shifts) becomes", "Text"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{\(r \((r - 1)\)\), "+", "r", "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_0\)}], "+", RowBox[{ RowBox[{"(", RowBox[{\(\((r + 1)\) r\), "+", "r", "+", "1", "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_1\)}], "+", RowBox[{\(\[Sum]\+\(n = 2\)\%\[Infinity]\), RowBox[{ RowBox[{"(", RowBox[{\(\((n + r)\) \((n + r - 1)\) a\_n\), "+", \(\((n + r)\) a\_n\), "+", " ", \(a\_\(n - 2\)\), "-", RowBox[{ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], \(a\_n\)}]}], ")"}], \(x\^\(n + r\)\)}]}]}], "=", "0."}], TextForm]], "Text",\ TextAlignment->Center], Cell["Simplifying a bit we get", "Text"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ SuperscriptBox[ StyleBox["r", FontSlant->"Plain"], "2"], "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_0\), " ", \(x\^r\)}], "+", RowBox[{ RowBox[{"(", RowBox[{\(\((r + 1)\)\^2\), "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_1\), \(x\^\(1 + r\)\)}], "+", RowBox[{\(\[Sum]\+\(n = 2\)\%\[Infinity]\), RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{\(\((n + r)\)\^2\), "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_n\)}], "+", " ", \(a\_\(n - 2\)\)}], ")"}], \(x\^\(n + r\)\)}]}]}], "=", "0."}], TextForm]], "Text", TextAlignment->Center], Cell["The indicial equation is", "Text"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox[ StyleBox["r", FontSlant->"Plain"], "2"], "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], "=", "0."}], TextForm]], "Text", TextAlignment->Center], Cell["so r = p or r = -p.", "Text"], Cell[TextData[{ "We also know that the term (", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ StyleBox["r", FontSlant->"Plain"], "+", "1"}], ")"}], "2"], TraditionalForm]]], "-", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], TraditionalForm]]], ") ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "1"], TraditionalForm]]], " has to be zero. If p \[NotEqual] ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], " or r = p, then ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "1"], TraditionalForm]]], " has to be zero. If p = ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], " and r = -", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], ", then we have a free choice of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "1"], TraditionalForm]]], ", which we can set equal to zero." }], "Text"], Cell["The recurrence relation is", "Text"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{\(\((n + r)\)\^2\), "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}], ")"}], \(a\_n\)}], "+", " ", \(a\_\(n - 2\)\)}], "=", "0."}], TextForm]], "Text", TextAlignment->Center], Cell["or equivalently", "Text"], Cell[BoxData[ FormBox[ RowBox[{" ", RowBox[{\(a\_n\), "=", RowBox[{ FractionBox[\(-1\), RowBox[{\(\((n + r)\)\^2\), "-", SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"]}]], \(\(a\_\(n - 2\)\)\(.\)\)}]}]}], TextForm]], "Text",\ TextAlignment->Center], Cell[TextData[{ "as long as ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["r", FontSlant->"Plain"]}], ")"}], "2"], TraditionalForm]]], " - ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], TraditionalForm]]], " \[NotEqual] 0. The only time this can be zero is if r = -p and 0 = ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "-", StyleBox["p", FontSlant->"Plain"]}], ")"}], "2"], TraditionalForm]]], " - ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], TraditionalForm]]], " = ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["n", FontSlant->"Plain"], "2"], TraditionalForm]]], " - 2 n p = n (n - 2p). Since this is for n \[GreaterEqual] 2, we are fine \ unless 2p is an integer." }], "Text"], Cell[TextData[{ "In fact, we don't even have a problem if 2p is an odd integer. In this \ case with r = -p we only run into trouble finding ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], ". Since all of the odd coefficients up to that point will have to be 0 \ (since ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "1"], TraditionalForm]]], "= 0), we can simply set this one to be 0 as well, and the recurrence \ relation is still satisfied. As a result, all the odd coefficients will be \ 0, and the only problems will be when p is an integer." }], "Text"], Cell[TextData[{ "Corresponding to the larger root (r = p) we always get a solution to \ Bessel's equation. In this case ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["r", FontSlant->"Plain"]}], ")"}], "2"], TraditionalForm]]], " - ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["p", FontSlant->"Plain"], "2"], TraditionalForm]]], " simplifies to n(n + 2p), so the recurrence relation becomes" }], "Text"], Cell[BoxData[ \(TextForm\`\(\(\ \)\(a\_n = \(\(-1\)\/\(n \((n + 2 p)\)\)\) \(\(a\_\(n - 2\)\)\(.\)\)\)\)\)], "Text", TextAlignment->Center], Cell[TextData[{ "We can generate a few terms using ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[{\(Clear[p, a, a0, k, n, x]\), "\n", RowBox[{ RowBox[{"k", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(a[0] = a0;\), "\n", \(a[1] = 0;\), "\n", \(Prepend[ Prepend[Table[a[n] = \(-a[n - 2]\)\/\(n \((n + 2 p)\)\), {n, 2, k}], a[1]], a[0]] . Table[x\^\(n + p\), {n, 0, k}]\)}], "Input"], Cell[TextData[{ "What may not be so clear from this is a general formula for the integers \ that are at the beginning of each denominator. From the recurrence relation \ it is not too hard to see that in the coefficient of ", Cell[BoxData[ \(x\^\(2\ n + p\)\)]], " that integer is the product of the first n even integers. (This comes \ from the leading n in the denominator of our recurrence relation.) This, in \ turn, can be expressed as ", Cell[BoxData[ FormBox[ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], TraditionalForm]]], "n! by factoring out the 2s in the product of even integers. We can verify \ this using ", StyleBox["Mathematica", FontSlant->"Italic"], ". " }], "Text"], Cell[BoxData[{ \(Clear[n]\), "\n", \(Table[2\^n\ \(n!\), {n, 0, \[LeftFloor]k\/2\[RightFloor]}]\)}], "Input"], Cell["So a general term of the solution has the form", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{"(", RowBox[{"2", "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}], RowBox[{"(", RowBox[{"4", "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}]}], "..."}], RowBox[{"(", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}]}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell[TextData[{ "We can factor 2 out of each factor of the denominator that involves p (n \ such factors, producing a ", Cell[BoxData[ FormBox[ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], TraditionalForm]]], " we can combine with the one already in the denominator) to get" }], "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["2", RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{"(", RowBox[{"1", "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], RowBox[{"(", RowBox[{"2", "+", StyleBox["p", FontSlant->"Plain"]}], ")"}]}], "..."}], RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}]}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["Remember that for positive integers n and p we know that", "Text"], Cell["p!(1+p)(2+p)...(n+p) = (n+p)!. ", "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ We can use the same notation even if p is not an integer, in which case\ \>", "Text"], Cell[TextData[{ "(1+p)(2+p)...(n+p) = ", Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], "!"}], RowBox[{ StyleBox["p", FontSlant->"Plain"], "!"}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " actually knows this notation even for non-integers p, as you can see by \ the following example." }], "Text"], Cell[BoxData[{\(Clear[n, p, k]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox[\(1\/3\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"n", "=", StyleBox["5", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(N[\[Product]\+\(k = 1\)\%n\((k + p)\)]\), "\n", \(N[\(\((n + p)\)!\)\/\(p!\)]\)}], "Input"], Cell["\<\ (The definition of p! for non-integers p involves a function called the gamma \ function, denoted by \[CapitalGamma](x) and defined by\ \>", "Text"], Cell[TextData[{ "\[CapitalGamma](x) = ", Cell[BoxData[ FormBox[ RowBox[{\(\[Integral]\_0\%\[Infinity]\), RowBox[{ SuperscriptBox[ StyleBox["t", FontSlant->"Plain"], RowBox[{ StyleBox["x", FontSlant->"Plain"], "-", "1"}]], SuperscriptBox["\[ExponentialE]", RowBox[{"-", StyleBox["t", FontSlant->"Plain"]}]], RowBox[{"\[DifferentialD]", StyleBox["t", FontSlant->"Plain"]}]}]}], TraditionalForm]]] }], "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ for x > 0. This definition can be extended to all x except non-positive \ integers. It can be shown that \[CapitalGamma](p+1) = p! for positive \ integers, so we can use this to define p! for all p which are not negative \ integers.) \ \>", "Text"], Cell["After all this, we can rewrite the general term as", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]], RowBox[{ StyleBox["p", FontSlant->"Plain"], "!"}]}], RowBox[{ SuperscriptBox["2", RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], "!"}]}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell[TextData[{ "We can freely choose ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], TraditionalForm]]], "\[NotEqual]0. If we make ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], TraditionalForm]]], " = ", Cell[BoxData[ FormBox[ FractionBox["1", RowBox[{ SuperscriptBox["2", StyleBox["p", FontSlant->"Plain"]], RowBox[{ StyleBox["p", FontSlant->"Plain"], "!"}]}]], TraditionalForm]]], ", we can rewrite this as" }], "Text"], Cell[TextData[Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[\((\(-1\))\), StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ SuperscriptBox["2", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], StyleBox["+", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]}]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], "!"}]}]], TraditionalForm]]]], "Text", TextAlignment->Center, TextJustification->0], Cell["and finally as", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[\((\(-1\))\), StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ RowBox[{"(", FractionBox[ StyleBox["x", FontSlant->"Plain"], "2"], ")"}], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], "!"}]}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ This means we have as one solution of Bessel's equation the function\ \>", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) = ", Cell[BoxData[ FormBox[ RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{ StyleBox["n", FontSlant->"Plain"], "=", "0"}], "\[Infinity]"], FractionBox[ RowBox[{ SuperscriptBox[\((\(-1\))\), StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ RowBox[{"(", FractionBox[ StyleBox["x", FontSlant->"Plain"], "2"], ")"}], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{ RowBox[{"(", RowBox[{ StyleBox["n", FontSlant->"Plain"], "+", StyleBox["p", FontSlant->"Plain"]}], ")"}], "!"}]}]]}], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ This function is called the Bessel function of the first kind of order p.\ \>", "Text"], Cell["\<\ We are still faced with finding a second linearly independent solution. We \ know from our solution method (method of Frobenius) that all the above work \ will go through toward finding a second solution as long as the roots of the \ indicial equation (which were p and -p) do not differ by an integer. It \ turns out that there are two different cases to consider.\ \>", "Text"], Cell[CellGroupData[{ Cell["p is not an integer", "Subsection"], Cell[TextData[{ "We can animate the convergence of the series to ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) using the cells below. For each graph we keep terms up to ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", FractionBox[ StyleBox["x", FontSlant->"Plain"], "2"], ")"}], RowBox[{\(2 k\), "+", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], ". Notice that ", StyleBox["Mathematica", FontSlant->"Italic"], " refers to the Bessel function of the first kind of order p by ", StyleBox["BesselJ[p,x]", FontColor->RGBColor[1, 0, 0]], ". The graphs of the approximating partial sums are in ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], " and the graph of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) is in ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], "." }], "Text"], Cell[BoxData[{\(Clear[p, k, x, y, n, m, xmin, xmax, ymin, ymax, solPlot1]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox[ FractionBox[ StyleBox["1", FontColor->RGBColor[1, 0, 1]], "2"], FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"m", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-2\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["2", FontColor->RGBColor[1, 0, 1]]}], ";", \(solPlot1 = Plot[BesselJ[p, x], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] RGBColor[0, 0, 1], DisplayFunction \[Rule] Identity]\), ";"}], "\n", \(Animate[ Show[solPlot1, Plot[\[Sum]\+\(n = 0\)\%k\(\(\((\(-1\))\)\^n\) \((x\/2)\)\^\((2 n \ + p)\)\)\/\(\(n!\) \(\((n + p)\)!\)\), {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] {RGBColor[1, 0, 0]}, DisplayFunction \[Rule] Identity], PlotLabel \[Rule] ToString[2 k + p] <> "\< is the highest power\>", DisplayFunction \[Rule] $DisplayFunction], {k, 1, m, 1}];\)}], "Input"], Cell[TextData[{ "In this situation everything we did in the section above goes through for \ the smaller root (r = -p), and so ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) is a second linearly independent solution. Notice that the initial \ term of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) is ", Cell[BoxData[ \(TraditionalForm\`1\/\(\((\(-p\))\)!\)\)]], Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", FractionBox[ StyleBox["x", FontSlant->"Plain"], "2"], ")"}], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], ", which is unbounded at 0, so ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) and ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) are clearly independent. Here's the animation for the convergence to \ the second solution. Make sure the cell above has been evaluated during the \ current ", StyleBox["Mathematica", FontSlant->"Italic"], " session before evaluating this one. The graphs of the approximating \ partial sums are in ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], " and the graph of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) is in ", StyleBox["green", FontColor->RGBColor[0, 1, 0]], "." }], "Text"], Cell[BoxData[{\(Clear[r, k, x, y, n, m, solPlot2]\), "\n", \(r = \(-p\);\), "\n", RowBox[{ RowBox[{"m", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(solPlot2 = Plot[BesselJ[r, x], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] RGBColor[0, 1, 0], DisplayFunction \[Rule] Identity];\), "\n", \(Animate[ Show[solPlot2, Plot[\[Sum]\+\(n = 0\)\%k\(\(\((\(-1\))\)\^n\) \((x\/2)\)\^\((2 n \ + r)\)\)\/\(\(n!\) \(\((n + r)\)!\)\), {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] {RGBColor[1, 0, 0]}, DisplayFunction \[Rule] Identity], PlotLabel \[Rule] ToString[2 k + r] <> "\< is the highest power\>", DisplayFunction \[Rule] $DisplayFunction], {k, 1, m, 1}];\)}], "Input"], Cell["\<\ Provided the two input cells above have been evaluated, we can plot the two \ solutions together on the same set of axes.\ \>", "Text"], Cell[BoxData[ \(\(Show[solPlot1, solPlot2, DisplayFunction \[Rule] $DisplayFunction];\)\)], "Input"], Cell[TextData[{ "By the way, a (possibly different) second linearly independent solution \ for Bessel's equation of order p (instead of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x)) is the Bessel function of the second kind of order p denoted by ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x). ", StyleBox["Mathematica", FontSlant->"Italic"], " uses ", StyleBox["BesselY[p,x]", FontColor->RGBColor[1, 0, 0]], " for this function. When p is not an integer, ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) = ", Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ RowBox[{ RowBox[{ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], "TraditionalForm"], "(", "x", ")"}], " ", RowBox[{"cos", "(", RowBox[{ StyleBox["p", FontSlant->"Plain"], " ", "\[Pi]"}], ")"}]}], "-", " ", RowBox[{ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], "TraditionalForm"], \((x)\)}]}], RowBox[{"sin", "(", RowBox[{ StyleBox["p", FontSlant->"Plain"], " ", "\[Pi]"}], ")"}]], TraditionalForm]]], " (strange, but there are reasons for this). Notice that if p is an odd \ multiple of ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], " then ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) = \[PlusMinus] ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x). We can see the equality using the cell below. The first graph is ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x), the second is ", Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ RowBox[{ RowBox[{ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], "TraditionalForm"], "(", "x", ")"}], " ", RowBox[{"cos", "(", RowBox[{ StyleBox["p", FontSlant->"Plain"], " ", "\[Pi]"}], ")"}]}], "-", " ", RowBox[{ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], "TraditionalForm"], \((x)\)}]}], RowBox[{"sin", "(", RowBox[{ StyleBox["p", FontSlant->"Plain"], " ", "\[Pi]"}], ")"}]], TraditionalForm]]], ", and the third is the overlay of the two." }], "Text"], Cell[BoxData[{\(Clear[p]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox[\(1\/2\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(Show[Plot[BesselY[p, x], {x, xmin, xmax}], Plot[\(BesselJ[p, x] Cos[p\ \[Pi]] - BesselJ[\(-p\), x]\)\/Sin[p\ \ \[Pi]], {x, xmin, xmax}]];\)}], "Input"], Cell[TextData[{ "One last interesting note. When p = ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], ", our general term" }], "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["p", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], RowBox[{"(", RowBox[{"2", "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}], RowBox[{"(", RowBox[{"4", "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}]}], "..."}], RowBox[{"(", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", RowBox[{"2", StyleBox["p", FontSlant->"Plain"]}]}], ")"}]}]], TraditionalForm]]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["with which we began our manipulations is", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox[ FractionBox[ StyleBox["1", FontSlant->"Plain"], "2"], FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], \((3)\), \((5)\)}], "..."}], RowBox[{"(", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", "1"}], ")"}]}]], TraditionalForm]]], "," }], "Text", TextAlignment->Center, TextJustification->0], Cell["which can be rewritten as ", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)], FractionBox[ RowBox[{ SuperscriptBox[\((\(-1\))\), StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", StyleBox["1", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "+", "1"}], ")"}], "!"}]]}], TraditionalForm]]], "," }], "Text", TextAlignment->Center, TextJustification->0], Cell["and therefore the series is that of", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)]}], TraditionalForm]]], " sin(x)." }], "Text", TextAlignment->Center, TextJustification->0], Cell[TextData[{ "If we choose ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], TraditionalForm]]], " = ", Cell[BoxData[ \(TraditionalForm\`\@\(2\/\[Pi]\)\)]], " we get ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], \(1\/2\)], TraditionalForm]]], "(x)." }], "Text"], Cell[TextData[{ "When p = -", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], ", our general term is" }], "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], "(", \(-1\), ")"}], StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "-", StyleBox[ FractionBox[ StyleBox["1", FontSlant->"Plain"], "2"], FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["2", StyleBox["n", FontSlant->"Plain"]], RowBox[{ StyleBox["n", FontSlant->"Plain"], "!"}], \((1)\), \((3)\)}], "..."}], RowBox[{"(", RowBox[{ RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], "-", "1"}], ")"}]}]], TraditionalForm]]], "," }], "Text", TextAlignment->Center, TextJustification->0], Cell["which can be rewritten as ", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)], FractionBox[ RowBox[{ SuperscriptBox[\((\(-1\))\), StyleBox["n", FontSlant->"Plain"]], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}]]}], RowBox[{ RowBox[{"(", RowBox[{"2", StyleBox["n", FontSlant->"Plain"]}], ")"}], "!"}]]}], TraditionalForm]]], "," }], "Text", TextAlignment->Center, TextJustification->0], Cell["and therefore the series is that of", "Text"], Cell[TextData[{ Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)]}], TraditionalForm]]], " cos(x)." }], "Text", TextAlignment->Center, TextJustification->0], Cell[TextData[{ "Again if we choose ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["a", FontSlant->"Plain"], "0"], TraditionalForm]]], " = ", Cell[BoxData[ \(TraditionalForm\`\@\(2\/\[Pi]\)\)]], " we get ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], \(-\(1\/2\)\)], TraditionalForm]]], "(x)." }], "Text"], Cell[TextData[{ "(In fact, for large values of x any Bessel function (not just order ", Cell[BoxData[ \(TraditionalForm\`1\/2\)]], ") has limiting behavior like some linear combination of ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)], TraditionalForm]]], " sin(x) and ", Cell[BoxData[ FormBox[ SuperscriptBox[ StyleBox["x", FontSlant->"Plain"], \(-\(1\/2\)\)], TraditionalForm]]], " cos(x). We will not investigate this here.)" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["p is an integer", "Subsection"], Cell[TextData[{ "Once again corresponding to the larger root (r = p) we have one solution \ ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x). We can animate the convergence of the series to ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) using the cells below. For each graph we keep terms up to ", Cell[BoxData[ FormBox[ SuperscriptBox[ RowBox[{"(", FractionBox[ StyleBox["x", FontSlant->"Plain"], "2"], ")"}], RowBox[{\(2 k\), "+", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], ". The graphs of the approximating partial sums are in ", StyleBox["red", FontColor->RGBColor[1, 0, 0]], " and the graph of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) is in ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], "." }], "Text"], Cell[BoxData[{\(Clear[p, k, x, y, n, m, xmin, xmax, ymin, ymax, solPlot1]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"m", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";", \(solPlot1 = Plot[BesselJ[p, x], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] RGBColor[0, 0, 1], DisplayFunction \[Rule] Identity]\), ";"}], "\n", \(Animate[ Show[solPlot1, Plot[\[Sum]\+\(n = 0\)\%k\(\(\((\(-1\))\)\^n\) \((x\/2)\)\^\((2 n \ + p)\)\)\/\(\(n!\) \(\((n + p)\)!\)\), {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] {RGBColor[1, 0, 0]}, DisplayFunction \[Rule] Identity], PlotLabel \[Rule] ToString[2 k + p] <> "\< is the highest power\>", DisplayFunction \[Rule] $DisplayFunction], {k, 1, m, 1}];\)}], "Input"], Cell[TextData[{ "Unfortunately, when p is an integer ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) turns out to be ", Cell[BoxData[ FormBox[ SuperscriptBox[\((\(-1\))\), StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x), and so does not give us a second solution. We can see this \ relationship using the cell below. The first graph is that of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x), the second is of ", Cell[BoxData[ FormBox[ SuperscriptBox[\((\(-1\))\), StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x), and the third is the overlay of the two." }], "Text"], Cell[BoxData[{\(Clear[p, xmin, xmax, ymin, ymax]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(Show[Plot[BesselJ[\(-p\), x], {x, xmin, xmax}], Plot[\(\((\(-1\))\)\^p\) BesselJ[p, x], {x, xmin, xmax}]];\)}], "Input"], Cell[TextData[{ "(Actually, from our work above it is not even clear that we can define ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], RowBox[{"-", StyleBox["p", FontSlant->"Plain"]}]], TraditionalForm]]], "(x) by using the series we created, as the (n-p)! in the denominator is \ not defined for n < p. It turns out that this does not really pose a problem \ as the gamma function approaches either -\[Infinity] or \[Infinity] using one \ sided limits near non-positive integers, and so the reciprocal approaches 0 \ there. It doesn't matter for our purposes - we still do not get a second \ linearly independent solution this way.)" }], "Text"], Cell[TextData[{ "A second linearly independent solution can be found in several different \ ways, but we will not do any of them here. ", StyleBox["Mathematica", FontSlant->"Italic"], " does know a second linearly independent solution, a Bessel function of \ the second kind of order p, again called ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x). The cell below draws the graphs of ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["J", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) (in ", StyleBox["blue", FontColor->RGBColor[0, 0, 1]], ") and ", Cell[BoxData[ FormBox[ SubscriptBox[ StyleBox["Y", FontSlant->"Plain"], StyleBox["p", FontSlant->"Plain"]], TraditionalForm]]], "(x) (in ", StyleBox["green", FontColor->RGBColor[0, 1, 0]], ")." }], "Text"], Cell[BoxData[{\(Clear[p, xmin, xmax, ymin, ymax, solPlot1, solPlot2]\), "\n", RowBox[{ RowBox[{"p", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmin", "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"xmax", "=", StyleBox["10", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymin", "=", StyleBox[\(-1\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{"ymax", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", \(solPlot1 = Plot[BesselJ[p, x], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] RGBColor[0, 0, 1], DisplayFunction \[Rule] Identity];\), "\n", \(solPlot2 = Plot[BesselY[p, x], {x, xmin, xmax}, PlotRange \[Rule] {ymin, ymax}, PlotStyle \[Rule] RGBColor[0, 1, 0], DisplayFunction \[Rule] Identity];\), "\n", \(Show[solPlot1, solPlot2, DisplayFunction \[Rule] $DisplayFunction];\)}], "Input"] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 720}}, AutoGeneratedPackage->None, WindowToolbars->"EditBar", WindowSize->{605, 648}, WindowMargins->{{0, Automatic}, {Automatic, 0}} ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 123, 3, 121, "Title"], Cell[1865, 56, 250, 4, 44, "SmallText"], Cell[2118, 62, 384, 10, 71, "Text"], Cell[CellGroupData[{ Cell[2527, 76, 115, 3, 74, "Section"], Cell[2645, 81, 294, 5, 71, "Text"], Cell[2942, 88, 93, 2, 30, "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[3060, 94, 158, 4, 43, "Subsubsection"], Cell[3221, 100, 141, 3, 50, "Input", InitializationCell->True] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[3411, 109, 64, 0, 33, "Section"], Cell[CellGroupData[{ Cell[3500, 113, 62, 0, 47, "Subsection"], Cell[3565, 115, 62, 0, 33, "Text"], Cell[3630, 117, 254, 10, 33, "Text"], Cell[3887, 129, 140, 2, 31, "Text"], Cell[4030, 133, 175, 4, 53, "Text"], Cell[4208, 139, 80, 1, 31, "Text"], Cell[4291, 142, 307, 5, 53, "Text"], Cell[4601, 149, 53, 0, 33, "Text"], Cell[4657, 151, 221, 4, 53, "Text"], Cell[4881, 157, 47, 0, 33, "Text"], Cell[4931, 159, 161, 3, 31, "Text"], Cell[5095, 164, 31, 0, 33, "Text"], Cell[5129, 166, 213, 4, 51, "Text"], Cell[5345, 172, 337, 11, 33, "Text"], Cell[5685, 185, 749, 19, 151, "Input"], Cell[6437, 206, 98, 2, 33, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[6572, 213, 67, 0, 31, "Subsection"], Cell[6642, 215, 239, 4, 52, "Text"], Cell[6884, 221, 945, 26, 151, "Input"], Cell[7832, 249, 585, 12, 90, "Text"], Cell[8420, 263, 776, 26, 71, "Text"], Cell[9199, 291, 3825, 94, 458, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[13073, 391, 38, 0, 33, "Section"], Cell[CellGroupData[{ Cell[13136, 395, 62, 0, 47, "Subsection"], Cell[13201, 397, 85, 2, 33, "Text"], Cell[13289, 401, 262, 10, 33, "Text"], Cell[13554, 413, 140, 2, 31, "Text"], Cell[13697, 417, 175, 4, 53, "Text"], Cell[13875, 423, 80, 1, 31, "Text"], Cell[13958, 426, 329, 6, 53, "Text"], Cell[14290, 434, 53, 0, 33, "Text"], Cell[14346, 436, 238, 4, 53, "Text"], Cell[14587, 442, 47, 0, 33, "Text"], Cell[14637, 444, 174, 3, 31, "Text"], Cell[14814, 449, 31, 0, 33, "Text"], Cell[14848, 451, 221, 4, 49, "Text"], Cell[15072, 457, 337, 11, 33, "Text"], Cell[15412, 470, 420, 9, 147, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[15869, 484, 92, 2, 31, "Subsection"], Cell[15964, 488, 1617, 47, 169, "Text"], Cell[17584, 537, 1090, 30, 261, "Input"], Cell[18677, 569, 274, 6, 52, "Text"], Cell[18954, 577, 48, 1, 30, "Input"], Cell[19005, 580, 754, 14, 128, "Text"], Cell[19762, 596, 1048, 33, 109, "Text"], Cell[20813, 631, 2849, 73, 474, "Input"], Cell[23665, 706, 670, 16, 90, "Text"], Cell[24338, 724, 332, 7, 90, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[24719, 737, 36, 0, 33, "Section"], Cell[24758, 739, 75, 0, 33, "Text"], Cell[24836, 741, 533, 21, 33, "Text"], Cell[25372, 764, 190, 3, 31, "Text"], Cell[25565, 769, 183, 4, 53, "Text"], Cell[25751, 775, 80, 1, 31, "Text"], Cell[25834, 778, 893, 22, 53, "Text"], Cell[26730, 802, 50, 0, 33, "Text"], Cell[26783, 804, 1102, 29, 73, "Text"], Cell[27888, 835, 40, 0, 33, "Text"], Cell[27931, 837, 1222, 33, 53, "Text"], Cell[29156, 872, 40, 0, 33, "Text"], Cell[29199, 874, 310, 10, 32, "Text"], Cell[29512, 886, 35, 0, 33, "Text"], Cell[29550, 888, 1180, 44, 58, "Text"], Cell[30733, 934, 42, 0, 33, "Text"], Cell[30778, 936, 382, 11, 33, "Text"], Cell[31163, 949, 31, 0, 33, "Text"], Cell[31197, 951, 391, 12, 50, "Text"], Cell[31591, 965, 1208, 41, 52, "Text"], Cell[32802, 1008, 807, 21, 90, "Text"], Cell[33612, 1031, 620, 19, 52, "Text"], Cell[34235, 1052, 165, 3, 50, "Text"], Cell[34403, 1057, 125, 5, 33, "Text"], Cell[34531, 1064, 377, 7, 146, "Input"], Cell[34911, 1073, 762, 19, 109, "Text"], Cell[35676, 1094, 118, 2, 63, "Input"], Cell[35797, 1098, 62, 0, 33, "Text"], Cell[35862, 1100, 1681, 51, 43, "Text"], Cell[37546, 1153, 340, 9, 52, "Text"], Cell[37889, 1164, 1567, 48, 43, "Text"], Cell[39459, 1214, 72, 0, 33, "Text"], Cell[39534, 1216, 97, 2, 33, "Text"], Cell[39634, 1220, 95, 2, 33, "Text"], Cell[39732, 1224, 498, 18, 38, "Text"], Cell[40233, 1244, 181, 5, 33, "Text"], Cell[40417, 1251, 392, 10, 162, "Input"], Cell[40812, 1263, 158, 3, 52, "Text"], Cell[40973, 1268, 682, 21, 33, "Text"], Cell[41658, 1291, 261, 5, 52, "Text"], Cell[41922, 1298, 66, 0, 33, "Text"], Cell[41991, 1300, 1319, 43, 43, "Text"], Cell[43313, 1345, 688, 25, 38, "Text"], Cell[44004, 1372, 1172, 38, 43, "Text"], Cell[45179, 1412, 30, 0, 33, "Text"], Cell[45212, 1414, 1030, 34, 46, "Text"], Cell[46245, 1450, 92, 2, 33, "Text"], Cell[46340, 1454, 1459, 47, 46, "Text"], Cell[47802, 1503, 97, 2, 33, "Text"], Cell[47902, 1507, 391, 6, 90, "Text"], Cell[CellGroupData[{ Cell[48318, 1517, 41, 0, 47, "Subsection"], Cell[48362, 1519, 1247, 41, 74, "Text"], Cell[49612, 1562, 1612, 43, 336, "Input"], Cell[51227, 1607, 2191, 73, 114, "Text"], Cell[53421, 1682, 909, 19, 242, "Input"], Cell[54333, 1703, 145, 3, 52, "Text"], Cell[54481, 1708, 113, 2, 30, "Input"], Cell[54597, 1712, 4030, 127, 147, "Text"], Cell[58630, 1841, 325, 7, 120, "Input"], Cell[58958, 1850, 144, 5, 36, "Text"], Cell[59105, 1857, 1681, 51, 43, "Text"], Cell[60789, 1910, 56, 0, 33, "Text"], Cell[60848, 1912, 1329, 42, 52, "Text"], Cell[62180, 1956, 42, 0, 33, "Text"], Cell[62225, 1958, 1049, 34, 44, "Text"], Cell[63277, 1994, 51, 0, 33, "Text"], Cell[63331, 1996, 354, 13, 39, "Text"], Cell[63688, 2011, 416, 17, 51, "Text"], Cell[64107, 2030, 120, 5, 36, "Text"], Cell[64230, 2037, 1329, 42, 52, "Text"], Cell[65562, 2081, 42, 0, 33, "Text"], Cell[65607, 2083, 894, 30, 44, "Text"], Cell[66504, 2115, 51, 0, 33, "Text"], Cell[66558, 2117, 354, 13, 39, "Text"], Cell[66915, 2132, 427, 17, 51, "Text"], Cell[67345, 2151, 578, 17, 61, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[67960, 2173, 37, 0, 31, "Subsection"], Cell[68000, 2175, 1319, 44, 74, "Text"], Cell[69322, 2221, 1516, 40, 322, "Input"], Cell[70841, 2263, 1433, 49, 71, "Text"], Cell[72277, 2314, 810, 23, 170, "Input"], Cell[73090, 2339, 756, 16, 109, "Text"], Cell[73849, 2357, 1095, 37, 71, "Text"], Cell[74947, 2396, 1169, 29, 250, "Input"] }, Closed]] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)