(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 32172, 850] NotebookOptionsPosition[ 29230, 762] NotebookOutlinePosition[ 29631, 779] CellTagsIndexPosition[ 29588, 776] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Lecture 2", "Section", CellChangeTimes->{{3.4267972672469997`*^9, 3.426797271067*^9}}], Cell["\<\ Our goal here is to begin to learn to use Mathematica while at the same time \ use it to explore the concepts in the text. You are encouraged to confirm \ the Mathematica results and the mechanical issue of running the program, \ entering the commands, etc., i.e., run your own session of Mathematica and \ enter these commands. Mathematica has pretty good built-in Help and you are \ strngly encouraged to use it to look-up definitions of functions, find new \ functions, etc. The key stroke instructing Mathematica to perform a command \ (or evaluate an expression) is the combination shift-enter. The command to \ open a text line to annotate your work is Alt-7.\ \>", "Text", CellChangeTimes->{{3.4267972806210003`*^9, 3.426797396898*^9}, { 3.4267974956870003`*^9, 3.426797523734*^9}, {3.4267976384449997`*^9, 3.426797685807*^9}, {3.426854897332791*^9, 3.426854945902791*^9}, { 3.4268550999527907`*^9, 3.426855190721791*^9}, {3.426859221321395*^9, 3.426859268314395*^9}}], Cell["\<\ From Eq. 2.5 we use the \"sum\" function in Mathematica to consider the \ (finite) sum \ \>", "Text", CellChangeTimes->{{3.4267244006844254`*^9, 3.426724465407426*^9}, { 3.426797430726*^9, 3.42679743451*^9}}], Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "4"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4267240864554253`*^9, 3.4267241190364256`*^9}, { 3.4267243202334256`*^9, 3.4267243206424255`*^9}}], Cell["Alternatively we can enter the same expression with", "Text", CellChangeTimes->{{3.426797455785*^9, 3.426797478118*^9}}], Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "4"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.4267240864554253`*^9, 3.4267241190364256`*^9}, { 3.4267243202334256`*^9, 3.4267243206424255`*^9}, {3.4267248024464254`*^9, 3.4267248029894257`*^9}}], Cell["\<\ Note the general feature that Mathematica always begins the names of \ pre-installed functions with capital letters, puts the arguments in square \ brackets, []'s, and uses curly brackets, {}'s, to define parameters for the \ function; here to sum over the index n from 1 to 4 (i.e., {n,4} = {n,1,4}). \ \ \>", "Text", CellChangeTimes->{{3.4267245307954254`*^9, 3.426724777782426*^9}, { 3.426797545715*^9, 3.426797549933*^9}, 3.4268549700877905`*^9, 3.4268552122287908`*^9}], Cell["\<\ Now define the infinite version (note how Mathematica likes to label the \ \"quantity\" infinity; it can also be entered with the symbol \[Infinity]). \ In defining a function we use the underscore, _, to label the arguments (on \ the left-hand-side) and the symbol \":=\" (and not just \"=\")\ \>", "Text", CellChangeTimes->{{3.4267244727664256`*^9, 3.426724511362426*^9}, { 3.4267248160954256`*^9, 3.4267249421874256`*^9}, {3.426797571174*^9, 3.426797622091*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"S", "[", "x_", "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "Infinity"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4267240864554253`*^9, 3.4267241190364256`*^9}, { 3.4267241654624257`*^9, 3.4267241972904253`*^9}, {3.426724327065426*^9, 3.4267243275614257`*^9}}], Cell["\<\ To ask Mathematica to perform the sum we simply type the name of the function \ (with no underscoring),\ \>", "Text", CellChangeTimes->{{3.4268550355777907`*^9, 3.426855076855791*^9}, { 3.426857458379791*^9, 3.426857488303791*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"S", "[", "x", "]"}]], "Input", CellChangeTimes->{{3.426724179940426*^9, 3.4267241828534255`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"-", "1"}], "+", FractionBox["1", RowBox[{"1", "-", "x"}]]}]], "Output", CellChangeTimes->{3.4269007968219814`*^9}] }, Open ]], Cell["\<\ This is a common result that Mathematica does not simplify automatically to \ the expected analytic expression. If you expect that simplification is \ possible, you can ask Mathematica to look for it. There is a handy shorthand \ if you want to perform an operation of the previous expression - just \ represent it by the % symbol.\ \>", "Text", CellChangeTimes->{{3.426797735375*^9, 3.426797847098*^9}, { 3.4268552634367905`*^9, 3.426855268770791*^9}, {3.426855306542791*^9, 3.4268553688637905`*^9}, {3.426859403311395*^9, 3.4268594249733953`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", "%", "]"}]], "Input", CellChangeTimes->{{3.4267243351334257`*^9, 3.4267243442404256`*^9}, { 3.426855300296791*^9, 3.426855302218791*^9}}], Cell[BoxData[ FractionBox["x", RowBox[{"1", "-", "x"}]]], "Output", CellChangeTimes->{3.4269008034699817`*^9}] }, Open ]], Cell["\<\ Given the current order in which the commands have been evaluated, this last \ command is the same as\ \>", "Text", CellChangeTimes->{{3.4268553812947907`*^9, 3.426855410341791*^9}, 3.4268603610983953`*^9}], Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{"S", "[", "x", "]"}], "]"}]], "Input", CellChangeTimes->{{3.426855414609791*^9, 3.4268554249337907`*^9}}], Cell["\<\ This the result of Eq.(2.10). For comparison we can also evaluate the sum \ starting with 1, the power zero, as in Eq.(2.9), the so-called geometric \ series\ \>", "Text", CellChangeTimes->{{3.4268554824347906`*^9, 3.426855548168791*^9}, { 3.4268555991107907`*^9, 3.4268556073217907`*^9}, {3.426857499744791*^9, 3.4268575131987906`*^9}, {3.426860373206395*^9, 3.4268603864143953`*^9}}], Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "4"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.426855555461791*^9, 3.426855583444791*^9}, { 3.426855759042791*^9, 3.4268558001047907`*^9}}], Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.426855555461791*^9, 3.426855583444791*^9}, { 3.426855759042791*^9, 3.4268557762697906`*^9}}], Cell["\<\ An essential strength of the Mathematica software is the ability to \ analytically perform this infinite summation for a general variable x, as \ here. On the other hand you have to be careful not to be misled by the \ result. In particular, for |x| < 1 the infinite series defines the function \ indicated. However, while the functions is well defined for |x| > 1, the \ infinite series itself is divergent. We can study the issue of convergence \ by looking at the behavior of the finite (truncated) series and then the \ remainder. First define the finite series as a function of both x and N.\ \>", "Text", CellChangeTimes->{{3.426797924576*^9, 3.4267982190030003`*^9}, { 3.4268050663190002`*^9, 3.4268051729700003`*^9}, {3.426805353571*^9, 3.426805382942*^9}, {3.426855807977791*^9, 3.4268558152577906`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"SN", "[", RowBox[{"N_", ",", "x_"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", "1", ",", "N"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4267240864554253`*^9, 3.4267241190364256`*^9}, { 3.4267241654624257`*^9, 3.4267241972904253`*^9}, {3.426724327065426*^9, 3.4267243275614257`*^9}, {3.4268054050690002`*^9, 3.4268054186*^9}, 3.426805450738*^9}], Cell[BoxData[ RowBox[{"SN", "[", RowBox[{"4", ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.426805431554*^9, 3.426805440455*^9}}], Cell["\<\ So let's use our plotting ability to check the behavior of this function as a \ function of N for fixed values of x, e.g., x = 0.5. \ \>", "Text", CellChangeTimes->{{3.426805554428*^9, 3.426805627745*^9}, {3.426805669598*^9, 3.426805671016*^9}, {3.426805784486*^9, 3.426805790266*^9}, { 3.42680583901*^9, 3.426805858664*^9}, {3.426855865964791*^9, 3.4268558807957907`*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.4268065723710003`*^9, 3.4268065785699997`*^9}}], Cell["Let's clean this up a bit and provide labels.", "Text", CellChangeTimes->{{3.426806657969*^9, 3.42680667823*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "SN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}}], Cell["\<\ It clearly converges by N around 15. Now lets try a few values of x.\ \>", "Text", CellChangeTimes->{{3.426806513866*^9, 3.426806532558*^9}, {3.426806693317*^9, 3.426806740416*^9}, {3.426807075255*^9, 3.426807118159*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "0.3"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.7"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.9"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "SN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.4268067600629997`*^9, 3.426806850896*^9}}], Cell["\<\ Clearly both the number the series converges to varies with x and the actual \ converge properties vary with the x value, but the details are difficult to \ see in this plot. To clean up the plot we extend the limits and the axes.\ \>", "Text", CellChangeTimes->{{3.426806889601*^9, 3.4268070422869997`*^9}, { 3.426855941876791*^9, 3.426855973034791*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "0.3"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.7"}], "]"}], ",", RowBox[{"SN", "[", RowBox[{"N", ",", "0.9"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "50"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "10"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "SN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.4268067600629997`*^9, 3.4268068771949997`*^9}}], Cell["However, note that", "Text", CellChangeTimes->{{3.426857569949791*^9, 3.426857579362791*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "1.1"}], "]"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "50"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "SN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.4268576135057907`*^9, 3.426857644379791*^9}}], Cell["\<\ So for |x| > 1 we see the finite sum diverging as N gets large. To focus on \ the question of convergence/divergence can look at the remainder of all the \ terms in the infinite series after the Nth term, RN = S - SN.\ \>", "Text", CellChangeTimes->{{3.426807367781*^9, 3.426807373507*^9}, {3.426807518418*^9, 3.426807533731*^9}, {3.426808228406*^9, 3.426808278733*^9}, { 3.426857657414791*^9, 3.4268577182057905`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"RN", "[", RowBox[{"N_", ",", "x_"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"x", "^", "n"}], ",", RowBox[{"{", RowBox[{"n", ",", RowBox[{"1", "+", "N"}], ",", "Infinity"}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.4267240864554253`*^9, 3.4267241190364256`*^9}, { 3.4267241654624257`*^9, 3.4267241972904253`*^9}, {3.426724327065426*^9, 3.4267243275614257`*^9}, {3.4268054050690002`*^9, 3.4268054186*^9}, 3.426805450738*^9, {3.426808316224*^9, 3.4268083300620003`*^9}}], Cell[BoxData[ RowBox[{"RN", "[", RowBox[{"N", ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.42680835395*^9, 3.426808379218*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "x"}], "]"}], "+", RowBox[{"RN", "[", RowBox[{"N", ",", "x"}], "]"}]}]], "Input", CellChangeTimes->{{3.4268083839560003`*^9, 3.4268084022860003`*^9}}], Cell["A bit messy so simplify.", "Text", CellChangeTimes->{{3.426808436757*^9, 3.42680844609*^9}}], Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{ RowBox[{"SN", "[", RowBox[{"N", ",", "x"}], "]"}], "+", RowBox[{"RN", "[", RowBox[{"N", ",", "x"}], "]"}]}], "]"}]], "Input", CellChangeTimes->{{3.4268083839560003`*^9, 3.426808424667*^9}}], Cell["\<\ The expected analytic result for the full sum. Consider the remainder \ numerically.\ \>", "Text", CellChangeTimes->{{3.426808454141*^9, 3.426808487521*^9}, { 3.4268560738407907`*^9, 3.4268560758687906`*^9}, {3.426856498227791*^9, 3.426856510534791*^9}}], Cell[BoxData[ RowBox[{"RN", "[", RowBox[{"50", ",", ".3"}], "]"}]], "Input", CellChangeTimes->{{3.426856350874791*^9, 3.426856359482791*^9}, { 3.426856406532791*^9, 3.426856406782791*^9}}], Cell["\<\ Mathematica has trouble recognizing the convergence but we can look for it \ graphically\ \>", "Text", CellChangeTimes->{{3.426856460134791*^9, 3.4268564864037905`*^9}, { 3.4268565219937906`*^9, 3.426856533601791*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"RN", "[", RowBox[{"N", ",", "0.3"}], "]"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "RN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.426808767477*^9, 3.426808775632*^9}, {3.426808813341*^9, 3.4268088443389997`*^9}, { 3.426808917013*^9, 3.4268089179440002`*^9}, {3.426856539747791*^9, 3.426856554640791*^9}}], Cell["\<\ Note again that Mathematica struggles to perform the sum numerically, but \ still suggests that the remainder shrinks with increasing N. Now consider \ the 4 x values used above\ \>", "Text", CellChangeTimes->{{3.426856100902791*^9, 3.426856178437791*^9}, { 3.426856566484791*^9, 3.426856567943791*^9}, {3.426857755256791*^9, 3.4268577818017907`*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"RN", "[", RowBox[{"N", ",", "0.3"}], "]"}], ",", RowBox[{"RN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"RN", "[", RowBox[{"N", ",", "0.7"}], "]"}], ",", RowBox[{"RN", "[", RowBox[{"N", ",", "0.9"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "50"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "RN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.4268067600629997`*^9, 3.4268068771949997`*^9}, {3.426808513742*^9, 3.4268085470290003`*^9}}], Cell["\<\ As expected all the remainders head to zero for N\[Rule]\[Infinity], although \ even on the current scale the remainder has only shrunk to about 0.05 at N = \ 50. Clearly this is not very satisfactory and is why, even with computers \ available, we also need the analytic tests for convergence discussed in \ Lecture 2.\ \>", "Text", CellChangeTimes->{{3.4268562186447906`*^9, 3.426856345162791*^9}, { 3.426856598135791*^9, 3.426856690659791*^9}}], Cell["What about the case x = 1 ", "Text", CellChangeTimes->{{3.426856949737791*^9, 3.4268569670197906`*^9}}], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"RN", "[", RowBox[{"N", ",", "1.0"}], "]"}], ",", RowBox[{"{", RowBox[{"N", ",", "1", ",", "20"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"N", ",", "RN"}], "}"}]}], ",", RowBox[{"AxesOrigin", "->", RowBox[{"{", RowBox[{"0", ",", "0"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.426805770351*^9, 3.426805809474*^9}, { 3.4268058617790003`*^9, 3.426805865926*^9}, {3.426805918955*^9, 3.426805993302*^9}, {3.426806179288*^9, 3.426806179585*^9}, { 3.426806464784*^9, 3.426806491918*^9}, {3.426808767477*^9, 3.426808775632*^9}, {3.426808813341*^9, 3.4268088443389997`*^9}, { 3.426808917013*^9, 3.4268089179440002`*^9}, {3.426856539747791*^9, 3.426856554640791*^9}, {3.426857037299791*^9, 3.426857039598791*^9}}], Cell["So in this case Mathematica knows that something is wrong.", "Text", CellChangeTimes->{{3.4268570495787907`*^9, 3.4268570882287908`*^9}}], Cell["\<\ Another way to look at is in terms of the limit, N \[Rule] \[Infinity] (where \ we expect a zero answer for convergence)\ \>", "Text", CellChangeTimes->{{3.426809810461*^9, 3.426809842821*^9}, { 3.426856721779791*^9, 3.4268567461917906`*^9}}], Cell[BoxData[ RowBox[{"Limit", "[", RowBox[{ RowBox[{"RN", "[", RowBox[{"N", ",", "0.5"}], "]"}], ",", RowBox[{"N", "\[Rule]", "\[Infinity]"}]}], "]"}]], "Input", CellChangeTimes->{{3.426809868343*^9, 3.4268099464630003`*^9}}], Cell["\<\ So Mathematica does not handle this well. On the other hand once we have \ \"summed\" the general sum\ \>", "Text", CellChangeTimes->{{3.426810019677*^9, 3.426810060203*^9}, { 3.4268567644727907`*^9, 3.4268567833027906`*^9}}], Cell[BoxData[ RowBox[{"RN", "[", RowBox[{"N", ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.426810073825*^9, 3.426810080907*^9}}], Cell["\<\ We can use this form to take the largeN limit for fixed x easily (note the \ substitution command /.x->value)\ \>", "Text", CellChangeTimes->{{3.426856804296791*^9, 3.426856888885791*^9}}], Cell[BoxData[ RowBox[{ FractionBox[ SuperscriptBox["x", RowBox[{"1", "+", "N"}]], RowBox[{ RowBox[{"-", "1"}], "+", "x"}]], "/.", RowBox[{"x", "\[Rule]", "0.9"}]}]], "Input", CellChangeTimes->{{3.426857875016791*^9, 3.426857882076791*^9}}], Cell["Take the limit", "Text", CellChangeTimes->{{3.426857894704791*^9, 3.4268578977717905`*^9}}], Cell[BoxData[ RowBox[{"Limit", "[", RowBox[{ RowBox[{ RowBox[{"-", FractionBox[ SuperscriptBox["x", RowBox[{"1", "+", "N"}]], RowBox[{ RowBox[{"-", "1"}], "+", "x"}]]}], "/.", RowBox[{"x", "\[Rule]", "0.9"}]}], ",", RowBox[{"N", "\[Rule]", "\[Infinity]"}]}], "]"}]], "Input", CellChangeTimes->{{3.426809868343*^9, 3.4268099464630003`*^9}, { 3.42681011862*^9, 3.4268101973789997`*^9}, {3.4268569070127907`*^9, 3.4268569101967907`*^9}}], Cell["So the series converges. At the boundary x = 1 we have", "Text", CellChangeTimes->{{3.426857106299791*^9, 3.426857126866791*^9}, { 3.426857916428791*^9, 3.4268579246867905`*^9}}], Cell[BoxData[ RowBox[{"Limit", "[", RowBox[{ RowBox[{ RowBox[{"-", FractionBox[ SuperscriptBox["x", RowBox[{"1", "+", "N"}]], RowBox[{ RowBox[{"-", "1"}], "+", "x"}]]}], "/.", RowBox[{"x", "\[Rule]", "1.0"}]}], ",", RowBox[{"N", "\[Rule]", "\[Infinity]"}]}], "]"}]], "Input", CellChangeTimes->{{3.426809868343*^9, 3.4268099464630003`*^9}, { 3.42681011862*^9, 3.4268101973789997`*^9}, {3.4268569070127907`*^9, 3.4268569101967907`*^9}, {3.426857137970791*^9, 3.426857140053791*^9}}], Cell["So this expression clearly diverges, and for x > 1", "Text", CellChangeTimes->{{3.426857151329791*^9, 3.426857169188791*^9}, { 3.4268572217687907`*^9, 3.426857228352791*^9}}], Cell[BoxData[ RowBox[{"Limit", "[", RowBox[{ RowBox[{ RowBox[{"-", FractionBox[ SuperscriptBox["x", RowBox[{"1", "+", "N"}]], RowBox[{ RowBox[{"-", "1"}], "+", "x"}]]}], "/.", RowBox[{"x", "\[Rule]", "1.1"}]}], ",", RowBox[{"N", "\[Rule]", "\[Infinity]"}]}], "]"}]], "Input", CellChangeTimes->{{3.426809868343*^9, 3.4268099464630003`*^9}, { 3.42681011862*^9, 3.4268101973789997`*^9}, {3.4268569070127907`*^9, 3.4268569101967907`*^9}, {3.4268571762527905`*^9, 3.426857178289791*^9}}], Cell["\<\ We can also see this behavior in the plot of the summed series S[x], i.e., \ the divergence as x approaches 1.\ \>", "Text", CellChangeTimes->{{3.4269009360029817`*^9, 3.4269009817599816`*^9}, { 3.4269011280369816`*^9, 3.426901161994982*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"S", "[", "x", "]"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"x", ",", "S"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.4269010022039814`*^9, 3.4269010786549816`*^9}, { 3.4269011784299817`*^9, 3.4269011801089816`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Sum", "::", "\<\"div\"\>"}], RowBox[{ ":", " "}], "\<\"Sum does not converge. \\!\\(\\*ButtonBox[\\\"\ \[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ ButtonData:>\\\"paclet:ref/message/Sum/div\\\", ButtonNote -> \ \\\"Sum::div\\\"]\\)\"\>"}]], "Message", "MSG", CellChangeTimes->{3.4269011843979816`*^9}], Cell[BoxData[ GraphicsBox[{{}, {}, {Hue[0.67, 0.6, 0.6], LineBox[CompressedData[" 1:eJwV1Gk41HsbB3BrRNaQQqFsHSRPhMr9P/ZkS6IokeUpkUObtULHQY6iLCmS rYOyb2n5WQ8msjPG8jczjDEyYxtFlsfz4r7uN5/r++K+7uurcNXf3ouLg4Mj Y3v+v3mfLUUnb7EQh55CE2ELR6mF/FJ+Gyz0YawpvHoTR4flA8nZiyykH4QJ 2q3i6FPyyDviNAuhmJmW6SUcTTwsNjbpZaGbP4SQ2AyOAlf2iIS0slCPQfGv HCqOeHwjSCWfWCjrc7P7sXEcqTk5BMi8ZSEh19R8275tr7GWuRjKQgJhUT/9 P2/7HA8f1QAW2vM8znupBkcp0p06rt4s1CscvnK7HEcfubM62u1YyCfKPijw 7bYnma5lKW3nYTjdMXHbRyeet+1ios0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73u99pIMJy+EfFjAuLVLAA wvbfBlidibn7iQtL+OYpx9tEgyMWfYd5q7kxLU/V4I5OGlgU9os+HOTGelZn +58RaeDVb3Lb/Ac3JqF0K16RSQOecdMVpM+DpYdG/IK90/Dg1uORu408WL5q 5nCI/zSwr5hK7JjkxSy+uOsYhUyDh9zIWt/OHdjMOaXEnX9OQ5yz4S9OrR2Y +oN3Fmnp06BzelLsUfgOrHygrqaqZRrIx7XrLOX4sC+RQ8nzMvTt/jAUtgng x9ykXy7UKNNBwJe3bSSDH+MsdrV+cJQOpdfHYicJ/JjJ8BSPsDkdJr75afsr 78QIR5Zv/RZIB09nwaUc6k5saFTU3ruNDjYTVWaPgwQxy8dexNu9dHieuvj5 VKEg9km/zjVqlA7OkvdOhI0KYlkpHjey5ukgv0XMzjfahV2zq35Ekp6B/ZuO T9mSQthak0uNzfUZOFnpbtZNEsZ8A0tPXb41A6OOB+jBUiLYuDxv843wGTjW o4KP2ItgjeHF3TGJM5BWOGc72CmCPT7OyWj8MAM7DG6YPfIWxWSL8mWPb/dC cwW5cSpYDEu4+CvbVIIBNRnSam6ZYhgHv52aw34GWGiF2zg1iWGTnqs6AdoM YK5Jr7YIi2Pv91vZFjkzQHk9vJRVJI7Jd2YNfPBkQBB7PiK9XxxLCmW7tN1k wCG/FiBuiGN3iZnXpiIZwCjnPLDXfjfm4JSR053BAPl/r3MQW3dj/wNSDhLk "]]}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesLabel->{ FormBox["x", TraditionalForm], FormBox["S", TraditionalForm]}, AxesOrigin->{0, 0}, PlotRange->{{-2, 2}, {-0.4999873071254797, 4.945159918266228}}, PlotRangeClipping->True, PlotRangePadding->{ Scaled[0.02], Scaled[0.02]}]], "Output", CellChangeTimes->{3.4269011139819813`*^9, 3.4269012166339817`*^9}] }, Open ]], Cell["\<\ So if we carefully evaluate the infinite series representing the remainder \ and takes its limit, N\[Rule]\[Infinity] , Mathematica will accurately tell \ us about the convergence properties of the series. On the other hand, we \ often have difficulty proceeding just numerically. The analytic analysis we \ have discussed in the Lecture is essentially for proceeding either by hand or \ via Mathematica. To make use of series, we need to understand when they make \ sense and when they do not via analytic methods.\ \>", "Text", CellChangeTimes->{{3.426857266296791*^9, 3.4268574078377905`*^9}, { 3.426857939923791*^9, 3.4268580841467905`*^9}, {3.4269008965969815`*^9, 3.4269008991819816`*^9}}] }, Open ]] }, WindowSize->{616, 561}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 93, 1, 71, "Section"], Cell[686, 26, 1000, 15, 137, "Text"], Cell[1689, 43, 221, 5, 29, "Text"], Cell[1913, 50, 275, 7, 31, "Input"], Cell[2191, 59, 127, 1, 29, "Text"], Cell[2321, 62, 338, 8, 31, "Input"], Cell[2662, 72, 493, 9, 65, "Text"], Cell[3158, 83, 482, 8, 65, "Text"], Cell[3643, 93, 390, 10, 31, "Input"], Cell[4036, 105, 244, 5, 29, "Text"], Cell[CellGroupData[{ Cell[4305, 114, 122, 2, 31, "Input"], Cell[4430, 118, 157, 5, 45, "Output"] }, Open ]], Cell[4602, 126, 567, 9, 83, "Text"], Cell[CellGroupData[{ Cell[5194, 139, 180, 3, 31, "Input"], Cell[5377, 144, 115, 3, 43, "Output"] }, Open ]], Cell[5507, 150, 221, 5, 29, "Text"], Cell[5731, 157, 157, 3, 31, "Input"], Cell[5891, 162, 402, 7, 47, "Text"], Cell[6296, 171, 279, 7, 31, "Input"], Cell[6578, 180, 289, 7, 31, "Input"], Cell[6870, 189, 834, 12, 119, "Text"], Cell[7707, 203, 487, 12, 31, "Input"], Cell[8197, 217, 138, 3, 31, "Input"], Cell[8338, 222, 392, 7, 47, "Text"], Cell[8733, 231, 484, 11, 31, "Input"], Cell[9220, 244, 120, 1, 29, "Text"], Cell[9343, 247, 725, 19, 52, "Input"], Cell[10071, 268, 236, 4, 29, "Text"], Cell[10310, 274, 1029, 28, 52, "Input"], Cell[11342, 304, 369, 6, 65, "Text"], Cell[11714, 312, 1035, 28, 52, "Input"], Cell[12752, 342, 100, 1, 29, "Text"], Cell[12855, 345, 777, 20, 52, "Input"], Cell[13635, 367, 436, 7, 65, "Text"], Cell[14074, 376, 566, 13, 31, "Input"], Cell[14643, 391, 137, 3, 31, "Input"], Cell[14783, 396, 225, 6, 31, "Input"], Cell[15011, 404, 99, 1, 29, "Text"], Cell[15113, 407, 259, 7, 31, "Input"], Cell[15375, 416, 271, 6, 29, "Text"], Cell[15649, 424, 195, 4, 31, "Input"], Cell[15847, 430, 231, 5, 29, "Text"], Cell[16081, 437, 910, 22, 52, "Input"], Cell[16994, 461, 368, 7, 47, "Text"], Cell[17365, 470, 1079, 28, 52, "Input"], Cell[18447, 500, 461, 8, 65, "Text"], Cell[18911, 510, 110, 1, 29, "Text"], Cell[19024, 513, 956, 22, 52, "Input"], Cell[19983, 537, 144, 1, 29, "Text"], Cell[20130, 540, 255, 5, 29, "Text"], Cell[20388, 547, 243, 6, 31, "Input"], Cell[20634, 555, 239, 5, 29, "Text"], Cell[20876, 562, 138, 3, 31, "Input"], Cell[21017, 567, 199, 4, 29, "Text"], Cell[21219, 573, 262, 8, 48, "Input"], Cell[21484, 583, 98, 1, 29, "Text"], Cell[21585, 586, 494, 14, 48, "Input"], Cell[22082, 602, 188, 2, 29, "Text"], Cell[22273, 606, 540, 14, 48, "Input"], Cell[22816, 622, 183, 2, 29, "Text"], Cell[23002, 626, 542, 14, 48, "Input"], Cell[23547, 642, 255, 5, 29, "Text"], Cell[CellGroupData[{ Cell[23827, 651, 411, 11, 31, "Input"], Cell[24241, 664, 368, 8, 21, "Message"], Cell[24612, 674, 3873, 71, 248, "Output"] }, Open ]], Cell[28500, 748, 714, 11, 101, "Text"] }, Open ]] } ] *) (* End of internal cache information *)