# Integrating using partial fraction method with trig functions in denominator.

#### burt

##### Junior Member
(I tried numbering the lines for reference but it may be even more confusing)
1. I was given the following problem:
2. $$\displaystyle \int\frac{1}{(\cos(x))\left(\sin^2(x)+4\right)}\ dx$$
3. I am not quite sure how to go about solving it. This is what I've done:
4. $$\displaystyle \int\frac{1}{(\cos(x))\left(\sin^2(x)+4\right)}\ dx \\ =\int\frac{\cos(x)}{(1-\sin^2(x))\left(\sin^2(x)+4\right)}\ dx\\u=\sin(x)\ \ \ \ \ \ \frac{du}{dx}=\cos(x)\ \ \ \ \ \ du=\cos(x)dx$$
5. Plugging in the substitution:
6. $$\displaystyle \int\frac{1}{(1+u)(1-u)(u^2+4)}\ dx$$
7. This looks like something for partial fractions: $$\displaystyle \frac{A}{1+u}+\frac{B}{1-u}+\frac{Cu+D}{u^2+4}$$
8. $$\displaystyle \frac{(A)(-u^3+u^2-4u+4)+B(u^3+u^2+4u+4)+(Cu+D)(-u^2+1)}{(1+u)(1-u)(u^2+4)}\\\frac{(-A+B-C)(u^3)+(A+B-D)(u^2)+(-4A+4B+C)(u)+4A+4B+D}{(1+u)(1-u)(u^2+4)}$$
9. This now gives me:
$$\displaystyle -A+B-C=0\\ A+B-D=0\\ -4A+4B+C=0\\ 4A+4B+D=1$$
Third equation edited
This is where I got stuck. I keep trying to solve this system of equations and I keep getting different answers.

Last edited by a moderator:

#### LCKurtz

##### Junior Member
I'm not sure your four equations are correct. Just to check your work with you should get
$$\displaystyle \frac {\frac 1 {10}}{1+u} + \frac{-\frac 1 {10}}{-1+u} +\frac{\frac 1 5}{4+u^2}$$

Last edited:

#### burt

##### Junior Member
I'm not sure your four equations are correct
What is wrong with them?

#### Dr.Peterson

##### Elite Member
Fix the third equation! It's just a little mistake, but that's all it takes.

I think LCKurtz wanted to make you check them, as you always should, rather than depend on someone else to tell you exactly where the error is. It's an important thing to get practice with. Did you look at all?

#### burt

##### Junior Member
Fix the third equation! It's just a little mistake, but that's all it takes.

I think LCKurtz wanted to make you check them, as you always should, rather than depend on someone else to tell you exactly where the error is. It's an important thing to get practice with. Did you look at all?
Are you referencing the typo of the D instead of C?

Yup.

#### Subhotosh Khan

##### Super Moderator
Staff member
(I tried numbering the lines for reference but it may be even more confusing)
1. I was given the following problem:
2. $$\displaystyle \int\frac{1}{(\cos(x))\left(\sin^2(x)+4\right)}\ dx$$
3. I am not quite sure how to go about solving it. This is what I've done:
4. $$\displaystyle \int\frac{1}{(\cos(x))\left(\sin^2(x)+4\right)}\ dx \\ =\int\frac{\cos(x)}{(1-\sin^2(x))\left(\sin^2(x)+4\right)}\ dx\\u=\sin(x)\ \ \ \ \ \ \frac{du}{dx}=\cos(x)\ \ \ \ \ \ du=\cos(x)dx$$
5. Plugging in the substitution:
6. $$\displaystyle \int\frac{1}{(1+u)(1-u)(u^2+4)}\ dx$$
7. This looks like something for partial fractions: $$\displaystyle \frac{A}{1+u}+\frac{B}{1-u}+\frac{Cu+D}{u^2+4}$$
8. $$\displaystyle \frac{(A)(-u^3+u^2-4u+4)+B(u^3+u^2+4u+4)+(Cu+D)(-u^2+1)}{(1+u)(1-u)(u^2+4)}\\\frac{(-A+B-C)(u^3)+(A+B-D)(u^2)+(-4A+4B+C)(u)+4A+4B+D}{(1+u)(1-u)(u^2+4)}$$
9. This now gives me:
$$\displaystyle -A+B-C=0\\ A+B-D=0\\ -4A+4B+C=0\\ 4A+4B+D=1$$
Third equation edited
This is where I got stuck. I keep trying to solve this system of equations and I keep getting different answers.
I suggest use MS_Excel to solve this quickly (and editing values will be simple) to get
A = 0.1 .... B = 0.1 .... C = 0 .... & ....D = 0.2

#### burt

##### Junior Member
I suggest use MS_Excel to solve this quickly
How do you use excel to solve this?

Staff member