Partial fractions and trig functions

A long time ago I wrote down a silly problem. It starts with

Attempt to write $$\frac{1}{\sin(x)\cos(x)}$$ using partial fractions.

and then goes on to prove a trig identity.

I was wondering if there is actually a way to do this? Is there a way to write a "trig rational function" as a partial fraction? I would assume that the form (in general) is simply as follows, as if $\sin(x)=:y$ and $\cos(x)=:z$ and following your nose?

$$\frac{1}{\sin(x)\cos(x)}=\frac{A\sin(x)+B\cos(x)+C}{\sin(x)}+\frac{D\sin(x)+E\cos(x)+F}{\cos(x)}$$

• Try ${\sin x \over \cos x} + {\cos x \over \sin x}$. – copper.hat Jan 30 '15 at 17:07
• You could have $\tan(x) + \cot(x)$.. – Mattos Jan 30 '15 at 17:07
• @copper.hat My issue is not with this specific question, but rather if there is a general approach to all such problems. – user1729 Jan 30 '15 at 17:08
• 'All' is a bit broad. What class of issues are you trying to solve? – copper.hat Jan 30 '15 at 17:09
• You can use $\sin x=2t/(1+t^2)$, $\cos x=(1-t^2)/(1+t^2)$, which transforms this into a rational function. – egreg Jan 30 '15 at 17:11

OK, let's try the tangent half-angle substitution: \begin{align} \tan\frac\theta 2 & = t \\[8pt] \theta & = 2\arctan t \\[8pt] \sin\theta & = \sin(2\arctan t) = 2\sin(\arctan t)\cos(\arctan t) \\ & = 2\frac{t}{\sqrt{t^2+1}} \cdot \frac{1}{\sqrt{t^2+1}} \\[6pt] & = \frac{2t}{t^2+1} \\[8pt] \cos\theta & = \cos(2\arctan t) = \cos^2\arctan t - \sin^2\arctan t \\ & = \left(\frac{1}{\sqrt{t^2+1}}\right)^2 - \left(\frac{t}{\sqrt{t^2+1}}\right)^2 \\[6pt] & = \frac{1-t^2}{1+t^2} \end{align} Then: $$\frac 1 {\sin\theta\cos\theta} = \frac{(t^2+1)^2}{2t(1-t^2)} = \frac{t^4+2t^2+1}{2t(1-t)(1+t)}$$ Long division of polynomials gives us a first-degree polynomial in $t$ plus $\dfrac{\cdots}{2t(1-t)(1+t)}$, where the numerator is at most a second-degree polynomial, and the fraction becomes $\dfrac A t+ \dfrac B{1-t} + \dfrac C{1+t}$.

• Should your first line perhaps be $\tan\frac{\theta}2=t$? – user1729 Feb 2 '15 at 11:28
• Also, thanks, this is really neat. – user1729 Feb 2 '15 at 11:34
• Just for reference, this substitution was discovered by the 19th-century German mathematician Karl Weierstrass. – Leponzo Feb 7 '16 at 23:36

Let's imagine a right triangle with angle $x$, hypotenuse $h$, opposite (of $x$) leg $o$ and adjacent leg $a$. Then $\sin(x) = \frac{o}{h}$ and $\cos{x} = \frac{a}{h}$, hence $$\frac{1}{\sin(x)\cos(x)} = \frac{1}{\frac{o}{h}\cdot \frac{a}{h}} \\ = \frac{h^2}{oa}$$ We also know in right triangles that $o^2+a^2 = h^2$, hence $$\frac{h^2}{oa} = \frac{o^2+a^2}{oa} \\ = \frac{o^2}{oa}+\frac{a^2}{oa} \\ = \frac{o}{a}+\frac{a}{o} \\ = \tan(x)+\cot(x)$$

• My question was not "how do I solve this?", but rather "is there a general method?". – user1729 Feb 2 '15 at 11:36

You can easily prove that the set $\{1,\cos x,\cos2x,\ldots,\cos nx,\sin x,\ldots,\sin nx\}$ is linearly indepedent over $\mathbb R$.

That's what you need to make identification $T(x)\equiv 0 \Leftrightarrow a_k(T)=0$ and thus to use this method.