Solveeit Logo

Question

Question: Find the solution of the integral \[\int_{ - \pi }^\pi {{{\left( {\cos ax - \sin bx} \right)}^2}dx} ...

Find the solution of the integral ππ(cosaxsinbx)2dx\int_{ - \pi }^\pi {{{\left( {\cos ax - \sin bx} \right)}^2}dx} where aa and bb are integers. Choose the correct option.
a. π- \pi
b. 0
c. π\pi
d. 2π2\pi

Explanation

Solution

Hint—We will use the property (ab)2=a2+b22ab{\left( {a - b} \right)^2} = {a^2} + {b^2} - 2ab and then integrate each value separately and applying the limits also from π- \pi to π\pi . The value of the integral 2cosaxsinbx=02\cos ax\sin bx = 0 as cosaxsinbx\cos ax\sin bx is an odd function in the interval [π,π]\left[ { - \pi ,\pi } \right].

Complete step-by-step solution
Consider the given integral,
I=ππ(cosaxsinbx)2dxI = \int_{ - \pi }^\pi {{{\left( {\cos ax - \sin bx} \right)}^2}dx}
Use the property (ab)2=a2+b22ab{\left( {a - b} \right)^2} = {a^2} + {b^2} - 2ab to expand the given function,
We get,

I=ππ(cos2ax+sin2bx2cosaxsinbx)dx =ππcos2axdx+ππsin2bxdxππ2cosaxsinbxdx  I = \int_{ - \pi }^\pi {\left( {{{\cos }^2}ax + {{\sin }^2}bx - 2\cos ax\sin bx} \right)dx} \\\ = \int_{ - \pi }^\pi {{{\cos }^2}axdx} + \int_{ - \pi }^\pi {{{\sin }^2}bxdx} - \int_{ - \pi }^\pi {2\cos ax\sin bxdx} \\\

Here, we know that cosaxsinbx\cos ax\sin bx is an odd function in the interval [π,π]\left[ { - \pi ,\pi } \right].
Thus, from this we get, 2cosaxsinbx=02\cos ax\sin bx = 0.
Hence, put the value in the integral,
I=ππcos2axdx+ππsin2bxdx0I = \int_{ - \pi }^\pi {{{\cos }^2}axdx} + \int_{ - \pi }^\pi {{{\sin }^2}bxdx} - 0
Since, we know that cos2ax{\cos ^2}ax and sin2bx{\sin ^2}bx are even functions in the interval so, we will change the interval from [π,π]\left[ { - \pi ,\pi } \right] to [0,π]\left[ {0,\pi } \right] and multiply the integral by 2.
Thus, we get,
I=0π2cos2axdx+0π2sin2bxdxI = \int_0^\pi {2{{\cos }^2}axdx} + \int_0^\pi {2{{\sin }^2}bxdx}
Further, we know that, cos2ax=1+cos2ax2{\cos ^2}ax = \dfrac{{1 + \cos 2ax}}{2} and sin2bx=1cos2bx2{\sin ^2}bx = \dfrac{{1 - \cos 2bx}}{2}
Thus, put the values in the integral to simply further.
Thus, we get,

I=0π(1+cos2ax)dx+0π(1cos2bx)dx =0π(1+cos2ax+1cos2bx)dx =0π(2+cos2axcos2bx)dx  I = \int_0^\pi {\left( {1 + \cos 2ax} \right)dx} + \int_0^\pi {\left( {1 - \cos 2bx} \right)dx} \\\ = \int_0^\pi {\left( {1 + \cos 2ax + 1 - \cos 2bx} \right)dx} \\\ = \int_0^\pi {\left( {2 + \cos 2ax - \cos 2bx} \right)dx} \\\

Now, we will integrate each part individually in the integral.
Thus,

I=2[x]0π+[sin2ax2a]0π[sin2bx2b]0π =2(π0)+(sin2aπ2asin2a(0)2a)(sin2bπ2bsin2b(0)2b) =2π+sin2aπ2asin2bπ2b  I = 2\left[ x \right]_0^\pi + \left[ {\dfrac{{\sin 2ax}}{{2a}}} \right]_0^\pi - \left[ {\dfrac{{\sin 2bx}}{{2b}}} \right]_0^\pi \\\ = 2\left( {\pi - 0} \right) + \left( {\dfrac{{\sin 2a\pi }}{{2a}} - \dfrac{{\sin 2a\left( 0 \right)}}{{2a}}} \right) - \left( {\dfrac{{\sin 2b\pi }}{{2b}} - \dfrac{{\sin 2b\left( 0 \right)}}{{2b}}} \right) \\\ = 2\pi + \dfrac{{\sin 2a\pi }}{{2a}} - \dfrac{{\sin 2b\pi }}{{2b}} \\\

Now, as we know that sinnπ=0\sin n\pi = 0
Here, sin2aπ=0\sin 2a\pi = 0 and sin2bπ=0\sin 2b\pi = 0 as aa and bb are integers.
Thus, we get that,
I=2πI = 2\pi
The option (d) is the correct option, as the solution of the integral is I=2πI = 2\pi .

Note: The properties cos2x=1+cos2x2{\cos ^2}x = \dfrac{{1 + \cos 2x}}{2} and sin2x=1cos2x2{\sin ^2}x = \dfrac{{1 - \cos 2x}}{2} makes the calculation of the integral easier. We must know that the function cos2x{\cos ^2}x and sin2x{\sin ^2}x are even functions and the function cosxsinx\cos x\sin x forms an odd function. Use the fact that sinnπ=0\sin n\pi = 0 for all the values of nn.