Solved example of integrals of rational functions of sine and cosine
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
Hence
Substituting in the original integral we get
Combine $3-\frac{1-t^{2}}{1+t^{2}}$ in a single fraction
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}$
Simplify the product $-(1-t^{2})$
Multiply $-1$ times $-1$
Multiply the single term $3$ by each term of the polynomial $\left(1+t^{2}\right)$
Add the values $-1$ and $3$
Combining like terms $t^{2}$ and $3t^{2}$
Multiplying fractions $\frac{1+t^{2}}{2+4t^{2}} \times \frac{2}{1+t^{2}}$
Simplify the fraction $\frac{2\left(1+t^{2}\right)}{\left(2+4t^{2}\right)\left(1+t^{2}\right)}$ by $1+t^{2}$
Factor the denominator by $2$
Cancel the fraction's common factor $2$
Simplifying
The power of a product is equal to the product of it's factors raised to the same power
Solve the integral applying the substitution $u^2=2t^{2}$. Then, take the square root of both sides, simplifying we have
Differentiate both sides of the equation $u=\sqrt{2}t$
Find the derivative
The derivative of the linear function times a constant, is equal to the constant
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
Isolate $dt$ in the previous equation
Divide $1$ by $\sqrt{2}$
Divide $\frac{\sqrt{2}}{2}$ by $1$
Any expression multiplied by $1$ is equal to itself
After replacing everything and simplifying, the integral results in
Solve the integral by applying the formula $\displaystyle\int\frac{x'}{x^2+a^2}dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)$
Calculate the power $\sqrt{1}$
Solve the integral by applying the formula $\displaystyle\int\frac{x'}{x^2+a^2}dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)$
Replace $u$ with the value that we assigned to it in the beginning: $\sqrt{2}t$
Replace $t$ with the value that we assigned to it in the beginning: $\tan\left(\frac{x}{2}\right)$
As the integral that we are solving is an indefinite integral, when we finish integrating we must add the constant of integration $C$
Access detailed step by step solutions to thousands of problems, growing every day!