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 04 - Integration of Rational Functions by Partial Fractions.ipynb
Views: 491
Lab 04 - Integration of Rational Functions by Partial Fractions
Overview
In this lab, we will explore writing a rational function as a sum of simpler rational functions which can be easily integrated.
Important SageMath Commands Introduced in this Lab
ParseError: KaTeX parse error: Undefined control sequence: \hfill at position 32: …|l|l|} \hline \̲h̲f̲i̲l̲l̲ ̲\textbf{Command…Related Course Material
Example 1
We will use SageMath to verify our partial fraction decomposition and our integration of the rational function The general form of the partial fraction decomposition of is In order to solve for and by hand, we would clear the denominators by multiplying both sides by the denominator original denominator. This results in the equation Setting like terms equal, we obtain the system of linear equations In the previous lab, we used the command to solve a single equation. This command will also allow us to solve a system of equations as well.
Therefore, we have that the partial fraction decomposition of our rational function is
We can use the command ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 17: …textbf{.partial_̲fraction()} to check our partial fraction decomposition of .
Therefore, we have that We can use SageMath to check that our answer is correct by using the command. Remember that SageMath uses in place of and does not include with antiderivatives.
Example 2
Again, we will use SageMath to help determine the partial fraction decomposition and the antiderivative of the function . The first thing we need to do is factor the denominator of . Let be the denominator of . Recall that is a factor of if and only if . Therefore, in order to factor the cubic , we look for numbers such that . Note that if and only if is an -intercept of . Therefore, we use SageMath to plot and determine any -intercepts.
Using the domain we see that does have an -intercept. However, we can't see exactly what it is since graph is too zoomed out. We can zoom in by choosing a smaller domain.
Therefore, we see that is an -intercept of . It follows that is a factor of . Thus, we know that where is a polynomial. We can find exactly by dividing by In order to have SageMath divide the polynomials, we use the ParseError: KaTeX parse error: Expected 'EOF', got '_' at position 14: \textbf{.full_̲simplify()} command.
Therefore, factors as . Note that is an irreducible quadratic. Thus, the factorization of the denominator of is . It follows that . Now that we have factored the denominator of , we can use partial fraction decomposition to write as the sum of simpler fractions. Recall that the general form of into partial fractions is Multiplying both sides of the equation by gives the equation Equating coefficients, we obtain the system We again use SageMath to solve this system.
You should get that and . Therefore, we have The first integral on the right side is simply In order to evaluate the second integral, we first need to split the fraction into the sum of two fractions. Note that where we used -substitution to evaluate the first integral. Therefore, we have that Use SageMath to check that this answer is correct.
Example 3
Suppose that we are trying to integrate Again, we will start by determining the partial fraciton decomposition of . First, we must factor Let's plot and try to determine -intercepts.
We can see that both and are -intercepts. Therefore, for some polynomial .
Thus, . We can factor the quadratic and obtain . Therefore, we have that It follows that Recall that the general form of the partial fraction of is you may not have covered the general form of a repeated linear term like in your class. When we have a repeated linear, the general form is a constant over each power of the linear term up to the power to which it is being raised.
Continue solving the problem by setting up a system of four linear equations and solving for and . Then, use the partial fraction decomposition to integrate .
Example 4
For each of the rational functions below, first find the partial fraction decomposition of the function by solving a system of linear equations. Then, integrate the function by hand and use SageMath to check that your integration is correct.