# Stuck on this integral (using partial fraction decomposition)

QaH

## Homework Statement

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

n/a

## The Attempt at a Solution

Letting $$x=2tan\theta$$ and $$dx=2sec^2\theta d\theta$$
$$\int\frac{x^2}{\sqrt{x^2+4}}dx=\int\frac{4tan^2\theta}{\sqrt{4+4tan^2\theta}}2sec^2\theta d\theta=\int\frac{8tan^2\theta sec^2\theta}{\sqrt{4(1+tan^2\theta)}}d\theta=4\int\frac{tan^2\theta sec^2\theta}{sec\theta}d\theta=$$$$4\int tan^2\theta sec\theta d\theta=4\int(sec^2\theta -1)sec\theta d\theta=4\int (sec^3\theta-sec\theta)d\theta=$$$$4\int sec^3\theta d\theta-4\int sec\theta d\theta=-4\int\frac{cos\theta}{cos^2\theta}d\theta+4\int\frac{cos\theta}{cos^4\theta}d\theta=$$$$-4\int\frac{cos\theta}{1-sin^2\theta}d\theta+4\int\frac{cos\theta}{(cos^2\theta)^2}d\theta=-4\int\frac{cos\theta}{1-sin^2\theta}d\theta+4\int\frac{cos\theta}{(1-sin^2\theta)^2}d\theta$$
now letting $$u=sin\theta$$and$$du=cos\theta d\theta$$$$-4\int\frac{1}{1-u^2}du+4\int\frac{1}{(1-u^2)^2}du=-4\int\frac{1}{(1-u)(1+u)}du+4\int\frac{1}{(1-u^2)^2}du$$
using partial fraction decomposition I get
$$\frac{1}{(1-u)(1+u)}=\frac{A}{1-u}+\frac{B}{1+u}$$ multipying both sides by $$1-u^2$$$$1=A(1+u)+B(1-u)$$ Letting u=1 we get that $$A=\frac{1}{2}$$ now letting u=-1 we get that $$B=\frac{1}{2}$$ Then $$\frac{1}{(1-u)(1+u)}=\frac{1}{2(1-u)}+\frac{1}{2(1+u)}$$
and $$-4\int\frac{1}{(1-u)(1+u)}du$$ becomes $$-4\int\frac{1}{2}(\frac{1}{1-u}+\frac{1}{1+u})du=-2(\ln\mid1+u\mid-\ln\mid1-u\mid+c$$note that $$u=sin\theta=\frac{x}{\sqrt{x^2+4}}$$$$-2(\ln\mid1+\frac{x}{\sqrt{x^2+4}}\mid-\ln\mid1-\frac{x}{\sqrt{x^2+4}}\mid)+c=-2\ln\mid1+\frac{x}{\sqrt{x^2+4}}\mid+2\ln\mid1-\frac{x}{\sqrt{x^2+4}}\mid+c=\ln\mid(1-\frac{x}{\sqrt{x^2+4}})^2\mid-\ln\mid(1+\frac{x}{\sqrt{x^2+4}})^{2}\mid+c=\ln\mid\frac{(1-\frac{x}{\sqrt{x^2+4}})^2}{(1+\frac{x}{\sqrt{x^2+4}})^2}\mid+c$$
and our original integral becomes $$\ln\mid\frac{(1-\frac{x}{\sqrt{x^2+4}})^2}{(1+\frac{x}{\sqrt{x^2+4}})^2}\mid+4\int\frac{1}{(1-u^2)^2}du$$
now this is where I am stuck because I can't seem to figue out partial fraction decomposition on $$\frac{1}{(1-u^2)^2}=\frac{A}{(1-u^2)}+\frac{B}{(1-u^2)^2}$$ multiplying through I get that $$1=A(1-u^2)+B$$
Letting u=1 B=1 then$$1=A(1-u^2)+1$$ then for any u A=0 and I am left with $$\frac{1}{(1-u^2)^2}=0+\frac{1}{(1-u^2)^2}$$ and I still can't integrate.
Please don't just say I am not using the correct partial fraction method because I have searched and searched but can't find a method on this type of fraction.

Mentor
2022 Award
Have you tried the complete decomposition?
$$\dfrac{1}{(1-u^2)^2}=\dfrac{A}{1-u}+\dfrac{B}{1-u}+\frac{C}{1+u}+\frac{D}{1+u}$$
or
$$\dfrac{1}{(1-u^2)^2}=\dfrac{Au+B}{(1+u)^2}+\dfrac{Cu+D}{(1-u)^2}$$

MidgetDwarf
A key idea when doing partial fraction decomposition, is that to solve problems of this type, you have to make sure the denominator is fully factored. Also, you have to make sure that if the denominators contain quadratics, i.e. X^2+1, you need to do something to preform a little "fix." Now try to think as to why need to preform this "fix."

What you have in those parenthesis is a difference of perfect squares...

The mathematical reasoning as to why and how partial fraction decomposition work is really neat. At this point you should have enough background to attempt it! give it a try.

Theres also a really cool shortcut when working with denominators that are "linear." Youtube it!

Homework Helper
Dearly Missed

## Homework Statement

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

n/a

## The Attempt at a Solution

Letting $$x=2tan\theta$$ and $$dx=2sec^2\theta d\theta$$

$$\vdots\\ \vdots$$

Letting u=1 B=1 then$$1=A(1-u^2)+1$$ then for any u A=0 and I am left with $$\frac{1}{(1-u^2)^2}=0+\frac{1}{(1-u^2)^2}$$ and I still can't integrate.
Please don't just say I am not using the correct partial fraction method because I have searched and searched but can't find a method on this type of fraction.

(1)
$$\frac{1}{(1-u^2)^2} = \left[ \frac{1}{2}\frac{1}{1+u} + \frac{1}{2} \frac{1}{1-u} \right]^2.$$
Expand ##[ \cdots ]^2## and re-apply partial fractions to some of the terms; others are already in simplest form.
(2) You could use ##x = 2 \sinh(t)## instead of your ## x = 2 \tan \theta##. I think it makes things a lot simpler.

BTW: do not write ##tan \theta##; it is hard to read and looks ugly: ##\tan \theta## looks a lot better. LaTeX is designed to produce nice output if you put a "\" in front of most standard functions, so instead of writing "sin" or "tan" you should use "\ sin" or "\ tan"---but leave out the space between '\' and sin or tan. This applies as well to most other elementary functions cos, arcsin, arccos, arctan, sinh, cosh, tanh, exp, ln, log, max, min, lim, sup, inf, gcd, and some others.

Last edited:
QaH and epenguin