<jupyter_start><jupyter_text>Partial FractionsIn this notebook, we introduce another essential tool in the evaluation of integrals, namely the method of partial fractions.   1. MotivationIt is true that $$\frac{1}{x^2-16} = \frac{1}{(x-4)(x+4)} = \frac{1}{8} \left[ \frac{1}{x-4} - \frac{1}{x+4} \right].$$You can verify this by working backwards, that is, by starting from the right-hand side and making a common denominator (you should go ahead and do this - be sure to carefully keep track of negative signs).Although we cannot readily integrate the left-hand side, we can readily integrate the right-hand side.  We then get \begin{align}\int \frac{dx}{x^2-16} & = \frac{1}{8} \left[ \int \frac{dx}{x-4} - \int \frac{dx}{x+4} \right] \\ & = \frac{1}{8} \left[ \ln | x-4 | - \ln | x+4| \right] + C \\& = \frac{1}{8} \ln \left| \frac{x-4}{x+4} \right| + C.\end{align}The key to making progress in the previous example was to write a 'complicated' rational function (in this case $\frac{1}{x^2-16})$ as a sum of simpler functions.> Recall: A rational function is of the form $\displaystyle \frac{P(x)}{Q(x)}$, where both $P(x)$ and $Q(x)$ are polynomials.Partial fraction decomposition, or simply 'partial fractions', is a systematic method to write a rational function as a sum of simpler functions. 2. Overview of Partial Fraction DecompositionConsider a rational function $\displaystyle \frac{P(x)}{Q(x)}$ such that the degree of $P(x)$ is less than the degree of $Q(x)$.Then the steps to determine the partial fraction decomposition are as follows:1. Factor $Q(x)$ as far as possible.> In MATH 136, we will restrict ourselves to the case where $Q(x)$ is a product of distinct linear factors.2. Write the partial fraction decomposition using the rule that any linear factor $ax+b$ in $Q(x)$ gives rise to a partial fraction of the form $$\frac{A}{ax+b},$$ where $A$ is an unknown to be determined in step 3.> Example: $$\frac{4x^2+14x-2}{(x-1)(x+1)(x+3)} = \frac{A}{x-1} + \frac{B}{x+1} + \frac{C}{x+3}.$$3. Solve for the unknowns ($A$, $B$, $C$, etc.).Once you have solved for the unknowns, you can proceed with any integration if needed. 3. One ExampleIn the next video, we will work through the example $\displaystyle \int \frac{4x^2 + 14x - 2}{x^3 + 3x^2-x-3} \ dx$.  Note that the degree of the polynomial in the numerator is 2, and the degree of the polynomial in the denominator is 3.  So the degree in the numerator is less than the degree in the denominator, and it is OK to proceed with partial fraction decomposition.NOTE: The video was created before this notebook, and covers the introduction above.  You may skip through the first 2 minutes or so and start viewing at 2:44.<jupyter_code>from IPython.display import YouTubeVideo
YouTubeVideo('1pmFeBjLCKo')<jupyter_output><empty_output><jupyter_text>4. A Second Method to Solve for the UnknownsIn the previous video, we showed one method to solve for the unknowns (let's refer to it as 'Tollo's Method').  It is a method that works really well for the case that $Q(x)$ is a product of distinct linear factors.  In the next video, we show a second method to solve for the unknowns ('Gerla's Method').<jupyter_code>from IPython.display import YouTubeVideo
YouTubeVideo('WKOJPPwSSRQ')<jupyter_output><empty_output><jupyter_text>All right, so now we have two methods that we can use to solve for the unknowns.  You have a choice: you may use either Tollo's Method or Gerla's Method.  Which do you like best? 5. CAUTION! A Long Division Step May Be Needed Before Proceeding with a Partial Fraction DecompositionUp to now, we have considered rational functions $\displaystyle \frac{P(x)}{Q(x)}$ where the degree of $P(x)$ is less than the degree of $Q(x)$.This raises the question what to do when the degree of $P(x)$ is the same or larger than the degree of $Q(x)$.> Example: The rational function $$\frac{4x^2+3x+2}{x^2+x-2}$$ has a polynomial with degree 3 in the numerator and a polynomial with degree 2 in the denominator.  Since the degree in the numerator is larger than the degree in the denominator, we cannot proceed immediately with the partial fraction decomposition.In these cases, it is necessary to take the preliminary step of using long division to divide $Q(x)$ into $P(x)$ and obtain  $$\frac{P(x)}{Q(x)} = S(x) + \frac{R(x)}{Q(x)},$$where $S(x)$ is a polynomial and $\displaystyle \frac{R(x)}{Q(x)}$ is a rational function such that the degree of $R(x)$ is less than the degree of $Q(x)$.  The partial fraction decomposition then can proceed for the rational function on the right-hand side, $\displaystyle \frac{R(x)}{Q(x)}$.In the next video, we work through the example $\displaystyle \int \frac{4x^2 + 3x+2}{x^2+x-2} \ dx$.<jupyter_code>from IPython.display import YouTubeVideo
YouTubeVideo('uo-Ybafwoug')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11558414608840008, 'fraction_numerical': 0.017638514214567337, 'mean_word_length': 4.690672963400236, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '663969', 'license': 'Apache-2.0', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1417, 'n_words': 679, 'path': 'PartialFractions.ipynb', 'repo_name': 'gerdadevries/MATH136Notebooks', 'size': '4819'}