# Integrals of Rational Functions of Sine and Cosine Calculator

## Get detailed solutions to your math problems with our Integrals of Rational Functions of Sine and Cosine step-by-step calculator. Practice your math skills and learn step by step with our math solver. Check out all of our online calculators here!

Go!
1
2
3
4
5
6
7
8
9
0
a
b
c
d
f
g
m
n
u
v
w
x
y
z
.
(◻)
+
-
×
◻/◻
/
÷
2

e
π
ln
log
log
lim
d/dx
Dx
|◻|
=
>
<
>=
<=
sin
cos
tan
cot
sec
csc

asin
acos
atan
acot
asec
acsc

sinh
cosh
tanh
coth
sech
csch

asinh
acosh
atanh
acoth
asech
acsch

### Difficult Problems

1

Solved example of integrals of rational functions of sine and cosine

$\int\frac{dx}{3-cos\left(x\right)}$
2

We can solve the integral $\int\frac{1}{3-\cos\left(x\right)}dx$ by applying the method Weierstrass substitution (also known as tangent half-angle substitution) which converts an integral of trigonometric functions into a rational function of $t$ by setting the substitution

$t=\tan\left(\frac{x}{2}\right)$
3

Hence

$\sin x=\frac{2t}{1+t^{2}},\:\cos x=\frac{1-t^{2}}{1+t^{2}},\:\mathrm{and}\:\:dx=\frac{2}{1+t^{2}}dt$
4

Substituting in the original integral we get

$\int\frac{1}{3-\left(\frac{1-t^{2}}{1+t^{2}}\right)}\frac{2}{1+t^{2}}dt$

Combine $3-\left(\frac{1-t^{2}}{1+t^{2}}\right)$ in a single fraction

$\int\frac{1}{\frac{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)}{1+t^{2}}}\frac{2}{1+t^{2}}dt$

Divide fractions $\frac{1}{\frac{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)}{1+t^{2}}}$ with Keep, Change, Flip: $a\div \frac{b}{c}=\frac{a}{1}\div\frac{b}{c}=\frac{a}{1}\times\frac{c}{b}=\frac{a\cdot c}{b}$

$\int\frac{1+t^{2}}{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)}\frac{2}{1+t^{2}}dt$

Multiplying fractions $\frac{1+t^{2}}{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)} \times \frac{2}{1+t^{2}}$

$\int\frac{2\left(1+t^{2}\right)}{\left(-\left(1-t^{2}\right)+3\left(1+t^{2}\right)\right)\left(1+t^{2}\right)}dt$

Simplify the fraction $\frac{2\left(1+t^{2}\right)}{\left(-\left(1-t^{2}\right)+3\left(1+t^{2}\right)\right)\left(1+t^{2}\right)}$ by $1+t^{2}$

$\int\frac{2}{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)}dt$
5

Simplifying

$\int\frac{2}{-\left(1-t^{2}\right)+3\left(1+t^{2}\right)}dt$

$\int\frac{2}{-1-1\left(-1\right)t^{2}+3\left(1+t^{2}\right)}dt$

Multiply $-1$ times $-1$

$\int\frac{2}{-1+1t^{2}+3\left(1+t^{2}\right)}dt$

Any expression multiplied by $1$ is equal to itself

$\int\frac{2}{-1+t^{2}+3\left(1+t^{2}\right)}dt$
6

Solve the product $-\left(1-t^{2}\right)$

$\int\frac{2}{-1+t^{2}+3\left(1+t^{2}\right)}dt$

$\int\frac{2}{-1-1\left(-1\right)t^{2}+3\left(1+t^{2}\right)}dt$

Multiply $-1$ times $-1$

$\int\frac{2}{-1+1t^{2}+3\left(1+t^{2}\right)}dt$

Any expression multiplied by $1$ is equal to itself

$\int\frac{2}{-1+t^{2}+3\left(1+t^{2}\right)}dt$

$\int\frac{2}{-1+t^{2}+3\cdot 1+3t^{2}}dt$

Multiply $3$ times $1$

$\int\frac{2}{-1+t^{2}+3+3t^{2}}dt$

Subtract the values $3$ and $-1$

$\int\frac{2}{2+t^{2}+3t^{2}}dt$
7

Solve the product $3\left(1+t^{2}\right)$

$\int\frac{2}{2+t^{2}+3t^{2}}dt$

Combining like terms $t^{2}$ and $3t^{2}$

$\int\frac{2}{2+4t^{2}}dt$

Factor the denominator by $2$

$\int\frac{2}{2\left(1+2t^{2}\right)}dt$

Cancel the common factor $2$

$\int\frac{1}{1+2t^{2}}dt$
8

Simplifying

$\int\frac{1}{1+2t^{2}}dt$
9

Solve the integral applying the substitution $u^2=2t^{2}$

$\frac{\sqrt{2}}{2}\int\frac{1}{1+u^2}du$

$\frac{\sqrt{2}}{2}\left(\frac{1}{\sqrt{1}}\right)\arctan\left(\frac{u}{\sqrt{1}}\right)$

Calculate the power $\sqrt{1}$

$\frac{\sqrt{2}}{2}\left(\frac{1}{1}\right)\arctan\left(\frac{u}{\sqrt{1}}\right)$

Any expression divided by one ($1$) is equal to that same expression

$\frac{\sqrt{2}}{2}\arctan\left(u\right)$
10

Solve the integral applying the formula $\displaystyle\int\frac{x'}{x^2+a^2}dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)$

$\frac{\sqrt{2}}{2}\arctan\left(u\right)$

$\frac{\sqrt{2}}{2}\arctan\left(\frac{2}{\sqrt{2}}t\right)$
11

Replace $u$ with the value that we assigned to it in the beginning: $\frac{2}{\sqrt{2}}t$

$\frac{\sqrt{2}}{2}\arctan\left(\frac{2}{\sqrt{2}}t\right)$
12

Replace $t$ with the value that we assigned to it in the beginning: $\tan\left(\frac{x}{2}\right)$

$\frac{\sqrt{2}}{2}\arctan\left(\frac{2}{\sqrt{2}}\tan\left(\frac{x}{2}\right)\right)$
13

As the integral that we are solving is an indefinite integral, when we finish integrating we must add the constant of integration $C$

$\frac{\sqrt{2}}{2}\arctan\left(\frac{2}{\sqrt{2}}\tan\left(\frac{x}{2}\right)\right)+C_0$

$\frac{\sqrt{2}}{2}\arctan\left(\frac{2}{\sqrt{2}}\tan\left(\frac{x}{2}\right)\right)+C_0$