{"version":1,"lectureId":"01M14TZH5WP4FCKCDDNKB7CV0C","attempt":0,"publication":{"slug":"taylor-sine-convergence-failures","title":"Building the Taylor Series: Convergence and Failure","subject":"mathematics","summary":"Sine is not a polynomial, so every calculator that reports a sine is really evaluating one. This lecture builds that polynomial from nothing: match the value at zero, then the slope, then the bend, and read off the coefficients that forces. Each new term is then watched correcting the curve before it, one hump further out. Then the harder half. Taylor's theorem is an equality, function equals polynomial plus remainder, and everything true about a series is a statement about that remainder. We bound it for sine and watch it die everywhere; we meet a smooth bounded function whose series stops converging past a wall on the real line, which is where the radius of convergence gets its name; and we meet a smooth function whose series converges beautifully, with infinite radius, to something that is not the function it came from.","metaDescription":"Build the Taylor polynomial of sine term by term, then see why the remainder, not the series, makes the equals sign true.","transcript":"Every function a machine can actually compute is built out of adding and multiplying. That is what a polynomial is. Sine is not one, so when your calculator reports a sine it is not doing trigonometry at all. It is evaluating a polynomial, and this lecture is about which one, and how far you can trust it. So here is the question. Sine is not a polynomial. Can we build one that behaves like it near zero, and how close can we actually get? I will tell you the destination first, because the destination is not the hard part. This is it. Sine of x equals x, minus x cubed over three factorial, plus x to the fifth over five factorial, and on forever. Every hard question in this lecture is hiding in that equals sign. So where do those numbers come from? Nowhere clever. Suppose I want a polynomial that behaves like f near zero, and the only tool I have is that I can force the two of them to agree at a single point: same value, same slope, same bend. So write the polynomial down with its coefficients still unknown. a nought, plus a one x, plus a two x squared, and so on. Now set x to zero. Every term carrying an x dies, and all that is left is a nought. Now differentiate. The constant vanishes, a one is standing there on its own, and everything after it still carries an x. Set x to zero again, and out falls a one. Differentiate once more. The square brings a two down in front, so a two ends up doubled, and setting x to zero leaves a two as the second derivative at zero, over two. And you can see the pattern. Each derivative strips one more coefficient bare, and the number it picks up in front is a factorial. So the k-th coefficient is the k-th derivative of f at zero, divided by k factorial. Stack them up and that is the Taylor polynomial of f about zero. Every coefficient is one derivative at one point. Nothing else about the function is used anywhere. Now aim it at sine. The derivatives of sine go round in a circle. Differentiate and you get cosine, then minus sine, then minus cosine, and then you are back where you started. Evaluate all of them at zero. Sine of zero is nothing. Cosine of zero is one. Minus sine of zero is nothing again, and minus cosine of zero is minus one. Look what that does. Every even coefficient has a zero on top, so every even power of x is wiped out. What survives is the odd powers, one, three, five, seven, with the signs flipping each time. So here is the machine running, against the curve itself. The crudest match uses one term, a nought, which is sine of zero, which is nothing. That polynomial is the constant zero, and on this picture it is the horizontal axis. It agrees with sine at exactly one point and nowhere else. Take one more term. The next coefficient is cosine of zero, which is one, so the first polynomial is simply x. That is the tangent line at the origin, and close in it is genuinely good. But watch it leave. By x equals two the line is still climbing and sine has already turned over. So add the next term, minus x cubed over six, and look what it does. It bends the line down, exactly where the line was going wrong. That is the whole idea in one picture. Every new term is a correction. Near zero it is negligible, because a high power of a small number is tiny. It only speaks up once you are far enough out for the previous curve to have failed. Add the fifth power term and the same thing happens one hump further out. Add the seventh and it happens again. Each polynomial tracks sine a little longer before it gives up and shoots off. Let me put a dot on sine and a dot on the seventh degree polynomial and walk them out. Near zero you cannot tell them apart. Past three they are still on top of each other. And then, quite suddenly, they are not. Which raises the only question worth asking about any of this. How wrong is the polynomial at a given x, and does taking more terms really drive that wrongness to zero? That gap has a name, and it is the real content of Taylor's theorem. So let us look at that gap directly. Here is sine again, and here is the cubic we built, x minus x cubed over six. Same picture as before, except that now I want to measure the distance between the two curves. Call that distance the remainder. R three of x is sine of x minus P three of x, and it is nothing more than the vertical gap between the blue curve and the green one at whichever x you are standing at. Walk in toward zero and it closes so fast you cannot see it happen. At a half the two curves differ by about two ten-thousandths. On this picture that is thinner than the line itself. Now walk out. At two the gap is already obvious. At three it is enormous. Sine is up near a seventh and the cubic has dived past minus one and a half. Same polynomial, same degree. All that changed is how far we walked. Raising the degree buys you distance, not safety. Here is the seventh degree polynomial on the same picture. It holds on out past four, which is much better, and then it does exactly the same thing. Every fixed polynomial eventually leaves. So here is what Taylor's theorem actually says, and notice how little of it is the series. The function equals the polynomial, plus a remainder. That is an exact statement with no approximation anywhere in it. The whole question is what the remainder is. And Lagrange gives that remainder to us in closed form. It is the n plus first derivative of f, taken at some point c between zero and x, times x to the n plus one, over n plus one factorial. Hold it next to the terms we were adding. It is exactly the shape of the next term of the series, except for one thing. The derivative is taken at c, somewhere in the middle, rather than at zero. And the theorem never tells you where c is. Now watch what that buys us for sine. Every derivative of sine is plus or minus a sine or a cosine. So whatever c turns out to be, that derivative is at most one in size, and we never need to know c at all. So the remainder is trapped below x to the n plus one, over n plus one factorial. Pure arithmetic, with no trigonometry left in it. And now look at what that quantity does as n grows. Take x equal to ten, a long way from the centre. With five terms the bound is over eight hundred, which is useless. With ten it is worse, nearly three thousand. The powers of ten are still beating the factorial. But factorials win in the end. By fifteen the bound has turned over. By twenty it is forty. By thirty it is four thousandths, and by forty it is a hundred-millionth. And ten is not special. Fix any x you like, however enormous, and x to the m over m factorial goes to zero as m grows, because eventually the factorial is multiplying by numbers larger than x at every single step. Which is the sentence we were actually after. The remainder for sine dies, everywhere. So the series really does add up to sine, at every real number. Not nearly. Exactly. And it was the remainder that proved it, not the terms. Sine was the happy case. Here is a function that is not. g of x is one over one plus x squared. Smooth everywhere, bounded, no corners, no blow-ups. There is nothing wrong with it anywhere on the real line. Its Taylor series about zero is easy to get, because you have already seen it. A geometric series sums to one over one minus r, whenever r is smaller than one in size. Now put r equal to minus x squared. Out comes one, minus x squared, plus x to the fourth, minus x to the sixth, and onward. Every even power, with the signs alternating. That is the Taylor series of g about zero. Now draw two of its partial sums. Here is one minus x squared. Here is the one that runs out to the sixth power. And here are the two walls, at minus one and at plus one. Inside those walls the partial sums close in on the curve, and taking more terms makes them better. Outside them, look what happens. The sixth power sum has already dived past minus one, while the function it came from sits calmly at four tenths. And adding more terms out there does not help. It makes things worse. Past x equals one the powers of x stop shrinking, so the series has nothing to converge to at all. It is not a bad approximation. It is not an approximation. That number one has a name, and it is the thing this lecture assumed you had not met. It is the radius of convergence. Inside it the series converges. Outside it the series diverges, and there is no argument about a remainder to be had. And here is the strange part. Nothing on the real line explains why the wall sits at one. The function is perfectly happy there. The explanation lives off the real line entirely, and it is a story for another course. So that is failure number one. The series simply stops converging past a certain distance. It is a nuisance, but it is honest, because it tells you it has given up. The second failure is far worse, because it tells you nothing at all. Here is the function that ends this story. For x away from zero, f of x is e to the minus one over x squared, and at zero we define it to be zero. It is a perfectly ordinary looking curve. It rises from nothing on the left, flattens right out at the origin, and rises again. And it is smooth. Infinitely differentiable, everywhere, including at zero. That takes a little work to prove, but it is true. So Taylor's recipe applies to it with no complaint whatsoever. But look how hard it presses itself against the axis near the origin. At one it is about zero point three seven. At a half it is down to eighteen thousandths. At a fifth it is ten to the minus eleven, and at a tenth, ten to the minus forty four. That is not merely small. That is flatter than any polynomial can manage. x to the tenth, at a tenth, is ten to the minus ten, and f is already thirty orders of magnitude below that. The exponential crushes every power. Now differentiate it. Away from zero the derivative is two over x cubed, times the same exponential. The two over x cubed blows up as x approaches the origin, but the exponential goes to zero faster than any power can blow up. So the limit is zero. Differentiate again and you get another rational function of one over x, times that same exponential, and the same thing happens. Every single derivative at zero comes out zero. Not small. Zero. So feed those into the recipe. Every coefficient is a derivative at zero over a factorial, and every one of those derivatives is zero. So every coefficient is zero, and the Taylor series of this function is the zero function. Draw it. There it is, in red, lying flat along the axis. And now ask the question we have been asking all along. How wrong is it? Put a dot on the function and a dot on its series, and walk them out. They come apart immediately. Out at two point four the gap is nearly the whole height of the picture. Walk back in and it shrinks, but it never actually closes until you are standing at the origin itself. And here is the thing that should bother you. Adding more terms does nothing at all, because every term is zero. The remainder is the whole function, at every degree, forever. So this series converges. It converges on the entire real line, beautifully, instantly, with infinite radius of convergence. And it converges to the wrong thing. It agrees with the function it came from at exactly one point, the point we built it at, and nowhere else. Which kills the comfortable picture of what a Taylor series is. It is not a decomposition of a function. It is a list of derivatives at one point, and derivatives at one point can be completely blind to what the function does anywhere else. So put the two cases next to each other. For sine we could bound the remainder, and the bound went to zero for every x. That is precisely why we are allowed to write an equals sign between the function and its series. For the flat function, the series was the zero function and the remainder was the whole of f, at every degree. It never went anywhere. So there is no equals sign to be had, except at the single point x equals zero. And notice what did the deciding in both cases. Not the terms. Not how fast the coefficients shrink. Not even whether the series converges. It was the remainder that settled it, both times, and nothing else in the argument mattered at all. So, three things to carry away. First, Taylor's theorem is not an approximation. It is an equality. The function is the polynomial plus the remainder, exactly, for every x and every n. There is nothing to be wrong about until you throw the remainder away. Second, the series represents the function only where the remainder tends to zero. That is a limit statement, and it has to be proved. For sine we proved it, with the factorial. For the flat function it is plainly false. And third, the one that catches people. A series converging is not the same thing as a series converging to the right answer. Our last example converged everywhere on the line and was wrong everywhere except one point. So here is the statement, whole. Sine of x is the sum from k equals zero to infinity of minus one to the k, times x to the two k plus one, over two k plus one factorial. And that equals sign is not notation. It is a theorem, and the thing holding it up is a bound on the remainder that goes to zero for every x. The series is the part you can see. The remainder is the part that decides.","watch":{"version":1,"scenes":[{"title":"Building the Polynomial","start":0,"end":303.7164791666667,"objects":{"axes":"an Axes (x_range=(-5.2, 5.2), y_range=(-2.8, 2.8), x_ticks_every=1.0)","build":"a Derivation [text] that says \"$P_1(x) &= x \\ P_3(x) &= P_1(x) - frac(x^3, 3!) \\ P_5(x) &= P_3(x) + frac(x^5, 5!) \\ P_7(x) &= P_5(x) - frac(x^7, 7!)$\"","card":"a Title that says \"Introductory Calculus — Building the Taylor Series: Convergence and Failure\"","cycle":"a Table [text] that says \"$k$ $f^((k))(x)$ $f^((k))(0)$ $0$ $sin x$ $0$ $1$ $cos x$ $1$ $2$ $- sin x$ $0$ $3$ $- cos x$ $-1$ $4$ $sin x$ $0$\" (rows=(('$k$', '$f^((k))(x)$', '$f^((k))(0)$'), ('$0$', '$sin x$', '$…, header=True)","dot_p7":"a PlotPoint [red] drawn in axes (target='p7_plot', x=<VariableNumber probe = 4.4>, marker_radius=0.08)","dot_sine":"a PlotPoint [blue] drawn in axes (target='sine_plot', x=<VariableNumber probe = 4.4>, marker_radius=0.08)","goal":"a Math [text] that says \"$sin x = x - frac(x^3, 3!) + frac(x^5, 5!) - frac(x^7, 7!) + dots$\"","head_build":"a Heading that says \"One Term at a Time\"","head_cycle":"a Heading that says \"Sine's Derivatives at Zero\"","head_match":"a Heading that says \"Matching at a Point\"","maclaurin":"a Math [text] that says \"$P_n(x) = sum_(k = 0)^n frac(f^((k))(0), k!) x^k$\"","odd_note":"a Tex [text] that says \"Only the odd powers survive, and the signs alternate.\"","p1_plot":"a FunctionPlot [yellow] labelled \"P_1\" drawn in axes (function=<function>, x_range=(-2.7, 2.7))","p3_plot":"a FunctionPlot [green] labelled \"P_3\" drawn in axes (function=<function>, x_range=(-3.3, 3.3))","p5_plot":"a FunctionPlot [magenta] labelled \"P_5\" drawn in axes (function=<function>, x_range=(-4.2, 4.2))","p7_plot":"a FunctionPlot [red] labelled \"P_7\" drawn in axes (function=<function>, x_range=(-4.4, 4.4))","probe":"a VariableNumber (initial_value=0.4)","question":"a Panel that says \"Sine is not a polynomial. Can we build one that behaves like it near $x = 0$, and how close can we get?\"","sine_plot":"a FunctionPlot [blue] labelled \"sin x\" drawn in axes (function=<function>, x_range=(-5.2, 5.2))","work":"a Derivation [text] that says \"$P(x) &= a_0 + a_1 x + a_2 x^2 + a_3 x^3 + dots \\ a_0 &= P(0) \\ P'(x) &= a_1 + 2 a_2 x + 3 a_3 x^2 + dots \\ a_1 &= P'(0) \\ a_2 &= frac(P''(0), 2) \\ a_k &= frac(f^((k))(0), k!)$\"","zero_line":"a Line [gray] labelled \"P_0 = 0\" drawn in axes (start=(-2.7, 0.0), end=(2.7, 0.0))"},"beats":[{"start":0,"say":"Every function a machine can actually compute is built out of adding and multiplying. That is what a polynomial is. Sine is not one, so when your calculator reports a sine it is not doing trigonometry at all. It is evaluating a polynomial, and this lecture is about which one, and how far you can trust it.","live":[],"does":[[0,"card is shown on the screen, written out."],[1.5,"card: enter:write-left-to-right."],[21.2235,"card is hidden from the screen — left the board."]]},{"start":22.4235,"say":"So here is the question. Sine is not a polynomial. Can we build one that behaves like it near zero, and how close can we actually get?","live":null,"does":[[23.421999999999997,"question is shown on the screen, written out."],[32.106,"question moves to a new place on the board."]]},{"start":33.306,"say":"I will tell you the destination first, because the destination is not the hard part. This is it. Sine of x equals x, minus x cubed over three factorial, plus x to the fifth over five factorial, and on forever. Every hard question in this lecture is hiding in that equals sign.","live":["question"],"does":[[38.751,"goal is shown on the screen, written out."],[53.983,"goal (the \"=\" part) is indicated — a transient flash."],[54.8185,"goal is hidden from the screen — left the board."],[54.8185,"question is hidden from the screen — left the board."]]},{"start":56.018499999999996,"say":"So where do those numbers come from? Nowhere clever. Suppose I want a polynomial that behaves like f near zero, and the only tool I have is that I can force the two of them to agree at a single point: same value, same slope, same bend. So write the polynomial down with its coefficients still unknown.","live":[],"does":[[56.018499999999996,"head_match is shown on the screen, written out."],[73.364,"work is shown on the screen, written out."]]},{"start":77.8245,"say":"a nought, plus a one x, plus a two x squared, and so on. Now set x to zero. Every term carrying an x dies, and all that is left is a nought.","live":["head_match"],"does":[[87.97800000000001,"work is shown on the screen, written out."]]},{"start":89.9065,"say":"Now differentiate. The constant vanishes, a one is standing there on its own, and everything after it still carries an x. Set x to zero again, and out falls a one.","live":null,"does":[[90.54,"work is shown on the screen, written out."],[100.965,"work is shown on the screen, written out."]]},{"start":102.738,"say":"Differentiate once more. The square brings a two down in front, so a two ends up doubled, and setting x to zero leaves a two as the second derivative at zero, over two.","live":null,"does":[[114.185,"work is shown on the screen, written out."]]},{"start":115.8535,"say":"And you can see the pattern. Each derivative strips one more coefficient bare, and the number it picks up in front is a factorial. So the k-th coefficient is the k-th derivative of f at zero, divided by k factorial.","live":null,"does":[[129.63400000000001,"work is shown on the screen, written out."]]},{"start":132.208,"say":"Stack them up and that is the Taylor polynomial of f about zero. Every coefficient is one derivative at one point. Nothing else about the function is used anywhere.","live":null,"does":[[132.55599999999998,"maclaurin is shown on the screen, written out."],[143.528,"maclaurin moves to a new place on the board."],[143.528,"head_match is hidden from the screen — left the board."],[143.528,"work is hidden from the screen — left the board."],[143.528,"cycle is shown on the screen, written out."]]},{"start":144.128,"say":"Now aim it at sine. The derivatives of sine go round in a circle. Differentiate and you get cosine, then minus sine, then minus cosine, and then you are back where you started.","live":["maclaurin"],"does":[[148.575,"cycle is shown on the screen, written out."],[151.059,"cycle is shown on the screen, written out."],[152.534,"cycle is shown on the screen, written out."],[154.124,"cycle is shown on the screen, written out."],[156.168,"cycle is shown on the screen, written out."]]},{"start":158.231,"say":"Evaluate all of them at zero. Sine of zero is nothing. Cosine of zero is one. Minus sine of zero is nothing again, and minus cosine of zero is minus one.","live":null,"does":[[158.57899999999998,"cycle (the \"column=3\" part) is emphasized."],[171.426,"cycle (the \"column=3\" part) is no longer emphasized."]]},{"start":172.02599999999998,"say":"Look what that does. Every even coefficient has a zero on top, so every even power of x is wiped out. What survives is the odd powers, one, three, five, seven, with the signs flipping each time.","live":null,"does":[[179.72899999999998,"odd_note is shown on the screen, written out."],[187.171,"cycle is hidden from the screen — left the board."],[187.171,"maclaurin is hidden from the screen — left the board."],[187.171,"odd_note is hidden from the screen — left the board."],[187.171,"axes is shown on the screen, written out."],[187.171,"sine_plot is shown on the screen, drawn."]]},{"start":188.37099999999998,"say":"So here is the machine running, against the curve itself. The crudest match uses one term, a nought, which is sine of zero, which is nothing. That polynomial is the constant zero, and on this picture it is the horizontal axis. It agrees with sine at exactly one point and nowhere else.","live":["axes","sine_plot"],"does":[[188.37099999999998,"head_build is shown on the screen, written out."],[200.352,"zero_line is shown on the screen, written out."]]},{"start":209.706,"say":"Take one more term. The next coefficient is cosine of zero, which is one, so the first polynomial is simply x. That is the tangent line at the origin, and close in it is genuinely good.","live":["axes","head_build","sine_plot","zero_line"],"does":[[217.07799999999997,"build is shown on the screen, written out."],[219.14399999999998,"zero_line is hidden from the screen."],[219.14399999999998,"p1_plot is shown on the screen, drawn."]]},{"start":223.9705,"say":"But watch it leave. By x equals two the line is still climbing and sine has already turned over. So add the next term, minus x cubed over six, and look what it does. It bends the line down, exactly where the line was going wrong.","live":["axes","head_build","sine_plot","p1_plot"],"does":[[231.16899999999998,"build is shown on the screen, written out."],[236.951,"p3_plot is shown on the screen, drawn."]]},{"start":241.5675,"say":"That is the whole idea in one picture. Every new term is a correction. Near zero it is negligible, because a high power of a small number is tiny. It only speaks up once you are far enough out for the previous curve to have failed.","live":["axes","head_build","sine_plot","p1_plot","p3_plot"],"does":[[245.887,"build (the \"frac(x^3, 3!)\" part) is indicated — a transient flash."]]},{"start":257.725,"say":"Add the fifth power term and the same thing happens one hump further out. Add the seventh and it happens again. Each polynomial tracks sine a little longer before it gives up and shoots off.","live":null,"does":[[258.677,"build is shown on the screen, written out."],[259.077,"p5_plot is shown on the screen, drawn."],[263.68100000000004,"build is shown on the screen, written out."],[264.081,"p7_plot is shown on the screen, drawn."]]},{"start":271.189,"say":"Let me put a dot on sine and a dot on the seventh degree polynomial and walk them out. Near zero you cannot tell them apart. Past three they are still on top of each other. And then, quite suddenly, they are not.","live":["axes","head_build","sine_plot","p1_plot","p3_plot","p5_plot","p7_plot"],"does":[[272.048,"dot_sine is shown on the screen, written out."],[272.048,"dot_p7 is shown on the screen, written out."],[275.427,"dot_sine is redrawn as the numbers it depends on change."],[275.427,"dot_p7 is redrawn as the numbers it depends on change."],[275.427,"probe ticks to 2.0."],[279.74500000000006,"dot_sine is redrawn as the numbers it depends on change."],[279.74500000000006,"dot_p7 is redrawn as the numbers it depends on change."],[279.74500000000006,"probe ticks to 3.4."],[283.77400000000006,"dot_sine is redrawn as the numbers it depends on change."],[283.77400000000006,"dot_p7 is redrawn as the numbers it depends on change."],[283.77400000000006,"probe ticks to 4.4."]]},{"start":286.44100000000003,"say":"Which raises the only question worth asking about any of this. How wrong is the polynomial at a given x, and does taking more terms really drive that wrongness to zero? That gap has a name, and it is the real content of Taylor's theorem.","live":["axes","head_build","sine_plot","p1_plot","p3_plot","p5_plot","p7_plot","dot_sine","dot_p7"],"does":[[302.67481250000003,"axes is hidden from the screen — left the board."],[302.67481250000003,"sine_plot is hidden from the screen — axes left the board."],[302.67481250000003,"p1_plot is hidden from the screen — axes left the board."],[302.67481250000003,"p3_plot is hidden from the screen — axes left the board."],[302.67481250000003,"p5_plot is hidden from the screen — axes left the board."],[302.67481250000003,"p7_plot is hidden from the screen — axes left the board."],[302.67481250000003,"dot_sine is hidden from the screen — axes left the board."],[302.67481250000003,"dot_p7 is hidden from the screen — axes left the board."],[302.67481250000003,"build is hidden from the screen — left the board."],[302.67481250000003,"head_build is hidden from the screen — left the board."]]}]},{"title":"How Wrong Is It?","start":303.7164791666667,"end":518.1036458333334,"objects":{"axes":"an Axes (x_range=(-1.0, 6.6), y_range=(-2.6, 2.6), x_ticks_every=1.0)","bound":"a Derivation [text] that says \"$|f^((n + 1))(c)| &<= 1 \\ |R_n(x)| &<= frac(|x|^(n + 1), (n + 1)!)$\"","conclusion":"a Math [text] that says \"$lim_(n -> oo) R_n(x) = 0$\"","conclusion_note":"a Tex [text] that says \"for every real $x$, however far from the centre.\"","dot_f":"a PlotPoint [blue] drawn in axes (target='sine_plot', x=<VariableNumber probe = 3.0>, marker_radius=0.08)","dot_p":"a PlotPoint [green] drawn in axes (target='p3_plot', x=<VariableNumber probe = 3.0>, marker_radius=0.08)","err_def":"a Math [text] that says \"$R_3(x) = sin x - P_3(x)$\"","gap":"a Line [red] labelled \"R_3(x)\" drawn in axes (start=(<VariableNumber probe = 3.0>, sin(probe)), end=(<VariableNumber probe = 3.0>, (probe - ((probe ** 3.0) / 6.0))))","head_bound":"a Heading that says \"Bounding the Remainder\"","head_gap":"a Heading that says \"How Wrong Is It?\"","head_thm":"a Heading that says \"Taylor's Theorem\"","lagrange":"a Math [text] that says \"$R_n(x) = frac(f^((n + 1))(c), (n + 1)!) x^(n + 1)$\"","obs":"a Tex [text] that says \"Fix the degree, and the error grows without limit as $x$ leaves zero.\"","p3_plot":"a FunctionPlot [green] labelled \"P_3\" drawn in axes (function=<function>, x_range=(-1.0, 3.2))","p7_plot":"a FunctionPlot [red] labelled \"P_7\" drawn in axes (function=<function>, x_range=(-1.0, 4.4))","probe":"a VariableNumber (initial_value=1.0)","sine_plot":"a FunctionPlot [blue] labelled \"sin x\" drawn in axes (function=<function>, x_range=(-1.0, 6.6))","table":"a Table [text] that says \"$n + 1$ bound at $x = 10$ $5$ $833$ $10$ $2756$ $15$ $765$ $20$ $41.1$ $30$ $0.0038$ $40$ $1.2 times 10^(-8)$\" (rows=(('$n + 1$', 'bound at $x = 10$'), ('$5$', '$833$'), ('$10$', '…, header=True)","thm":"a Math [text] that says \"$f(x) = P_n(x) + R_n(x)$\"","thm_note":"a Panel that says \"for some $c$ between $0$ and $x$. The theorem does not say which $c$. It says one exists.\""},"beats":[{"start":303.7164791666667,"say":"So let us look at that gap directly. Here is sine again, and here is the cubic we built, x minus x cubed over six. Same picture as before, except that now I want to measure the distance between the two curves.","live":[],"does":[[303.7164791666667,"head_gap is shown on the screen, written out."],[303.7164791666667,"axes is shown on the screen, written out."],[303.7164791666667,"sine_plot is shown on the screen, drawn."],[308.4184791666667,"p3_plot is shown on the screen, drawn."]]},{"start":318.8289791666667,"say":"Call that distance the remainder. R three of x is sine of x minus P three of x, and it is nothing more than the vertical gap between the blue curve and the green one at whichever x you are standing at.","live":["axes","head_gap","sine_plot","p3_plot"],"does":[[320.19847916666674,"axes moves to a new place on the board."],[320.19847916666674,"err_def is shown on the screen, written out."],[326.74647916666675,"dot_f is shown on the screen, written out."],[326.74647916666675,"dot_p is shown on the screen, written out."],[326.74647916666675,"gap is shown on the screen, written out."]]},{"start":332.5824791666667,"say":"Walk in toward zero and it closes so fast you cannot see it happen. At a half the two curves differ by about two ten-thousandths. On this picture that is thinner than the line itself.","live":["err_def","axes","head_gap","sine_plot","p3_plot","dot_f","dot_p","gap"],"does":[[333.0584791666667,"dot_f is redrawn as the numbers it depends on change."],[333.0584791666667,"dot_p is redrawn as the numbers it depends on change."],[333.0584791666667,"gap is redrawn as the numbers it depends on change."],[333.0584791666667,"probe ticks to 0.5."]]},{"start":345.40797916666673,"say":"Now walk out. At two the gap is already obvious. At three it is enormous. Sine is up near a seventh and the cubic has dived past minus one and a half. Same polynomial, same degree. All that changed is how far we walked.","live":null,"does":[[347.85747916666674,"dot_f is redrawn as the numbers it depends on change."],[347.85747916666674,"dot_p is redrawn as the numbers it depends on change."],[347.85747916666674,"gap is redrawn as the numbers it depends on change."],[347.85747916666674,"probe ticks to 2.0."],[350.8064791666667,"dot_f is redrawn as the numbers it depends on change."],[350.8064791666667,"dot_p is redrawn as the numbers it depends on change."],[350.8064791666667,"gap is redrawn as the numbers it depends on change."],[350.8064791666667,"probe ticks to 3.0."],[361.1514791666667,"obs is shown on the screen, written out."]]},{"start":364.0264791666667,"say":"Raising the degree buys you distance, not safety. Here is the seventh degree polynomial on the same picture. It holds on out past four, which is much better, and then it does exactly the same thing. Every fixed polynomial eventually leaves.","live":["err_def","obs","axes","head_gap","sine_plot","p3_plot","dot_f","dot_p","gap"],"does":[[366.92947916666674,"gap is hidden from the screen."],[366.92947916666674,"dot_p is hidden from the screen."],[366.92947916666674,"dot_f is hidden from the screen."],[368.76347916666674,"p7_plot is shown on the screen, drawn."],[379.2939791666667,"axes is hidden from the screen — left the board."],[379.2939791666667,"sine_plot is hidden from the screen — axes left the board."],[379.2939791666667,"p3_plot is hidden from the screen — axes left the board."],[379.2939791666667,"p7_plot is hidden from the screen — axes left the board."],[379.2939791666667,"err_def is hidden from the screen — left the board."],[379.2939791666667,"head_gap is hidden from the screen — left the board."],[379.2939791666667,"obs is hidden from the screen — left the board."]]},{"start":379.8939791666667,"say":"So here is what Taylor's theorem actually says, and notice how little of it is the series. The function equals the polynomial, plus a remainder. That is an exact statement with no approximation anywhere in it. The whole question is what the remainder is.","live":[],"does":[[379.8939791666667,"head_thm is shown on the screen, written out."],[385.53547916666673,"thm is shown on the screen, written out."],[389.6924791666667,"thm (the \"R_n(x)\" part) is emphasized."]]},{"start":396.6429791666667,"say":"And Lagrange gives that remainder to us in closed form. It is the n plus first derivative of f, taken at some point c between zero and x, times x to the n plus one, over n plus one factorial.","live":["thm","head_thm"],"does":[[396.6429791666667,"thm (the \"R_n(x)\" part) is no longer emphasized."],[398.9304791666667,"lagrange is shown on the screen, written out."]]},{"start":412.06897916666674,"say":"Hold it next to the terms we were adding. It is exactly the shape of the next term of the series, except for one thing. The derivative is taken at c, somewhere in the middle, rather than at zero. And the theorem never tells you where c is.","live":["thm","lagrange","head_thm"],"does":[[420.2544791666667,"lagrange (the \"f^((n + 1))(c)\" part) is emphasized."],[422.6104791666667,"thm_note is shown on the screen, written out."],[425.8734791666667,"lagrange (the \"f^((n + 1))(c)\" part) is no longer emphasized."],[427.61447916666674,"head_thm is hidden from the screen — left the board."],[427.61447916666674,"lagrange is hidden from the screen — left the board."],[427.61447916666674,"thm is hidden from the screen — left the board."],[427.61447916666674,"thm_note is hidden from the screen — left the board."]]},{"start":428.81447916666673,"say":"Now watch what that buys us for sine. Every derivative of sine is plus or minus a sine or a cosine. So whatever c turns out to be, that derivative is at most one in size, and we never need to know c at all.","live":[],"does":[[428.81447916666673,"head_bound is shown on the screen, written out."],[439.4494791666668,"bound is shown on the screen, written out."]]},{"start":443.71797916666674,"say":"So the remainder is trapped below x to the n plus one, over n plus one factorial. Pure arithmetic, with no trigonometry left in it. And now look at what that quantity does as n grows.","live":["head_bound"],"does":[[444.78547916666673,"bound is shown on the screen, written out."],[454.9444791666667,"table is shown on the screen, written out."]]},{"start":457.7389791666667,"say":"Take x equal to ten, a long way from the centre. With five terms the bound is over eight hundred, which is useless. With ten it is worse, nearly three thousand. The powers of ten are still beating the factorial.","live":null,"does":[[462.0574791666667,"table is shown on the screen, written out."],[466.4704791666667,"table is shown on the screen, written out."]]},{"start":471.6619791666667,"say":"But factorials win in the end. By fifteen the bound has turned over. By twenty it is forty. By thirty it is four thousandths, and by forty it is a hundred-millionth.","live":null,"does":[[474.1524791666667,"table is shown on the screen, written out."],[476.46247916666675,"table is shown on the screen, written out."],[478.3784791666667,"table is shown on the screen, written out."],[480.8394791666667,"table is shown on the screen, written out."]]},{"start":483.40097916666673,"say":"And ten is not special. Fix any x you like, however enormous, and x to the m over m factorial goes to zero as m grows, because eventually the factorial is multiplying by numbers larger than x at every single step.","live":null,"does":[[484.39947916666677,"table (the \"column=2\" part) is indicated — a transient flash."],[492.0624791666668,"conclusion is shown on the screen, written out."],[492.66247916666674,"conclusion_note is shown on the screen, written out."]]},{"start":500.3364791666667,"say":"Which is the sentence we were actually after. The remainder for sine dies, everywhere. So the series really does add up to sine, at every real number. Not nearly. Exactly. And it was the remainder that proved it, not the terms.","live":["conclusion","conclusion_note","head_bound"],"does":[[512.6894791666667,"A box is drawn around conclusion."],[517.0619791666668,"bound is hidden from the screen — left the board."],[517.0619791666668,"conclusion is hidden from the screen — left the board."],[517.0619791666668,"conclusion_note is hidden from the screen — left the board."],[517.0619791666668,"head_bound is hidden from the screen — left the board."],[517.0619791666668,"table is hidden from the screen — left the board."]]}]},{"title":"Where the Series Stops Converging","start":518.1036458333334,"end":659.3789791666668,"objects":{"axes":"an Axes (x_range=(-2.2, 2.2), y_range=(-1.4, 1.4), x_ticks_every=1.0)","bell_plot":"a FunctionPlot [blue] labelled \"frac(1, 1 + x^2)\" drawn in axes (function=<function>, x_range=(-2.2, 2.2))","g_def":"a Math [text] that says \"$g(x) = frac(1, 1 + x^2)$\"","g_series":"a Math [text] that says \"$g(x) = 1 - x^2 + x^4 - x^6 + dots$\"","geo":"a Math [text] that says \"$1 + r + r^2 + dots = frac(1, 1 - r)$\"","head_name":"a Heading that says \"The Radius of Convergence\"","head_radius":"a Heading that says \"Where the Series Stops Converging\"","point":"a Point [yellow] drawn in axes (location=(1.2, 0.41))","radius_note":"a Panel that says \"Every power series has a radius $R$. It converges for $|x| < R$ and diverges for $|x| > R$. For this one, $R = 1$.\"","s2_plot":"a FunctionPlot [yellow] labelled \"S_2\" drawn in axes (function=<function>, x_range=(-1.5, 1.5))","s6_plot":"a FunctionPlot [red] labelled \"S_6\" drawn in axes (function=<function>, x_range=(-1.2, 1.2))","sub":"a Math [text] that says \"$r = - x^2, quad |r| < 1 arrow.r.double |x| < 1$\"","wall_l":"a Line [gray] drawn in axes (start=(-1.0, -1.3), end=(-1.0, 1.3), dashed=True)","wall_r":"a Line [gray] drawn in axes (start=(1.0, -1.3), end=(1.0, 1.3), dashed=True)"},"beats":[{"start":518.1036458333334,"say":"Sine was the happy case. Here is a function that is not. g of x is one over one plus x squared. Smooth everywhere, bounded, no corners, no blow-ups. There is nothing wrong with it anywhere on the real line.","live":[],"does":[[518.1036458333334,"head_radius is shown on the screen, written out."],[518.1036458333334,"axes is shown on the screen, written out."],[518.1036458333334,"bell_plot is shown on the screen, drawn."],[525.6846458333334,"axes moves to a new place on the board."],[525.6846458333334,"g_def is shown on the screen, written out."]]},{"start":534.8531458333334,"say":"Its Taylor series about zero is easy to get, because you have already seen it. A geometric series sums to one over one minus r, whenever r is smaller than one in size. Now put r equal to minus x squared.","live":["g_def","axes","head_radius","bell_plot"],"does":[[540.5656458333334,"geo is shown on the screen, written out."],[546.7766458333334,"sub is shown on the screen, written out."]]},{"start":550.1401458333335,"say":"Out comes one, minus x squared, plus x to the fourth, minus x to the sixth, and onward. Every even power, with the signs alternating. That is the Taylor series of g about zero.","live":["g_def","geo","sub","axes","head_radius","bell_plot"],"does":[[550.6276458333334,"g_series is shown on the screen, written out."]]},{"start":565.1131458333334,"say":"Now draw two of its partial sums. Here is one minus x squared. Here is the one that runs out to the sixth power. And here are the two walls, at minus one and at plus one.","live":["g_def","geo","sub","g_series","axes","head_radius","bell_plot"],"does":[[568.1896458333334,"s2_plot is shown on the screen, drawn."],[571.7076458333335,"s6_plot is shown on the screen, drawn."],[575.0856458333334,"wall_l is shown on the screen, written out."],[575.0856458333334,"wall_r is shown on the screen, written out."]]},{"start":579.1806458333334,"say":"Inside those walls the partial sums close in on the curve, and taking more terms makes them better. Outside them, look what happens. The sixth power sum has already dived past minus one, while the function it came from sits calmly at four tenths.","live":["g_def","geo","sub","g_series","axes","head_radius","bell_plot","s2_plot","s6_plot","wall_l","wall_r"],"does":[[594.6676458333334,"point is shown on the screen, grown."]]},{"start":596.2656458333335,"say":"And adding more terms out there does not help. It makes things worse. Past x equals one the powers of x stop shrinking, so the series has nothing to converge to at all. It is not a bad approximation. It is not an approximation.","live":["g_def","geo","sub","g_series","axes","head_radius","bell_plot","s2_plot","s6_plot","wall_l","wall_r","point"],"does":[[596.6676458333334,"point is hidden from the screen."],[600.1326458333334,"s6_plot is indicated — a transient flash."],[612.6246458333335,"g_series moves to a new place on the board."],[612.6246458333335,"g_def is hidden from the screen — left the board."],[612.6246458333335,"geo is hidden from the screen — left the board."],[612.6246458333335,"head_radius is hidden from the screen — left the board."],[612.6246458333335,"sub is hidden from the screen — left the board."]]},{"start":613.2246458333334,"say":"That number one has a name, and it is the thing this lecture assumed you had not met. It is the radius of convergence. Inside it the series converges. Outside it the series diverges, and there is no argument about a remainder to be had.","live":["g_series","axes","bell_plot","s2_plot","s6_plot","wall_l","wall_r"],"does":[[613.2246458333334,"head_name is shown on the screen, written out."],[619.0876458333335,"radius_note is shown on the screen, written out."],[623.7086458333334,"wall_l is indicated — a transient flash."],[623.7086458333334,"wall_r is indicated — a transient flash."]]},{"start":629.2771458333334,"say":"And here is the strange part. Nothing on the real line explains why the wall sits at one. The function is perfectly happy there. The explanation lives off the real line entirely, and it is a story for another course.","live":["g_series","axes","bell_plot","s2_plot","s6_plot","wall_l","wall_r","radius_note","head_name"],"does":[]},{"start":643.5891458333334,"say":"So that is failure number one. The series simply stops converging past a certain distance. It is a nuisance, but it is honest, because it tells you it has given up. The second failure is far worse, because it tells you nothing at all.","live":null,"does":[[658.3373125,"axes is hidden from the screen — left the board."],[658.3373125,"bell_plot is hidden from the screen — axes left the board."],[658.3373125,"s2_plot is hidden from the screen — axes left the board."],[658.3373125,"s6_plot is hidden from the screen — axes left the board."],[658.3373125,"wall_l is hidden from the screen — axes left the board."],[658.3373125,"wall_r is hidden from the screen — axes left the board."],[658.3373125,"g_series is hidden from the screen — left the board."],[658.3373125,"head_name is hidden from the screen — left the board."],[658.3373125,"radius_note is hidden from the screen — left the board."]]}]},{"title":"Converging to the Wrong Thing","start":659.3789791666668,"end":851.0681875000001,"objects":{"axes":"an Axes (x_range=(-2.6, 2.6), y_range=(-0.3, 1.15), x_ticks_every=1.0)","derivs":"a Derivation [text] that says \"$f'(x) &= frac(2, x^3) e^(-frac(1, x^2)) \\ lim_(x -> 0) f'(x) &= 0 \\ f^((k))(0) &= 0$\"","dot_f":"a PlotPoint [blue] drawn in axes (target='f_plot', x=<VariableNumber probe = 0.6>, marker_radius=0.08)","dot_t":"a PlotPoint [red] drawn in axes (target='t_plot', x=<VariableNumber probe = 0.6>, marker_radius=0.08)","f_def":"a Math [text] that says \"$f(x) = e^(-frac(1, x^2)), quad f(0) = 0$\"","f_plot":"a FunctionPlot [blue] labelled \"f(x)\" drawn in axes (function=<function>, x_range=(-2.6, 2.6))","head_flat":"a Heading that says \"A Function That Hides\"","head_moral":"a Heading that says \"Converging to the Wrong Thing\"","head_zero":"a Heading that says \"Every Coefficient Vanishes\"","moral":"a Text [text] that says \"The series converges everywhere, with infinite radius. It just converges to the wrong function.\"","point":"a Point [yellow] drawn in axes (location=(0.5, 0.018))","point_2":"a Point [yellow] drawn in axes","probe":"a VariableNumber (initial_value=1.2)","remainder_eq":"a Math [text] that says \"$R_n(x) = f(x) - 0 = f(x)$\"","t_plot":"a FunctionPlot [red] labelled \"T(x) = 0\" drawn in axes (function=<function>, x_range=(-2.6, 2.6))","table":"a Table [text] that says \"$x$ $f(x)$ $1$ $0.368$ $0.5$ $0.018$ $0.2$ $1.4 times 10^(-11)$ $0.1$ $3.7 times 10^(-44)$\" (rows=(('$x$', '$f(x)$'), ('$1$', '$0.368$'), ('$0.5$', '$0.018$'), (…, header=True)","zero_series":"a Math [text] that says \"$T(x) = 0 + 0 x + 0 x^2 + dots = 0$\""},"beats":[{"start":659.3789791666668,"say":"Here is the function that ends this story. For x away from zero, f of x is e to the minus one over x squared, and at zero we define it to be zero. It is a perfectly ordinary looking curve. It rises from nothing on the left, flattens right out at the origin, and rises again.","live":[],"does":[[659.3789791666668,"head_flat is shown on the screen, written out."],[659.3789791666668,"axes is shown on the screen, written out."],[659.3789791666668,"f_plot is shown on the screen, drawn."],[667.4829791666668,"axes moves to a new place on the board."],[667.4829791666668,"f_def is shown on the screen, written out."]]},{"start":680.3429791666669,"say":"And it is smooth. Infinitely differentiable, everywhere, including at zero. That takes a little work to prove, but it is true. So Taylor's recipe applies to it with no complaint whatsoever.","live":["f_def","axes","head_flat","f_plot"],"does":[[681.2019791666668,"f_plot is indicated — a transient flash."]]},{"start":693.7019791666668,"say":"But look how hard it presses itself against the axis near the origin. At one it is about zero point three seven. At a half it is down to eighteen thousandths. At a fifth it is ten to the minus eleven, and at a tenth, ten to the minus forty four.","live":null,"does":[[694.2249791666668,"table is shown on the screen, written out."],[700.0299791666667,"table is shown on the screen, written out."],[702.8049791666668,"table is shown on the screen, written out."],[705.9739791666668,"table is shown on the screen, written out."],[708.8649791666668,"table is shown on the screen, written out."]]},{"start":710.3469791666668,"say":"That is not merely small. That is flatter than any polynomial can manage. x to the tenth, at a tenth, is ten to the minus ten, and f is already thirty orders of magnitude below that. The exponential crushes every power.","live":null,"does":[[712.9009791666668,"point is shown on the screen, grown."],[714.9009791666668,"point is hidden from the screen."],[725.7414791666667,"f_def is hidden from the screen — left the board."],[725.7414791666667,"head_flat is hidden from the screen — left the board."],[725.7414791666667,"table is hidden from the screen — left the board."]]},{"start":726.3414791666668,"say":"Now differentiate it. Away from zero the derivative is two over x cubed, times the same exponential. The two over x cubed blows up as x approaches the origin, but the exponential goes to zero faster than any power can blow up. So the limit is zero.","live":["axes","f_plot"],"does":[[726.3414791666668,"head_zero is shown on the screen, written out."],[731.4029791666668,"derivs is shown on the screen, written out."],[743.4309791666668,"derivs is shown on the screen, written out."]]},{"start":745.4009791666668,"say":"Differentiate again and you get another rational function of one over x, times that same exponential, and the same thing happens. Every single derivative at zero comes out zero. Not small. Zero.","live":["axes","f_plot","head_zero"],"does":[[754.4569791666668,"derivs is shown on the screen, written out."],[755.6759791666668,"derivs (the \"0#2\" part) is emphasized."]]},{"start":760.8269791666668,"say":"So feed those into the recipe. Every coefficient is a derivative at zero over a factorial, and every one of those derivatives is zero. So every coefficient is zero, and the Taylor series of this function is the zero function.","live":null,"does":[[760.8269791666668,"derivs (the \"0#2\" part) is no longer emphasized."],[772.3909791666667,"zero_series is shown on the screen, written out."],[775.2704791666667,"zero_series moves to a new place on the board."],[775.2704791666667,"derivs is hidden from the screen — left the board."],[775.2704791666667,"head_zero is hidden from the screen — left the board."]]},{"start":775.8704791666668,"say":"Draw it. There it is, in red, lying flat along the axis. And now ask the question we have been asking all along. How wrong is it? Put a dot on the function and a dot on its series, and walk them out.","live":["axes","f_plot","zero_series"],"does":[[775.8704791666668,"head_moral is shown on the screen, written out."],[778.6919791666668,"t_plot is shown on the screen, written out."],[787.8059791666668,"dot_f is shown on the screen, written out."],[787.8059791666668,"dot_t is shown on the screen, written out."]]},{"start":792.1784791666668,"say":"They come apart immediately. Out at two point four the gap is nearly the whole height of the picture. Walk back in and it shrinks, but it never actually closes until you are standing at the origin itself.","live":["axes","f_plot","zero_series","head_moral","t_plot","dot_f","dot_t"],"does":[[794.8839791666668,"dot_f is redrawn as the numbers it depends on change."],[794.8839791666668,"dot_t is redrawn as the numbers it depends on change."],[794.8839791666668,"probe ticks to 2.4."],[799.3079791666669,"dot_f is redrawn as the numbers it depends on change."],[799.3079791666669,"dot_t is redrawn as the numbers it depends on change."],[799.3079791666669,"probe ticks to 0.6."]]},{"start":805.3294791666668,"say":"And here is the thing that should bother you. Adding more terms does nothing at all, because every term is zero. The remainder is the whole function, at every degree, forever.","live":null,"does":[[812.7719791666668,"remainder_eq is shown on the screen, written out."]]},{"start":816.9824791666667,"say":"So this series converges. It converges on the entire real line, beautifully, instantly, with infinite radius of convergence. And it converges to the wrong thing. It agrees with the function it came from at exactly one point, the point we built it at, and nowhere else.","live":["axes","f_plot","zero_series","remainder_eq","head_moral","t_plot","dot_f","dot_t"],"does":[[827.9999791666668,"moral is shown on the screen, written out."],[831.0769791666668,"point_2 is shown on the screen, grown."],[833.0769791666668,"point_2 is hidden from the screen."]]},{"start":835.8854791666668,"say":"Which kills the comfortable picture of what a Taylor series is. It is not a decomposition of a function. It is a list of derivatives at one point, and derivatives at one point can be completely blind to what the function does anywhere else.","live":["axes","f_plot","zero_series","remainder_eq","moral","head_moral","t_plot","dot_f","dot_t"],"does":[[850.0265208333335,"axes is hidden from the screen — left the board."],[850.0265208333335,"f_plot is hidden from the screen — axes left the board."],[850.0265208333335,"t_plot is hidden from the screen — axes left the board."],[850.0265208333335,"dot_f is hidden from the screen — axes left the board."],[850.0265208333335,"dot_t is hidden from the screen — axes left the board."],[850.0265208333335,"head_moral is hidden from the screen — left the board."],[850.0265208333335,"moral is hidden from the screen — left the board."],[850.0265208333335,"remainder_eq is hidden from the screen — left the board."],[850.0265208333335,"zero_series is hidden from the screen — left the board."]]}]},{"title":"What the Theorem Actually Says","start":851.0681875000001,"end":978.6010000000001,"objects":{"final":"a Math [text] that says \"$sin x = sum_(k = 0)^oo frac((-1)^k, (2 k + 1)!) x^(2 k + 1)$\"","final_note":"a Text [text] that says \"and this holds for every real $x$, because the remainder is squeezed below $|x|^(n+1)$ over $(n+1)!$, which tends to zero.\"","flat_a":"a Math [text] that says \"$T(x) = 0$\"","flat_b":"a Math [text] that says \"$R_n(x) = f(x) eq.not 0$\"","head_last":"a Heading that says \"What the Theorem Actually Says\"","head_two":"a Heading that says \"Two Series, Two Fates\"","item_1":"a Text [text] that says \"1. Taylor's theorem is an equality, not an approximation: $f(x) = P_n(x) + R_n(x)$.\"","item_2":"a Text [text] that says \"2. The series represents $f$ only where $R_n(x) -> 0$. That is a claim about the remainder, and it has to be proved.\"","item_3":"a Text [text] that says \"3. A series can converge, with infinite radius, and still converge to something other than the function it came from.\"","label_flat":"a Tex [text] that says \"$e^(-frac(1, x^2))$: the remainder does not\" (underline=True)","label_sine":"a Tex [text] that says \"$sin x$: the remainder dies\" (underline=True)","sine_a":"a Math [text] that says \"$|R_n(x)| <= frac(|x|^(n + 1), (n + 1)!)$\"","sine_b":"a Math [text] that says \"$R_n(x) -> 0$\""},"beats":[{"start":851.0681875000001,"say":"So put the two cases next to each other. For sine we could bound the remainder, and the bound went to zero for every x. That is precisely why we are allowed to write an equals sign between the function and its series.","live":[],"does":[[851.0681875000001,"head_two is shown on the screen, written out."],[853.9471875000002,"label_sine is shown on the screen, written out."],[855.0501875000001,"sine_a is shown on the screen, written out."],[857.1171875000001,"sine_b is shown on the screen, written out."]]},{"start":865.0776875000001,"say":"For the flat function, the series was the zero function and the remainder was the whole of f, at every degree. It never went anywhere. So there is no equals sign to be had, except at the single point x equals zero.","live":["label_sine","sine_a","sine_b","head_two"],"does":[[865.7971875000002,"label_flat is shown on the screen, written out."],[867.8171875000002,"flat_a is shown on the screen, written out."],[871.4741875000001,"flat_b is shown on the screen, written out."]]},{"start":880.2476875000001,"say":"And notice what did the deciding in both cases. Not the terms. Not how fast the coefficients shrink. Not even whether the series converges. It was the remainder that settled it, both times, and nothing else in the argument mattered at all.","live":["label_sine","sine_a","sine_b","label_flat","flat_a","flat_b","head_two"],"does":[[891.7531875000001,"sine_b (the \"R_n(x)\" part) is emphasized."],[891.7531875000001,"flat_b (the \"R_n(x)\" part) is emphasized."],[895.6191875000002,"sine_b (the \"R_n(x)\" part) is no longer emphasized."],[895.6191875000002,"flat_b (the \"R_n(x)\" part) is no longer emphasized."],[896.7571875000001,"flat_a is hidden from the screen — left the board."],[896.7571875000001,"flat_b is hidden from the screen — left the board."],[896.7571875000001,"head_two is hidden from the screen — left the board."],[896.7571875000001,"label_flat is hidden from the screen — left the board."],[896.7571875000001,"label_sine is hidden from the screen — left the board."],[896.7571875000001,"sine_a is hidden from the screen — left the board."],[896.7571875000001,"sine_b is hidden from the screen — left the board."]]},{"start":897.3571875000001,"say":"So, three things to carry away. First, Taylor's theorem is not an approximation. It is an equality. The function is the polynomial plus the remainder, exactly, for every x and every n. There is nothing to be wrong about until you throw the remainder away.","live":[],"does":[[897.3571875000001,"head_last is shown on the screen, written out."],[900.7581875000001,"item_1 is shown on the screen, written out."]]},{"start":917.1831875000001,"say":"Second, the series represents the function only where the remainder tends to zero. That is a limit statement, and it has to be proved. For sine we proved it, with the factorial. For the flat function it is plainly false.","live":["item_1","head_last"],"does":[[917.5311875000001,"item_2 is shown on the screen, written out."]]},{"start":934.0606875000001,"say":"And third, the one that catches people. A series converging is not the same thing as a series converging to the right answer. Our last example converged everywhere on the line and was wrong everywhere except one point.","live":["item_1","item_2","head_last"],"does":[[934.6991875000001,"item_3 is shown on the screen, written out."],[947.9816875000001,"item_1 is hidden from the screen — left the board."],[947.9816875000001,"item_2 is hidden from the screen — left the board."],[947.9816875000001,"item_3 is hidden from the screen — left the board."]]},{"start":948.5816875000002,"say":"So here is the statement, whole. Sine of x is the sum from k equals zero to infinity of minus one to the k, times x to the two k plus one, over two k plus one factorial.","live":["head_last"],"does":[[949.5451875000001,"final is shown on the screen, written out."],[961.5731875000001,"final_note is shown on the screen, written out."]]},{"start":963.2411875000001,"say":"And that equals sign is not notation. It is a theorem, and the thing holding it up is a bound on the remainder that goes to zero for every x. The series is the part you can see. The remainder is the part that decides.","live":["head_last","final","final_note"],"does":[[966.8171875000002,"A box is drawn around final."],[977.5593333333335,"final is hidden from the screen — left the board."],[977.5593333333335,"final_note is hidden from the screen — left the board."],[977.5593333333335,"head_last is hidden from the screen — left the board."]]}]}]},"durationSeconds":979,"chapters":[{"title":"Building the Polynomial","startSeconds":0,"narration":"Every function a machine can actually compute is built out of adding and multiplying. That is what a polynomial is. Sine is not one, so when your calculator reports a sine it is not doing trigonometry at all. It is evaluating a polynomial, and this lecture is about which one, and how far you can trust it. So here is the question. Sine is not a polynomial. Can we build one that behaves like it near zero, and how close can we actually get? I will tell you the destination first, because the destination is not the hard part. This is it. Sine of x equals x, minus x cubed over three factorial, plus x to the fifth over five factorial, and on forever. Every hard question in this lecture is hiding in that equals sign. So where do those numbers come from? Nowhere clever. Suppose I want a polynomial that behaves like f near zero, and the only tool I have is that I can force the two of them to agree at a single point: same value, same slope, same bend. So write the polynomial down with its coefficients still unknown. a nought, plus a one x, plus a two x squared, and so on. Now set x to zero. Every term carrying an x dies, and all that is left is a nought. Now differentiate. The constant vanishes, a one is standing there on its own, and everything after it still carries an x. Set x to zero again, and out falls a one. Differentiate once more. The square brings a two down in front, so a two ends up doubled, and setting x to zero leaves a two as the second derivative at zero, over two. And you can see the pattern. Each derivative strips one more coefficient bare, and the number it picks up in front is a factorial. So the k-th coefficient is the k-th derivative of f at zero, divided by k factorial. Stack them up and that is the Taylor polynomial of f about zero. Every coefficient is one derivative at one point. Nothing else about the function is used anywhere. Now aim it at sine. The derivatives of sine go round in a circle. Differentiate and you get cosine, then minus sine, then minus cosine, and then you are back where you started. Evaluate all of them at zero. Sine of zero is nothing. Cosine of zero is one. Minus sine of zero is nothing again, and minus cosine of zero is minus one. Look what that does. Every even coefficient has a zero on top, so every even power of x is wiped out. What survives is the odd powers, one, three, five, seven, with the signs flipping each time. So here is the machine running, against the curve itself. The crudest match uses one term, a nought, which is sine of zero, which is nothing. That polynomial is the constant zero, and on this picture it is the horizontal axis. It agrees with sine at exactly one point and nowhere else. Take one more term. The next coefficient is cosine of zero, which is one, so the first polynomial is simply x. That is the tangent line at the origin, and close in it is genuinely good. But watch it leave. By x equals two the line is still climbing and sine has already turned over. So add the next term, minus x cubed over six, and look what it does. It bends the line down, exactly where the line was going wrong. That is the whole idea in one picture. Every new term is a correction. Near zero it is negligible, because a high power of a small number is tiny. It only speaks up once you are far enough out for the previous curve to have failed. Add the fifth power term and the same thing happens one hump further out. Add the seventh and it happens again. Each polynomial tracks sine a little longer before it gives up and shoots off. Let me put a dot on sine and a dot on the seventh degree polynomial and walk them out. Near zero you cannot tell them apart. Past three they are still on top of each other. And then, quite suddenly, they are not. Which raises the only question worth asking about any of this. How wrong is the polynomial at a given x, and does taking more terms really drive that wrongness to zero? That gap has a name, and it is the real content of Taylor's theorem."},{"title":"How Wrong Is It?","startSeconds":303.7164791666667,"narration":"So let us look at that gap directly. Here is sine again, and here is the cubic we built, x minus x cubed over six. Same picture as before, except that now I want to measure the distance between the two curves. Call that distance the remainder. R three of x is sine of x minus P three of x, and it is nothing more than the vertical gap between the blue curve and the green one at whichever x you are standing at. Walk in toward zero and it closes so fast you cannot see it happen. At a half the two curves differ by about two ten-thousandths. On this picture that is thinner than the line itself. Now walk out. At two the gap is already obvious. At three it is enormous. Sine is up near a seventh and the cubic has dived past minus one and a half. Same polynomial, same degree. All that changed is how far we walked. Raising the degree buys you distance, not safety. Here is the seventh degree polynomial on the same picture. It holds on out past four, which is much better, and then it does exactly the same thing. Every fixed polynomial eventually leaves. So here is what Taylor's theorem actually says, and notice how little of it is the series. The function equals the polynomial, plus a remainder. That is an exact statement with no approximation anywhere in it. The whole question is what the remainder is. And Lagrange gives that remainder to us in closed form. It is the n plus first derivative of f, taken at some point c between zero and x, times x to the n plus one, over n plus one factorial. Hold it next to the terms we were adding. It is exactly the shape of the next term of the series, except for one thing. The derivative is taken at c, somewhere in the middle, rather than at zero. And the theorem never tells you where c is. Now watch what that buys us for sine. Every derivative of sine is plus or minus a sine or a cosine. So whatever c turns out to be, that derivative is at most one in size, and we never need to know c at all. So the remainder is trapped below x to the n plus one, over n plus one factorial. Pure arithmetic, with no trigonometry left in it. And now look at what that quantity does as n grows. Take x equal to ten, a long way from the centre. With five terms the bound is over eight hundred, which is useless. With ten it is worse, nearly three thousand. The powers of ten are still beating the factorial. But factorials win in the end. By fifteen the bound has turned over. By twenty it is forty. By thirty it is four thousandths, and by forty it is a hundred-millionth. And ten is not special. Fix any x you like, however enormous, and x to the m over m factorial goes to zero as m grows, because eventually the factorial is multiplying by numbers larger than x at every single step. Which is the sentence we were actually after. The remainder for sine dies, everywhere. So the series really does add up to sine, at every real number. Not nearly. Exactly. And it was the remainder that proved it, not the terms."},{"title":"Where the Series Stops Converging","startSeconds":518.1036458333334,"narration":"Sine was the happy case. Here is a function that is not. g of x is one over one plus x squared. Smooth everywhere, bounded, no corners, no blow-ups. There is nothing wrong with it anywhere on the real line. Its Taylor series about zero is easy to get, because you have already seen it. A geometric series sums to one over one minus r, whenever r is smaller than one in size. Now put r equal to minus x squared. Out comes one, minus x squared, plus x to the fourth, minus x to the sixth, and onward. Every even power, with the signs alternating. That is the Taylor series of g about zero. Now draw two of its partial sums. Here is one minus x squared. Here is the one that runs out to the sixth power. And here are the two walls, at minus one and at plus one. Inside those walls the partial sums close in on the curve, and taking more terms makes them better. Outside them, look what happens. The sixth power sum has already dived past minus one, while the function it came from sits calmly at four tenths. And adding more terms out there does not help. It makes things worse. Past x equals one the powers of x stop shrinking, so the series has nothing to converge to at all. It is not a bad approximation. It is not an approximation. That number one has a name, and it is the thing this lecture assumed you had not met. It is the radius of convergence. Inside it the series converges. Outside it the series diverges, and there is no argument about a remainder to be had. And here is the strange part. Nothing on the real line explains why the wall sits at one. The function is perfectly happy there. The explanation lives off the real line entirely, and it is a story for another course. So that is failure number one. The series simply stops converging past a certain distance. It is a nuisance, but it is honest, because it tells you it has given up. The second failure is far worse, because it tells you nothing at all."},{"title":"Converging to the Wrong Thing","startSeconds":659.3789791666668,"narration":"Here is the function that ends this story. For x away from zero, f of x is e to the minus one over x squared, and at zero we define it to be zero. It is a perfectly ordinary looking curve. It rises from nothing on the left, flattens right out at the origin, and rises again. And it is smooth. Infinitely differentiable, everywhere, including at zero. That takes a little work to prove, but it is true. So Taylor's recipe applies to it with no complaint whatsoever. But look how hard it presses itself against the axis near the origin. At one it is about zero point three seven. At a half it is down to eighteen thousandths. At a fifth it is ten to the minus eleven, and at a tenth, ten to the minus forty four. That is not merely small. That is flatter than any polynomial can manage. x to the tenth, at a tenth, is ten to the minus ten, and f is already thirty orders of magnitude below that. The exponential crushes every power. Now differentiate it. Away from zero the derivative is two over x cubed, times the same exponential. The two over x cubed blows up as x approaches the origin, but the exponential goes to zero faster than any power can blow up. So the limit is zero. Differentiate again and you get another rational function of one over x, times that same exponential, and the same thing happens. Every single derivative at zero comes out zero. Not small. Zero. So feed those into the recipe. Every coefficient is a derivative at zero over a factorial, and every one of those derivatives is zero. So every coefficient is zero, and the Taylor series of this function is the zero function. Draw it. There it is, in red, lying flat along the axis. And now ask the question we have been asking all along. How wrong is it? Put a dot on the function and a dot on its series, and walk them out. They come apart immediately. Out at two point four the gap is nearly the whole height of the picture. Walk back in and it shrinks, but it never actually closes until you are standing at the origin itself. And here is the thing that should bother you. Adding more terms does nothing at all, because every term is zero. The remainder is the whole function, at every degree, forever. So this series converges. It converges on the entire real line, beautifully, instantly, with infinite radius of convergence. And it converges to the wrong thing. It agrees with the function it came from at exactly one point, the point we built it at, and nowhere else. Which kills the comfortable picture of what a Taylor series is. It is not a decomposition of a function. It is a list of derivatives at one point, and derivatives at one point can be completely blind to what the function does anywhere else."},{"title":"What the Theorem Actually Says","startSeconds":851.0681875000001,"narration":"So put the two cases next to each other. For sine we could bound the remainder, and the bound went to zero for every x. That is precisely why we are allowed to write an equals sign between the function and its series. For the flat function, the series was the zero function and the remainder was the whole of f, at every degree. It never went anywhere. So there is no equals sign to be had, except at the single point x equals zero. And notice what did the deciding in both cases. Not the terms. Not how fast the coefficients shrink. Not even whether the series converges. It was the remainder that settled it, both times, and nothing else in the argument mattered at all. So, three things to carry away. First, Taylor's theorem is not an approximation. It is an equality. The function is the polynomial plus the remainder, exactly, for every x and every n. There is nothing to be wrong about until you throw the remainder away. Second, the series represents the function only where the remainder tends to zero. That is a limit statement, and it has to be proved. For sine we proved it, with the factorial. For the flat function it is plainly false. And third, the one that catches people. A series converging is not the same thing as a series converging to the right answer. Our last example converged everywhere on the line and was wrong everywhere except one point. So here is the statement, whole. Sine of x is the sum from k equals zero to infinity of minus one to the k, times x to the two k plus one, over two k plus one factorial. And that equals sign is not notation. It is a theorem, and the thing holding it up is a bound on the remainder that goes to zero for every x. The series is the part you can see. The remainder is the part that decides."}]}}
