# How do I solve $\int\frac{\cos^2(x)}{\sin(x)}\ dx$ without using Weierstass Substitution?

Every problem that I've put into wolfram alpha lately gives me instructions to substitute $\tan(\frac{x}{2})$, but I haven't been taught how to do that, nor can I understand how it works anyhow...

• This falls under the category $\cos^m x\sin^n x$ where $m$ and $n$ are integers, not necessarily positive. Say $m$ is odd. Then some manipulation and the substitution $u=\sin x$ lead to the integral of a rational function. Commented Mar 10, 2013 at 21:36
• see en.wikipedia.org/wiki/Weierstrass_substitution which really is a helpful thing to know. Commented Mar 10, 2013 at 21:38

## 4 Answers

Here's one approach. First rewrite the integral as $$\int \frac{\cos^2(x)}{\sin(x)} dx = \int \frac{\cos^2(x)}{\sin^2(x)} \sin(x) dx = \int \frac{\cos^2(x)}{1-\cos^2(x)} \sin(x) dx .$$ Using the substitution $u = \cos(x)$, this becomes $$- \int \frac{u^2}{1-u^2} du ,$$ which can now be computed by using partial fractions. I'll leave the rest of the details to you.

$$\int \frac{\cos^2(x)}{\sin(x)} \; \mathrm dx$$

You should know the Pythagorean Identity:

$$\sin^2(x) + \cos^2(x) = 1$$

So:

$$\int \frac{1 - \sin^2(x)}{\sin(x)} \; \mathrm dx$$ $$\int \left(\frac{1}{\sin(x)} - \sin(x) \right) \; \mathrm dx$$ $$\int \left(\csc(x) - \sin(x)\right) \; \mathrm dx$$ $$\int \csc(x) \; \mathrm dx - \int \sin(x) \; \mathrm dx$$

There is a nice little explanation of the Weierstrass Substitution here. Basically, any function using $\sin$ and $\cos$ can be expressed as rational functions of $\tan(x/2)$, so you can then easily integrate most integrals by method of partial fractions (the paper linked goes further than that).

• Indeed I should have known that... I'm starting to think that my brain is going numb from all the trig integrals I've done. Thanks for the insight. Commented Mar 10, 2013 at 21:28

Hint:

write this integral as $$\int \frac{1 - \sin^2(x)}{\sin(x)} \; \mathrm dx$$

$$\int \frac{\cos^2(x)}{\sin(x)} \mathrm dx = \int \csc(x) \; \mathrm dx - \int \sin(x) \; \mathrm dx$$