# 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!
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$

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

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

Multiply the single term $3$ by each term of the polynomial $\left(1+t^{2}\right)$

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

Subtract the values $3$ and $-1$

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

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

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

Multiplying fractions $\frac{1+t^{2}}{4t^{2}+2} \times \frac{2}{1+t^{2}}$

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

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

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

Factor the denominator by $2$

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

Cancel the fraction's common factor $2$

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

Simplifying

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

$\sqrt{2t^{2}}$

The power of a product is equal to the product of it's factors raised to the same power

$\sqrt{2}t$
6

Solve the integral applying the substitution $u^2=2t^{2}$. Then, take the square root of both sides, simplifying we have

$u=\sqrt{2}t$

Differentiate both sides of the equation $u=\sqrt{2}t$

$du=\frac{d}{dt}\left(\sqrt{2}t\right)$

Find the derivative

$\frac{d}{dt}\left(\sqrt{2}t\right)$

The derivative of the linear function times a constant, is equal to the constant

$\sqrt{2}$
7

Now, in order to rewrite $dt$ in terms of $du$, we need to find the derivative of $u$. We need to calculate $du$, we can do that by deriving the equation above

$du=\sqrt{2}dt$
8

Isolate $dt$ in the previous equation

$\frac{du}{\sqrt{2}}=dt$
9

After replacing everything and simplifying, the integral results in

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

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}\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(\sqrt{2}t\right)$
11

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

$\frac{\sqrt{2}}{2}\arctan\left(\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(\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(\sqrt{2}\tan\left(\frac{x}{2}\right)\right)+C_0$

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