Solveeit Logo

Question

Question: Integrate the following. \(\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x}{\sin x+\cos x...

Integrate the following.
0π2asinx+bcosxsinx+cosxdx\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x}{\sin x+\cos x}dx}

Explanation

Solution

We are required to know the basic trigonometric and integral formulae in order to solve this question. We know a basic property of an integral is given as 0pf(x)dx=0pf(px)dx.\int\limits_{0}^{p}{f\left( x \right)dx}=\int\limits_{0}^{p}{f\left( p-x \right)dx}. Here, the function value of the integral remains the same if the variable of integration inside the function is replaced by a term given by the sum of limits minus the variable of integration. Using this, we simplify the above equation and get two equations. We add the two and simplify to get the solution.

Complete step by step solution:
Given the question as 0π2asinx+bcosxsinx+cosxdx,\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x}{\sin x+\cos x}dx}, Let us assume this is equal to a variable I.
I=0π2asinx+bcosxsinx+cosxdx(1)\Rightarrow I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x}{\sin x+\cos x}dx}\ldots \ldots \left( 1 \right)
Now we use the basic integration property,
0pf(x)dx=0pf(px)dx\Rightarrow \int\limits_{0}^{p}{f\left( x \right)dx}=\int\limits_{0}^{p}{f\left( p-x \right)dx}
Using this in the above equation,
I=0π2asin(π2x)+bcos(π2x)sin(π2x)+cos(π2x)dx\Rightarrow I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin \left( \dfrac{\pi }{2}-x \right)+b\cos \left( \dfrac{\pi }{2}-x \right)}{\sin \left( \dfrac{\pi }{2}-x \right)+\cos \left( \dfrac{\pi }{2}-x \right)}dx}
We also know the basic relation between sin and cos is given as,
sin(π2x)=cosx\Rightarrow \sin \left( \dfrac{\pi }{2}-x \right)=\cos x
Similarly, it works the other way around too,
cos(π2x)=sinx\Rightarrow \cos \left( \dfrac{\pi }{2}-x \right)=\sin x
Substituting these in the above equation,
I=0π2acosx+bsinxcosx+sinxdx(2)\Rightarrow I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\cos x+b\sin x}{\cos x+\sin x}dx}\ldots \ldots \left( 2 \right)
Adding the two equations 1 and 2,
I+I=0π2asinx+bcosxsinx+cosxdx+0π2acosx+bsinxcosx+sinxdx\Rightarrow I+I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x}{\sin x+\cos x}dx}+\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\cos x+b\sin x}{\cos x+\sin x}dx}
Adding the terms on both left-hand and right-hand sides,
2I=0π2asinx+bcosx+acosx+bsinxsinx+cosxdx\Rightarrow 2I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\sin x+b\cos x+a\cos x+b\sin x}{\sin x+\cos x}dx}
Taking the terms, a and b common out,
2I=0π2a(sinx+cosx)+b(sinx+cosx)sinx+cosxdx\Rightarrow 2I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{a\left( \sin x+\cos x \right)+b\left( \sin x+\cos x \right)}{\sin x+\cos x}dx}
Taking the sinx+cosx\sin x+\cos x term common out in the numerator,
2I=0π2(a+b)(sinx+cosx)sinx+cosxdx\Rightarrow 2I=\int\limits_{0}^{\dfrac{\pi }{2}}{\dfrac{\left( a+b \right)\left( \sin x+\cos x \right)}{\sin x+\cos x}dx}
We can cancel the sinx+cosx\sin x+\cos x terms in the numerator and denominator and taking (a+b)\left( a+b \right) term outside the integral since they are constants,
2I=(a+b)0π21.dx\Rightarrow 2I=\left( a+b \right)\int\limits_{0}^{\dfrac{\pi }{2}}{1.dx}
Integrating and substituting the limits,
2I=(a+b)x0π2\Rightarrow 2I=\left( a+b \right)\left. x \right|_{0}^{\dfrac{\pi }{2}}
2I=(a+b)(π20)\Rightarrow 2I=\left( a+b \right)\left( \dfrac{\pi }{2}-0 \right)
Multiplying the terms on right-hand side and dividing both sides of the equation by 2,
I=π4(a+b)\Rightarrow I=\dfrac{\pi }{4}\left( a+b \right)
Hence, the solution to the above question is π4(a+b).\dfrac{\pi }{4}\left( a+b \right).

Note: It is important to know the basic integration formulae and their properties. Knowing the relation between the different trigonometric functions is important too. We need to note that the addition of two integrals with the same variable of integration and same limits can be considered as the sum under a single limit.