Indefinite Integrals with sine and/or cosine

sine
$\int \sin a x d x = - \frac {\cos a x }{a} +C$
$\int x \sin a x d x = \frac {\sin a x}{a^2}- \frac{x \cos a x}{a} +C$
$\int x^2 \sin a x d x = \frac {2 x}{a^2} \sin a x + \left ( \frac {2}{a^3} - \frac {x^2}{a} \right)\cos a x +C$
$\int x^3 \sin a x d x = \left( \frac {3 x^2}{a^2} - \frac{6}{a^4}\right)\sin a x + \left ( \frac {6x}{a^3} - \frac {x^3}{a} \right)\cos a x +C$
$\int \frac {\sin a x}{x} d x = a x - \frac {(a x)^3}{3 \cdot 3!} + \frac {(a x)^5}{5 \cdot 5!} - \cdot \cdot \cdot +C$
$\int \frac {\sin a x}{x^2} d x = - \frac {\sin a x}{x} + a \int \frac {\cos a x}{x}dx +C$
$\int \frac {d x}{\sin a x} = \frac {1}{a} \ln \left( \frac {1}{\sin a x} - \cot a x \right) = \frac {1}{a} \ln {\tan \frac{a x}{2}} +C$
$\int \frac {x d x}{\sin a x} = \frac {1}{a^2} \left \{a x + \frac{(ax)^3}{18}+ \frac {7(ax)^5}{1800} + \cdot \cdot \cdot + \frac {2(2^{2n-1}-1)Bn(ax)^{2n+1}}{(2n+1)!} + \cdot\cdot\cdot \right \} +C$
$\int \sin ^2 a x d x = \frac {x}{2}- \frac{\sin 2 a x}{4a} +C$
$\int x \sin ^2 a x d x = \frac {x^2}{4}- \frac{x \sin 2 a x}{4a} - \frac {\cos 2 a x}{8a^2}+C$
$\int \sin ^3 a x d x = -\frac {\cos a x}{a}- \frac{\cos^3 a x}{3a} +C$
$\int \sin ^4 a x d x = \frac {3x}{8}- \frac{\sin 2 a x}{4a} + \frac {\sin4ax}{32a} +C$
$\int \frac {d x}{\sin^2 a x} = -\frac {1}{a} \cot a x +C$
$\int \frac {d x}{\sin^3 a x} = -\frac {\cos ax}{2a \sin^2 ax} + \frac{1}{2a}\ln \tan \frac{ax}{2} +C$
$\int \sin px \sin q x d x = \frac {\sin (p-q)x}{2(p-q)} - \frac{\sin(p+q)x}{2(p+q)} +C$
$\int \frac {d x}{1-\sin a x} = \frac {1}{a} \tan {\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +C$
$\int \frac {x d x}{1-\sin a x} = \frac {x}{a} \tan {\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +\frac{2}{a^2}\ln\sin{\left ( \frac{\pi}{4}-\frac{ax}{2}\right )} +C$
$\int \frac {d x}{1+\sin a x} = -\frac {1}{a} \tan {\left ( \frac{\pi}{4}-\frac{ax}{2}\right )} +C$
$\int \frac {x d x}{1+\sin a x} = -\frac {x}{a} \tan {\left ( \frac{\pi}{4}-\frac{ax}{2}\right )} +\frac{2}{a^2}\ln\sin{\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +C$
$\int \frac {d x}{(1-\sin a x)^2} = \frac {1}{2a} \tan {\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +\frac{1}{6a}\tan^3{\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +C$
$\int \frac {d x}{(1+\sin a x)^2} = -\frac {1}{2a} \tan {\left ( \frac{\pi}{4}-\frac{ax}{2}\right )} -\frac{1}{6a}\tan^3{\left ( \frac{\pi}{4}-\frac{ax}{2}\right )} +C$
$\int \frac {dx}{(p+q \sin ax)}= \begin{cases} \frac{2}{a \sqrt {p^2-q^2}} \arctan \frac {p\tan \frac{1}{2}ax + q}{\sqrt{p^2-q^2}} +C\\ \frac{1}{a\sqrt{q^2-p^2}} \ln \left( \frac{p \tan \frac{1}{2} ax + q-\sqrt{q^2-p^2}}{p \tan \frac{1}{2}ax+q+\sqrt{q^2-p^2}} \right)+C \end{cases}$
$\int \frac {d x}{(p+q \sin a x)^2}=\frac{q \cos ax}{a(p^2-q^2)(p+q \sin ax)}+\frac{p}{p^2-q^2}\int\frac{dx}{p+q \sin ax} C$
$\int \frac {d x}{p^2+q^2 \sin^2 a x}= \frac{1}{a p \sqrt {p^2+q^2}} \arctan \frac {\sqrt {p^2+q^2} \tan ax}{p} +C$
$\int \frac {dx}{(p^2-q^2 \sin^2 a x)}= \begin{cases} \frac{1}{a p \sqrt {p^2-q^2}} \arctan \frac {\sqrt {p^2-q^2} \tan ax }{p} +C\\ \frac{1}{2 a p \sqrt {q^2-p^2}} \ln \left( \frac{ \sqrt{q^2-p^2} \tan ax + p}{\sqrt{q^2-p^2} \tan a x -p} \right)+C \end{cases}$
$\int x^m \sin a x d x = -\frac {x^m \cos ax}{a} + \frac{m x^{m-1} \sin ax }{a^2} - \frac {m(m-1)}{a^2} \int x^{m-2} \sin ax dx$
$\int \frac {\sin a x}{x^n} d x = - \frac {\sin a x}{(n-1) x^{n-1}} + \frac {a}{n-1} \int \frac {\cos ax }{x^{n-1}}dx$
$\int \sin^n a x d x = -\frac {\sin^{n-1}ax \cos ax}{an} + \frac{n-1}{n} \int \sin^{n-2} ax dx$
$\int \frac {dx}{\sin^n a x}= \frac { -\cos a x}{a(n-1) \sin^{n-1}ax} + \frac {n-2}{n-1} \int \frac {dx }{\sin^{n-2}ax}$
$\int \frac {x dx}{\sin^n a x}= \frac {- x \cos a x}{a(n-1) \sin^{n-1}ax} - \frac {1}{a^2(n-2)(n-1)\sin^{n-2}ax} +\frac {n-2}{n-1} \int \frac {x dx }{\sin^{n-2}ax}$
cosine
$\int \cos a x d x = \frac {\sin a x }{a} +C$
$\int x \cos a x d x = \frac {\cos a x}{a^2} + \frac{x \sin a x}{a} +C$
$\int x^2 \cos a x d x = \frac {2 x}{a^2} \cos a x + \left ( \frac {x^2}{a} - \frac {2}{a^3} \right)\sin a x +C$
$\int x^3 \cos a x d x = \left( \frac {3 x^2}{a^2} - \frac{6}{a^4}\right)\cos a x + \left ( \frac {x^3}{a} - \frac{6x}{a^3} \right)\sin a x +C$
$\int \frac {\cos a x}{x} d x = \ln x - \frac {(a x)^2}{2 \cdot 2!} + \frac {(a x)^4}{4 \cdot 4!} - \frac {(a x)^6}{6 \cdot 6!} \cdot \cdot \cdot +C$
$\int \frac {\cos a x}{x^2} d x = - \frac {\cos a x}{x} - a \int \frac {\sin a x}{x}dx +C$
$\int \frac {d x}{\cos a x} = \frac {1}{a} \ln \left( \frac {1}{\cos a x} +\tan a x \right)= \frac {1}{a} \tan {\left ( \frac{\pi}{4}+\frac{ax}{2}\right )} +C$
$\int \frac {x d x}{\cos a x} = \frac {1}{a^2} \left \{\frac{(a x)^2}{2} + \frac{(ax)^4}{8}+ \frac {5(ax)^6}{144} + \cdot \cdot \cdot + \frac {En(ax)^{2n+2}}{(2n+2)(2n)!} + \cdot\cdot\cdot \right \} +C$
$\int \cos ^2 a x d x = \frac {x}{2}+ \frac{\sin 2 a x}{4a} +C$
$\int x \cos ^2 a x d x = \frac {x^2}{4}+ \frac{x \sin 2 a x}{4a} + \frac {\cos 2 a x}{8a^2}+C$
$\int \cos ^3 a x d x = \frac {\sin a x}{a}- \frac{\sin^3 a x}{3a} +C$
$\int \cos ^4 a x d x = \frac {3x}{8}+ \frac{\sin 2 a x}{4a} + \frac {\sin4ax}{32a} +C$
$\int \frac {d x}{\cos^2 a x} = \frac {\cot a x}{a} +C$
$\int \frac {d x}{\cos^3 a x} = \frac {\sin ax}{2a \cos^2 ax} + \frac{1}{2a}\ln \tan { \left( \frac{\pi}{4}+ \frac {ax}{2} \right)}+C$
$\int \cos ax \cos p x d x = \frac {\sin (a-p)x}{2(a-p)} - \frac{\sin(a+p)x}{2(a+p)} +C$
$\int \frac {d x}{1-\cos a x} = -\frac {1}{a} \cot \frac{ax}{2} +C$
$\int \frac {x d x}{1-\cos a x} = -\frac {x}{a} \cot \frac{ax}{2} +\frac{2}{a^2}\ln\sin \frac{ax}{2} +C$
$\int \frac {d x}{1+\cos a x} = \frac {1}{a} \tan \frac{ax}{2} +C$
$\int \frac {x d x}{1+\cos a x} = \frac {x}{a} \tan \frac{ax}{2} + \frac{2}{a^2}\ln\cos \frac{ax}{2} +C$
$\int \frac {d x}{(1-\cos a x)^2} = -\frac {1}{2a} \cot \frac{ax}{2} - \frac{1}{6a}\cot^3 \frac{ax}{2} +C$
$\int \frac {d x}{(1+\cos a x)^2} = \frac {1}{2a} \tan \frac{ax}{2} + \frac{1}{6a}\tan^3 \frac{ax}{2} +C$
$\int \frac {dx}{(p+q \cos ax)}= \begin{cases} \frac{2}{a \sqrt {p^2-q^2}} \arctan \sqrt {(p-q)/(p+q)} \tan \frac{1}{2}ax +C \\ \frac{1}{a \sqrt{q^2-p^2}} \ln \left( \frac{ \tan \frac{1}{2} ax + \sqrt{(q+p)/(q-p)}}{\tan \frac{1}{2}ax-\sqrt{(q+p)/(q-p)}} \right) +C \end{cases}$
$\int \frac {d x}{(p+q \cos a x)^2}=\frac{q \sin ax}{a(q^2-p^2)(p+q \cos ax)}-\frac{p}{q^2-p^2}\int\frac{dx}{p+q \cos ax}$
$\int \frac {d x}{p^2+q^2 \cos^2 a x}= \frac{1}{a p \sqrt {p^2+q^2}} \arctan \frac {p \tan ax}{\sqrt {p^2+q^2} }+C$
$\int \frac {dx}{(p^2-q^2 \cos^2 a x)}= \begin{cases} \frac{1}{a p \sqrt {p^2-q^2}} \arctan \frac {p \tan ax }{\sqrt {p^2-q^2} } +C\\ \frac{1}{2 a p \sqrt {q^2-p^2}} \ln \left( \frac{ p \tan ax - \sqrt{q^2-p^2}}{p \tan a x + \sqrt{q^2-p^2}} \right)+C \end{cases}$
$\int x^m \cos a x d x = -\frac {x^m \sin ax}{a} + \frac{m x^{m-1}}{a^2} \sin ax - \frac {m(m-1)}{a^2} \int x^{m-2} \cos ax dx +C$
$\int \frac {\cos a x}{x^n} d x = - \frac {\cos a x}{(n-1) x^{n-1}} - \frac {a}{n-1} \int \frac {\sin ax }{x^{n-1}}dx +C$
$\int \cos^n a x d x = -\frac {\sin ax \cos^{n-1}ax }{an} + \frac{n-1}{n} \int \cos^{n-2} ax dx +C$
$\int \frac {dx}{\cos^n a x}= \frac { \sin a x \cos^{n-1}ax}{an} + \frac {n-2}{n-1} \int \frac {dx }{\cos^{n-2}ax} +C$
$\int \frac {x dx}{\cos^n a x}= \frac {x \sin a x}{a(n-1) \cos^{n-1}ax} - \frac {1}{a^2(n-1)(n-2)\cos^{n-2}ax} +\frac {n-2}{n-1} \int \frac {x dx }{\cos^{n-2}ax} +C$
21 sin ax and cos ax
$\int \sin ax \cos a x d x = \frac {\sin^2 a x }{2a} +C$
$\int \sin p x \cos q x d x = -\frac {\cos (p-q)x}{2(p-q)} - \frac{\cos(p+q)x}{2(p+q)} +C$
$\int \sin^n x \cos a x d x = \frac{ \sin^{n+1} ax}{(n+1)a} +C$
$\int \cos^n x \sin a x d x = -\frac{ \cos^{n+1} ax}{(n+1)a} +C$
$\int \sin^2 a x \cos^2 a x d x = \frac{x}{8} - \frac {\sin 4ax}{32a} +C$
$\int \frac {d x}{\sin ax \cos a x} = \frac {1}{a} \tan ax +C$
$\int \frac {d x}{\sin^2 ax \cos a x} = \frac {1}{a} \ln \tan { \left( \frac{\pi}{4}+ \frac {ax}{2} \right)} - \frac {1}{a \sin ax }+C$
$\int \frac {d x}{\sin ax \cos^2 a x} = \frac {1}{a} \ln \tan \frac {ax}{2} + \frac {1}{a \cos ax }+C$
$\int \frac {d x}{\sin^2 ax \cos^2 a x} = -\frac {2\cot 2 a x }{a} +C$
$\int \frac {\sin^2 ax }{\cos a x}dx = -\frac {\sin a x}{a} +\frac {1}{a} \ln \tan { \left( \frac {ax}{2}+ \frac{\pi}{4} \right)} +C$
$\int \frac {\cos^2 ax }{\sin a x}dx = \frac {\cos ax}{a} + \frac{1}{a} \ln \tan \frac{ax}{2} +C$
$\int \frac {dx}{\cos ax (1 \pm \sin a x} = \mp \frac {1}{2a (1 \pm \sin ax} + \frac{1}{2a} \ln \tan { \left( \frac {ax}{2}+ \frac{\pi}{4} \right)} +C$
$\int \frac {dx}{\sin ax (1 \pm \cos a x} = \pm \frac {1}{2a (1 \pm \cos ax} + \frac{1}{2a} \ln \tan \frac {ax}{2} +C$
$\int \frac {dx}{\sin ax \pm \cos a x} = \frac {1}{a \sqrt {2}} \ln \tan { \left( \frac {ax}{2} \pm \frac{\pi}{8} \right)} +C$
$\int \frac {\sin ax dx}{\sin ax \pm \cos a x} = \frac {x}{2} \mp \frac {1}{2a} \ln { \left( \sin ax \pm \cos ax \right)} +C$
$\int \frac {\cos ax dx}{\sin ax \pm \cos a x} = \mp \frac {x}{2} + \frac {1}{2a} \ln { \left( \sin ax \pm \cos ax \right)} +C$
$\int \frac {\sin ax dx}{p+q \cos a x} = -\frac {1}{aq} \ln { \left( p+ q\cos ax \right)} +C$
$\int \frac {\cos ax dx}{p+q \cos a x} = \frac {1}{aq} \ln { \left( p+ q\sin ax \right)} +C$
$\int \frac {\sin ax dx}{(p+q \cos a x)^n} = \frac {1}{aq(n-1)(p+q \cos ax)^{n-1}}+C$
$\int \frac {\sin ax dx}{(p+q \sin a x)^n} = \frac {-1}{aq(n-1)(p+q \sin ax)^{n-1}}+C$
$\int \frac {dx}{p \sin ax + q \cos a x} = \frac {1}{a \sqrt {p^2+q^2}} \ln \tan { \left( \frac {ax+\arctan (q/p)}{2} \right)} +C$
$\int \frac {dx}{p \sin ax +q \cos ax + r}= \begin{cases} \frac{2}{a \sqrt {r^2 -p^2-q^2}} \arctan \left( \frac {p+(r-q) \tan (ax/2)}{\sqrt {r^2 - p^2-q^2}} \right) +C\\ \frac{1}{a \sqrt {q^2 +p^2-r^2}} \ln \left( \frac{ p- \sqrt{p^2+q^2-r^2}+(r+q)\tan \frac{ax}{2} }{p+\sqrt{p^2+q^2-r^2}+(r+q)\tan \frac{ax}{2}} \right)+C \end{cases}$
$\int \frac {dx}{p \sin ax +q (1+\cos ax )}= \frac{1}{ap} \ln \left( q+ p \tan \frac{ax}{2} \right)+C$
$\int \frac {dx}{p \sin ax +q \cos ax \pm \sqrt {p^2+q^2}}= \frac {-1}{a \sqrt {p^2+q^2}} \tan { \left( \frac{\pi}{4} \mp \frac{ax+ \arctan{(q/p)}}{2} \right)} +C$
$\int \frac {dx}{p^2 \sin^2 ax +q^2 \cos^2 ax }= \frac{1}{apq} \arctan { \frac {p \tan ax}{q}} +C$
$\int \frac {dx}{p^2 \sin^2 ax - q^2 \cos^2 ax }= \frac{1}{2apq} \ln { \left( \frac {p \tan ax -q}{p \tan ax + q} \right)} +C$
$\int \sin^m ax \cos^n ax dx= \begin{cases} -\frac{\sin^{m-1} ax \cos^{n-1}ax}{a (m+n)} + \frac {m-1}{m+n} \int \sin^{m-2} ax \cos^n ax dx \\ \frac{\sin^{m-1} ax \cos^{n+1}ax}{a (m+n)} + \frac{ n-1 }{m+n} \int \sin^m ax \cos^{n-2} ax dx \end{cases}$
$\int \frac {\sin^m ax}{ \cos^n ax }dx= \begin{cases} \frac{\sin^{m-1} ax } {a(n-1) \cos^{n-1}ax} -\frac {m-1}{n-1} \int \sin^{m-2} ax \cos^{n-2} ax dx \\ \frac{\sin^{m+1} ax } {a(n-1) \cos^{n+1}ax} - \frac{m-n+2}{n-1} \int \sin^m ax \cos^{n-2} ax dx \\ \frac{- \sin^{m-1} ax } {a(m-n) \cos^{n-1}ax} + \frac {m-1}{m-n} \int \sin^{m-2} ax \cos^n ax dx \\ \end{cases}$
$\int \frac {\cos^m ax}{ \sin^n ax }dx= \begin{cases} \frac{-\cos^{m-1} ax } {a(n-1) \sin^{n-1}ax} -\frac {m-1}{n-1} \int \cos^{m-2} ax \sin^{n-2} ax dx \\ \frac{-\cos^{m+1} ax } {a(n-1) \sin^{n-1}ax} - \frac{m-n+2}{n-1} \int \cos^m ax \sin^{n-2} ax dx \\ \frac{- \cos^{m-1} ax } {a(m-n) \sin^{n-1}ax} + \frac {m-1}{m-n} \int \cos^{m-2} ax \sin^n ax dx \\ \end{cases}$
$\int \frac {dx}{ \sin^m ax \cos^n a x} \begin{cases} \frac{1}{a(n-1) \sin^{n-1}ax \cos^{n-1} ax} + \frac{m-n+2}{n-1} \frac {dx}{ \sin^m ax \cos^{n-2}} +C\\ \frac{-1}{a(n-1) \sin^{m-1}ax \cos^{n-1} ax} + \frac{m-n+2}{n-1} \frac {dx}{ \sin^{m-2} ax \cos^n ax}+C\\ \end{cases}$

## Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett