Antiderivative of a rational function

Click For Summary

Homework Help Overview

The discussion revolves around finding the antiderivative of the rational function $$ \int \frac{x^2+8x+4}{x^2+4x+8} dx $$, which falls under the subject area of calculus, specifically integration techniques for rational functions.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • The original poster attempts polynomial division and substitution to simplify the integral. They express concern over a slight discrepancy between their result and the book's answer, prompting them to seek help in identifying potential errors in their calculations.
  • Some participants question the necessity of absolute value signs in the logarithmic expressions, suggesting that they may complicate further simplification.
  • Others suggest that the differences in results may not be significant due to the nature of indefinite integrals and the properties of logarithms.

Discussion Status

The discussion is ongoing, with participants providing insights into the original poster's calculations. Some guidance has been offered regarding the simplification of logarithmic terms, and there is an exploration of whether the discrepancies in answers are meaningful or not. The original poster expresses a desire to focus on identifying mistakes rather than exploring alternative methods.

Contextual Notes

The original poster indicates that they are not interested in alternative methods of solving the problem but rather in pinpointing errors in their approach. This focus shapes the nature of the discussion, as participants aim to clarify specific aspects of the calculations presented.

Rectifier
Gold Member
Messages
313
Reaction score
4
I am trying to find primitives to the rational function below but my answer differs from the answer in the book only slightly and now, I am asking for your help to find the error in my solution. This solution is long since I try to include all the steps in the process.

The problem

$$ \int \frac{x^2+8x+4}{x^2+4x+8} dx $$

Relevant equations

$$ \int \frac{1}{x} dx = \ln |x| + C \\
\int \frac{1}{x^2+1} dx =arctan x + C
$$

The attempt at a solution

I am starting with a polynomial division and rewrite the fraction as
## \int \frac{x^2+8x+4}{x^2+4x+8} dx = \int 1 + \frac{4x-4}{x^2+4x+8} dx ##

Since divisor is irreducible, I must complete the square and adapt the quotient to use the standard formula for a function that has a primitive which is ##arctan x +C## as follows.

$$ \int 1 + \frac{4x-4}{x^2+4x+8} dx = x + \int \frac{4x-4}{(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{\frac{4}{4}(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{4 \left( \frac{(x+2)^2}{4}+1 \right)} dx \\ x + \int \frac{4(x-1)}{4 \left( \left( \frac{x+2}{2} \right)^2+1 \right)} dx \\ x + \int \frac{x-1}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I split the qotent:
$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx $$

Lets focus on the part that has ##x## as divisor.

$$ \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I perform a variable substitutution ## [t= \frac{x+2}{2} \Leftrightarrow x = 2t-2, \frac{dt}{dx} = \frac{1}{2} \Leftrightarrow 2 dt = dx] ##. That results in

$$\int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx = 2 \left( \int \frac{2t-2}{ t^2+1} dt \right) = 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt$$

I split the quotient once more and focus on the part that has ##2t## as divisor where I make one more variable substitution ##[g=t^2+1, \frac{dg}{dt}=2t \Leftrightarrow 2t dt = dg]##

$$ 2 \int \frac{2t}{ t^2+1} dt = 2 \int \frac{1}{g} dg = 2 \ln|g| + C = 2 \ln|t^2+1| + C = \ln| \left(\frac{x+2}{2} \right)^2 + 1|+ C$$
I use back-substitution in the last steps.Now, let's add the rest of the integrals that we didn't focus on before:

$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx \\ x + \ \ 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1}\\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 4 \arctan t - 2 \arctan(\left(\frac{x+2}{2} \right)) + C \\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 6 \arctan(\left(\frac{x+2}{2} \right)) + C$$

I am not interested in alternative ways to solve the problem but to find the error in my calculations.

Please help.

The part that differs from the answer in my book is inside ## \ln ## and not by much (see spoiler)
It differs only by a multiple of 4. In my book the contents of ln are: 2 \ln( x^2 + 4x + 8 )
.
 
Physics news on Phys.org
The two answers are equivalent. It is an indefinite integral so any multiplicative factors in the argument of the ##\ln## can simply be absorbed into the undetermined constant i.e. ##\ln (4 f(x)) + C = \ln (f(x)) + \ln 4 + C = \ln (f(x)) + C'##.
 
  • Like
Likes   Reactions: Rectifier
Rectifier said:
I am trying to find primitives to the rational function below but my answer differs from the answer in the book only slightly and now, I am asking for your help to find the error in my solution. This solution is long since I try to include all the steps in the process.

The problem

$$ \int \frac{x^2+8x+4}{x^2+4x+8} dx $$

Relevant equations

$$ \int \frac{1}{x} dx = \ln |x| + C \\
\int \frac{1}{x^2+1} dx =arctan x + C
$$

The attempt at a solution

I am starting with a polynomial division and rewrite the fraction as
## \int \frac{x^2+8x+4}{x^2+4x+8} dx = \int 1 + \frac{4x-4}{x^2+4x+8} dx ##

Since divisor is irreducible, I must complete the square and adapt the quotient to use the standard formula for a function that has a primitive which is ##arctan x +C## as follows.

$$ \int 1 + \frac{4x-4}{x^2+4x+8} dx = x + \int \frac{4x-4}{(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{\frac{4}{4}(x+2)^2+4} dx \\ x + \int \frac{4(x-1)}{4 \left( \frac{(x+2)^2}{4}+1 \right)} dx \\ x + \int \frac{4(x-1)}{4 \left( \left( \frac{x+2}{2} \right)^2+1 \right)} dx \\ x + \int \frac{x-1}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I split the qotent:
$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx $$

Lets focus on the part that has ##x## as divisor.

$$ \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx $$

I perform a variable substitutution ## [t= \frac{x+2}{2} \Leftrightarrow x = 2t-2, \frac{dt}{dx} = \frac{1}{2} \Leftrightarrow 2 dt = dx] ##. That results in

$$\int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx = 2 \left( \int \frac{2t-2}{ t^2+1} dt \right) = 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt$$

I split the quotient once more and focus on the part that has ##2t## as divisor where I make one more variable substitution ##[g=t^2+1, \frac{dg}{dt}=2t \Leftrightarrow 2t dt = dg]##

$$ 2 \int \frac{2t}{ t^2+1} dt = 2 \int \frac{1}{g} dg = 2 \ln|g| + C = 2 \ln|t^2+1| + C = \ln| \left(\frac{x+2}{2} \right)^2 + 1|+ C$$
I use back-substitution in the last steps.Now, let's add the rest of the integrals that we didn't focus on before:

$$ x + \int \frac{x}{ \left( \frac{x+2}{2} \right)^2+1} dx - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1} dx \\ x + \ \ 2 \int \frac{2t}{ t^2+1} dt - 2 \cdot 2 \int \frac{1}{ t^2+1} dt - \int \frac{1}{ \left(\frac{x+2}{2} \right)^2+1}\\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 4 \arctan t - 2 \arctan(\left(\frac{x+2}{2} \right)) + C \\ x + \ \ 2\ln| \left(\frac{x+2}{2} \right)^2 + 1| - 6 \arctan(\left(\frac{x+2}{2} \right)) + C$$

I am not interested in alternative ways to solve the problem but to find the error in my calculations.

Please help.

The part that differs from the answer in my book is inside ## \ln ## and not by much (see spoiler)
It differs only by a multiple of 4. In my book the contents of ln are: 2 \ln( x^2 + 4x + 8 )
.

You have unnecessary absolute-value signs ##| \ldots |##, and these get in the way of further simplification. In fact,
$$\int \frac{2t \, dt}{t^2+1} = \ln(t^2+1)$$
with no need for ##| \ldots |## because ##t^2+1 \geq 1## is always positive, and always has a non-negative logarithm.
 
  • Like
Likes   Reactions: Rectifier
Thank you for your help everyone.

@Ray Vickson you wrote something before that that I didn't manage to read on how to solve that more efficiently. What steps are unnecessary here?
 
Rectifier said:
Thank you for your help everyone.

@Ray Vickson you wrote something before that that I didn't manage to read on how to solve that more efficiently. What steps are unnecessary here?

I deleted it, because after posting (briefly) I noticed your statement that you were not interested in seeing other ways of doing it---only in finding your mistakes, which turned out to not be mistakes after all. However, what I said was:
$$\frac{4x-4}{(x+2)^2+4} dx = 2 \frac{ (2x+4) -6}{(x+2)^2+4} dx = 2\frac{(2x+4)\, dx}{(x+2)^2+4} - \frac{12\, dx}{(x+2)^2+4} .$$
The first term has the form ##2 \, df/f## while the second one is closely related to ##dt/(t^2+1)##.
 
  • Like
Likes   Reactions: Rectifier
Oh, thank you for reposting that! I wrote that last line since I often get alternative ways of solving the problem without them mentioning why my last solution produced a strange/wrong answer so I end up doing the same mistakes over and over again.
 

Similar threads

  • · Replies 105 ·
4
Replies
105
Views
10K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
Replies
7
Views
2K