Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/main/142-Labs/Lab 09 - Power Series and Taylor Series.ipynb
Views: 491
Lab 09 - Power Series and Taylor Series
Overview
There are two fundamental questions to ask about a power series
For what values of does the infinite sum converge?
When the series converges, to what function does it converge? Notice that, in this case, the series is the Taylor series of the function.
We can answer the first question by finding the radius of convergence using the ratio test for absolute convergence and then checking the endpoints if needed.
The second question, is in general, much more difficult to answer. One useful technique is to apply common operation (substitution, multiplication, division, differntiation, integration, ) to a known power series, such as the Taylor series of a basic function. Also, SageMath can usually determine the function that a series converges to.
One important application of power series is to approximate a function using partial sums of its Taylor series, known as Taylor polynomials. The accuracy of the approximation depends on the size of the interval called for and the number of terms used in the partial sum. We will visualize this approximation using SageMath.
Related Course Material
Example 1
Consider the power series We will
Find the interval of convergence and radius of convergence of this series.
Find the function which this series converges to.
Plot approximations of the function using the first 10 partial sums of its Taylor series.
We will find the interval of convergence for the series using the ratio test for absolute convergence. We first define the terms in SageMath.
The first step in the ratio test for absolute convergence is to find all that make Let us find an expression for .
Therefore, we need to find all such that . We can easily solve this inequality and get We also could have used SageMath.
Therefore, the radius of convergence is 5. We need to check the what happens at the endpoints and . We will create the sum in SageMath and evaluate it at these endpoints. In order to define the sum, we need to use the command to force to be in the interval of convergence.
Therefore, we see that the series converges at but diverges at . Thus, the interval of convergence is
Remember that SageMath uses for . It follows that for Note that we could have found this without using SageMath by using the Taylor series for given above and replacing with
Now that we have found the function which the power series converges to, we will use the interactive plotting function ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 13: \textbf{Plot_̲Taylor_Polynomi… located in the ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 14: \textbf{uofsc_̲calculus_labs} package to plot approximations of the function by plotting its first 10 Taylor Polynomials.
Recall that if you get the error "No module named uofsc_calculus_labs", then you need to install it using the command below.
If you are using a lab computer or the Binder server, then you will not be able to use ParseError: KaTeX parse error: Unexpected end of input in a macro argument, expected '}' at end of input: \textbf{%pip}; however, ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 14: \textbf{uofsc_̲calculus_labs} should already be installed.
To use the interactive plotting function, run the command below. Change the function in to the function that the power series converges to. Also, change the center and radius of convergence to the appropriate values for the series.
Example 2
For the following power series, do the following:
Find the interval of convergence and radius of convergence of the series.
Find the function which the series converges to.
Use the interactive plotting tool to plot approximations of the function using the first 10 partial sums of its Taylor series.