Integral with partial fractions

In summary, the student is having trouble getting the final answer in Wolfram to match the answer they get when they rewrite the function in a way that avoids one of the partial fraction decompositions.
  • #1
QuantumCurt
Education Advisor
726
166

Homework Statement



I'm currently in Calculus 3, and the professor gave us a "retro assignment" which is basically a bunch of tough integrals from Calculus 2. I think my process here is valid, but when I check my answer on Wolfram, they're getting a slightly different final answer.

$$\int\frac{x+6}{x^2(x-3)}dx$$

The Attempt at a Solution



Upon first examination, two possibilities popped out at me.

I could rewrite the function as a sum of two fractions

$$\int[\frac{x}{x^2(x-3)}+\frac{6}{x^2(x-3)}]dx$$
$$\int[\frac{1}{x(x-3)}+\frac{6}{x^2(x-3)}]dx$$

This works, but also involves two partial fraction decompositions. The second possibility that popped out at me was to rewrite the integral in a way that avoided one of the partial fraction decompositions.

$$\int\frac{x+6}{x^2(x-3)}dx$$
$$\int\frac{x-3+9}{x^2(x-3)}dx$$
$$\int[\frac{x-3}{x^2(x-3)}+\frac{9}{x^2(x-3)}]dx$$
$$\int[\frac{1}{x^2}+\frac{9}{x^2(x-3)}]dx$$
$$-\frac{1}{x}+9\int\frac{1}{x^2(x-3)}dx$$

Now I've eliminated one of the partial fraction decompositions. I still have to do a decomposition on the second term.

$$\frac{1}{x^2(x-3)}$$
$$\frac{1}{x^2(x-3)}=\frac{A}{x}+\frac{B}{x^2}+\frac{C}{(x-3)}$$

Then I multiply by the common denominator

$$1=Ax(x-3)+B(x-3)+Cx^2$$

I can see right away that by letting ##x=0## I get

$$1=-3B \Rightarrow B=-\frac{1}{3}$$

Similarly, if I let ##x=3##, I get

$$1=9C \Rightarrow C=\frac{1}{9}$$

That gives me two of my constants, but there's no immediately apparent value to find ##A##, so I rewrite the decomposition as

$$1=Ax(x-3)-\frac{1}{3}(x-3)+\frac{1}{9}x^2$$
$$9=9Ax(x-3)-3(x-3)+x^2$$

Then I let ##x## be an arbitrary value of 1

$$9=9A(-2)-3(-2)+1$$
$$A=-\frac{1}{9}$$

Now I can rewrite my integral as

$$-\frac{1}{x}+9\int[\frac{C}{x-3}+\frac{A}{x}+\frac{B}{x^2}]dx$$
$$-\frac{1}{x}+9\int[\frac{\frac{1}{9}}{x-3}-\frac{\frac{1}{9}}{x}-\frac{\frac{1}{3}}{x^2}]dx$$
$$-\frac{1}{x}+\int[\frac{1}{x-3}-\frac{1}{x}-\frac{3}{x^2}]dx$$
$$-\frac{1}{x}+\ln(x-3)-\ln(x)+\frac{3}{x}+C$$

Which then simplifies to

$$\frac{2}{x}+\ln(\frac{x-3}{x})+C$$

Now, when I check my answer in Wolfram, it gives me a solution of

$$\frac{2}{x}+\ln(3-x)-\ln(x)+C$$

Which reduces to

$$\frac{2}{x}+\ln(\frac{3-x}{x})+C$$

This solution has ##3-x## inside of the logarithm instead of the ##x-3## that I obtained. Did I introduce some kind of error in the way I initially broke the function of by subtracting 3 and adding 9? I've looked it over several times now and I can't find any arithmetic mistakes anywhere. Any help would be very much appreciated. :)
 
Physics news on Phys.org
  • #2
I'm pretty sure you lost the sign on your A.
 
  • #3
Are you sure? I just pulled it out in front of the whole fraction when I substituted the numerical values in.

$$-\frac{1}{x}+9\int[\frac{C}{x-3}+\frac{A}{x}+\frac{B}{x^2}]dx$$
$$-\frac{1}{x}+9\int[\frac{\frac{1}{9}}{x-3}-\frac{\frac{1}{9}}{x}-\frac{\frac{1}{3}}{x^2}]dx$$
 
  • #4
@QuantumCurt, I haven't checked your work... When you use decomposition by partial fractions, it's a good idea to check your work by adding the (in this case, 3) fractions to make sure you end up with what you started.
 
  • Like
Likes QuantumCurt
  • #5
Sorry, I missed that you switched the order of A and C.
 
  • #6
@Mark44 , that's good advice. I hadn't added the decomposition back together to check that it came out the same. I just checked it, and it does indeed come out the same.
 
  • #7
OK, then since the numbers check, you can check your integration by taking the derivative of your answer. With a bit of albebraic manipulation, you should be able to get back to the original integrand.
 
  • Like
Likes QuantumCurt
  • #8
Also good advice. I just took the derivative of my answer, and after combining the fractions I ended up with my original function.

So...am I right in thinking that Wolfram might simply be getting this one wrong?
 
  • #9
QuantumCurt said:
Also good advice. I just took the derivative of my answer, and after combining the fractions I ended up with my original function.

So...am I right in thinking that Wolfram might simply be getting this one wrong?

You are both somewhat right. The derivative of log(3-x) is the same as the derivative of log(x-3). The usual thing is to write the integral of 1/(x-3) as log(|x-3|).
 
  • Like
Likes QuantumCurt
  • #10
Now that you mention that...I recall encountering this issue with Wolfram before when functions have integrated to logarithms. It often seems to put it in the log(c-x) form rather than log(x-c).
 
  • #11
Thanks for the help everyone!

I just finished my retro calculus assignment, and that was the only one that I got hung up on. Good to know that I still remember all of this stuff from calculus 2.
 

1. What is an integral with partial fractions?

An integral with partial fractions is a mathematical method used to break down a complex fraction into simpler fractions. This method is particularly useful when integrating rational functions.

2. When is it necessary to use partial fractions in integration?

Partial fractions are used when the integrand (function being integrated) is a rational function, which is a quotient of two polynomials. This method is especially helpful when the degree of the polynomial in the denominator is greater than or equal to the degree of the polynomial in the numerator.

3. How do you solve an integral with partial fractions?

To solve an integral with partial fractions, you first need to factor the denominator of the rational function. Then, you set up a system of equations using the coefficients of the partial fractions and solve for them. Finally, you integrate each of the resulting fractions separately.

4. What are the benefits of using partial fractions in integration?

Using partial fractions in integration can simplify the integrand, making it easier to integrate. It also allows for the use of basic integration formulas for each individual fraction, which can make the overall integration process more manageable.

5. Are there any limitations to using partial fractions in integration?

Yes, there are certain cases where partial fractions cannot be used, such as when the denominator has repeated or complex roots. In these cases, other methods of integration, such as substitution or integration by parts, may be more suitable.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
552
  • Calculus and Beyond Homework Help
Replies
3
Views
350
  • Calculus and Beyond Homework Help
Replies
4
Views
747
  • Calculus and Beyond Homework Help
Replies
4
Views
700
  • Calculus and Beyond Homework Help
Replies
8
Views
962
  • Calculus and Beyond Homework Help
Replies
5
Views
767
  • Calculus and Beyond Homework Help
Replies
2
Views
550
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
824
  • Calculus and Beyond Homework Help
Replies
9
Views
205
Back
Top