Math Doubts

Evaluate $\displaystyle \int{\dfrac{1}{\sin{x}+\cos{x}}}\,dx$

A trigonometric function sine of angle $x$ is added to another trigonometric function cosine of angle $x$. The reciprocal of the sum of them forms a rational function and the indefinite integral of this rational function should be evaluated with respect to $x$ in this problem.

$\displaystyle \int{\dfrac{1}{\sin{x}+\cos{x}}}\,dx$

Let us learn how to find the integral of the one by sine of angle $x$ plus cosine of angle $x$ with respect to $x$ in integral calculus.

Simplify the Trigonometric expression

The sine and cosine functions are added to form a trigonometric expression in the denominator of the rational function. There is no trigonometric identity to combine both terms directly. However, the trigonometric expression can be simplified in a logical approach.

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{1 \times \sin{x}+1 \times \cos{x}}}\,dx$

According to the trigonometry, the values of cosine and sine functions are equal when the angle of the right triangle is $45$ degrees. Hence, let’s try to make some adjustments for making to appear the value of cosine of $45$ degrees and sine of $45$ degrees in the trigonometric expression as factors.

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\dfrac{\sqrt{2}}{\sqrt{2}} \times \sin{x}+\dfrac{\sqrt{2}}{\sqrt{2}} \times \cos{x}}}\,dx$

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\dfrac{\sqrt{2} \times 1}{\sqrt{2}} \times \sin{x}+\dfrac{\sqrt{2} \times 1}{\sqrt{2}} \times \cos{x}}}\,dx$

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\sqrt{2} \times \dfrac{1}{\sqrt{2}} \times \sin{x}+\sqrt{2} \times \dfrac{1}{\sqrt{2}} \times \cos{x}}}\,dx$

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\sqrt{2} \times \bigg(\dfrac{1}{\sqrt{2}} \times \sin{x}+\dfrac{1}{\sqrt{2}} \times \cos{x}\bigg)}}\,dx$

The values of both sine of 45 degrees and cosine of 45 degrees are $1$ by square root of $2$.

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\sqrt{2} \times \bigg(\cos{\Big(\dfrac{\pi}{4}\Big)} \times \sin{x}+\sin{\Big(\dfrac{\pi}{4}\Big)} \times \cos{x}\bigg)}}\,dx$

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\sqrt{2} \times \bigg(\sin{x} \times \cos{\Big(\dfrac{\pi}{4}\Big)}+\cos{x} \times \sin{\Big(\dfrac{\pi}{4}\Big)}\bigg)}}\,dx$

The second factor in the denominator is a trigonometric expression and it represents the expansion of the sine of sum of two angles formula. Hence, it can be simplified by using the sine angle sum identity.

$=\,\,\,$ $\displaystyle \int{\dfrac{1}{\sqrt{2} \times \sin{\Big(x+\dfrac{\pi}{4}\Big)}}}\,dx$

$=\,\,\,$ $\displaystyle \int{\dfrac{1 \times 1}{\sqrt{2} \times \sin{\Big(x+\dfrac{\pi}{4}\Big)}}}\,dx$

$=\,\,\,$ $\displaystyle \int{\Bigg(\dfrac{1}{\sqrt{2}} \times \dfrac{1}{\sin{\Big(x+\dfrac{\pi}{4}\Big)}}\Bigg)}\,dx$

The constant factor can be excluded from the integral operation as per the constant multiple integral rule.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}} \times \displaystyle \int{\dfrac{1}{\sin{\Big(x+\dfrac{\pi}{4}\Big)}}}\,dx$

The reciprocal sine function can be written as cosecant function as per the reciprocal identity of sine function.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}} \times \displaystyle \int{\csc{\Big(x+\dfrac{\pi}{4}\Big)}}\,dx$

Prepare the cosecant function for integration

The integral of cosecant function can be calculated but there is an additional angle inside the cosecant function. So, it should be transformed for finding the integration of the cosecant function.

Take $y \,=\, x+\dfrac{\pi}{4}$

Now, difference the expressions on both sides of the equation with respect to $x$.

$\implies$ $\dfrac{d}{dx}{(y)} \,=\, \dfrac{d}{dx}{\Big(x+\dfrac{\pi}{4}\Big)}$

The derivative of sum of two functions can be calculated by using the sum rule of the derivatives.

$\implies$ $\dfrac{dy}{dx}$ $\,=\,$ $\dfrac{d}{dx}{(x)}$ $+$ $\dfrac{d}{dx}{\Big(\dfrac{\pi}{4}\Big)}$

$\implies$ $\dfrac{dy}{dx}$ $\,=\,$ $\dfrac{dx}{dx}$ $+$ $0$

$\implies$ $\dfrac{dy}{dx}$ $\,=\,$ $1$

$\implies$ $dy$ $\,=\,$ $1 \times dx$

$\,\,\,\therefore\,\,\,\,\,\,$ $dy$ $\,=\,$ $dx$

Now, convert the whole function in terms of $y$ from $x$ by using the mathematical relationships between the $x$ and $y$, and $dx$ and $dy$.

$\therefore\,\,\,$ $\dfrac{1}{\sqrt{2}} \times \displaystyle \int{\csc{\Big(x+\dfrac{\pi}{4}\Big)}}\,dx$ $\,=\,$ $\dfrac{1}{\sqrt{2}} \times \displaystyle \int{\csc{y}}\,dy$

Find the integration of cosecant function

The process of integration can be finished by integrating the cosecant function with respect to $y$.

$\dfrac{1}{\sqrt{2}} \times \displaystyle \int{\csc{y}}\,dy$

Now, the integral of cosecant function can be evaluated with respect to y by using a fundamental procedure.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}} \times \Big(\log_{e}{\big|\csc{y}-\cot{y}\big|}+c_1\Big)$

Now, let us focus on simplifying this expression.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}} \times \log_{e}{\big|\csc{y}-\cot{y}\big|}$ $+$ $\dfrac{1}{\sqrt{2}} \times c_1$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\big|\csc{y}-\cot{y}\big|}$ $+$ $\dfrac{1 \times c_1}{\sqrt{2}}$

The second term is a constant. So, it is simplify denoted by a constant $c$.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\big|\csc{y}-\cot{y}\big|}$ $+$ $c$

The trigonometric expression inside the logarithmic function is the difference of the cosecant and cotangent functions. Let us try to simplify it further by using the trigonometric identities. First of all, express the cosecant function in terms of sine as per the reciprocal identity of sine and also write the cotangent function in quotient form as per the quotient rule of cosine and sine functions.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{1}{\sin{y}}-\dfrac{\cos{y}}{\sin{y}}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{1-\cos{y}}{\sin{y}}\Bigg|}$ $+$ $c$

According to the power reduction identity in sine function, the expression $1-\cos{y}$ can be written as follows.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{2\sin^2{\Big(\dfrac{y}{2}\Big)}}{\sin{y}}\Bigg|}$ $+$ $c$

The sine function can be expanded as per the half angle identity of sine function.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{2\sin^2{\Big(\dfrac{y}{2}\Big)}}{2\sin{\Big(\dfrac{y}{2}\Big)}\cos{\Big(\dfrac{y}{2}\Big)}}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{\cancel{2\sin^2{\Big(\dfrac{y}{2}\Big)}}}{\cancel{2\sin{\Big(\dfrac{y}{2}\Big)}}\cos{\Big(\dfrac{y}{2}\Big)}}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\dfrac{\sin{\Big(\dfrac{y}{2}\Big)}}{\cos{\Big(\dfrac{y}{2}\Big)}}\Bigg|}$ $+$ $c$

The quotient of sine by cosine can be simplified as per the quotient rule of sine and cosine functions.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\tan{\Big(\dfrac{y}{2}\Big)}\Bigg|}$ $+$ $c$

Now, substitute the value of $y$ in terms of $x$ to get the required solution.

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\tan{\Bigg(\dfrac{x+\dfrac{\pi}{4}}{2}\Bigg)}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\tan{\Bigg(\dfrac{x}{2}+\dfrac{\dfrac{\pi}{4}}{2}\Bigg)}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\tan{\Bigg(\dfrac{x}{2}+\dfrac{\pi}{4 \times 2}\Bigg)}\Bigg|}$ $+$ $c$

$=\,\,\,$ $\dfrac{1}{\sqrt{2}}\log_{e}{\Bigg|\tan{\Big(\dfrac{x}{2}+\dfrac{\pi}{8}\Big)}\Bigg|}$ $+$ $c$

Math Questions

The math problems with solutions to learn how to solve a problem.

Learn solutions

Math Worksheets

The math worksheets with answers for your practice with examples.

Practice now

Math Videos

The math videos tutorials with visual graphics to learn every concept.

Watch now

Subscribe us

Get the latest math updates from the Math Doubts by subscribing us.

Learn more

Math Doubts

A free math education service for students to learn every math concept easily, for teachers to teach mathematics understandably and for mathematicians to share their maths researching projects.

Copyright © 2012 - 2023 Math Doubts, All Rights Reserved