Class 12 Maths, Worked in Full Past papersGet updates
CBSE Board Examination 2023 · Section C · 3 marks

Q31: ∫0π/2exsin⁡x dx\int_0^{\pi/2}e^x\sin x\,dx⁠, or ∫dxcos⁡(x−a)cos⁡(x−b)\int\frac{dx}{\cos(x - a)\cos(x - b)}

The question

(a) Evaluate :

∫0π2exsin⁡x dx\int_0^{\frac{\pi}{2}}e^x\sin x\,dx

OR

(b) Find :

∫1cos⁡(x−a) cos⁡(x−b) dx\int\frac{1}{\cos(x - a)\,\cos(x - b)}\,dx
Exam answer

(a) Let I=∫exsin⁡x dxI = \displaystyle\int e^x\sin x\,dx⁠. Integrating by parts, with sin⁡x\sin x as the first function,

Why?

The integrand is a product of a trig function and an exponential, so use integration by parts:

∫u v dx=u∫v dx−∫(dudx∫v dx)dx\begin{aligned} \int u\,v\,dx &= u\int v\,dx \\ &\quad - \int\left(\frac{du}{dx}\int v\,dx\right)dx \end{aligned}

Take u=sin⁡xu = \sin x and v=exv = e^x⁠, so ∫v dx=ex\int v\,dx = e^x and dudx=cos⁡x\frac{du}{dx} = \cos x⁠.

Either choice of first function works, as long as the second step keeps the trig function first again.

I=(sin⁡x)(ex)−∫(cos⁡x)(ex) dx\begin{aligned} I &= (\sin x)(e^x) - \int(\cos x)(e^x)\,dx \end{aligned}
I=exsin⁡x−∫cos⁡x ex dx=exsin⁡x−[cos⁡x ex−∫(−sin⁡x) ex dx]=exsin⁡x−cos⁡x ex−I\begin{aligned} I &= e^x\sin x - \int\cos x\,e^x\,dx \\ &= e^x\sin x - \Big[\cos x\,e^x \\ &\qquad - \int(-\sin x)\,e^x\,dx\Big] \\ &= e^x\sin x - \cos x\,e^x - I \end{aligned}
Why?

The first step leaves ∫cos⁡x ex dx\int\cos x\,e^x\,dx⁠. Integrate it by parts again with cos⁡x\cos x first. Its derivative is −sin⁡x-\sin x⁠.

∫cos⁡x ex dx=(cos⁡x)(ex)−∫(−sin⁡x)(ex) dx=excos⁡x+∫exsin⁡x dx=excos⁡x+I\begin{aligned} &\int\cos x\,e^x\,dx \\ &= (\cos x)(e^x) - \int(-\sin x)(e^x)\,dx \\ &= e^x\cos x + \int e^x\sin x\,dx \\ &= e^x\cos x + I \end{aligned}

Put this back into the first line:

I=exsin⁡x−(excos⁡x+I)=exsin⁡x−excos⁡x−I\begin{aligned} I &= e^x\sin x - (e^x\cos x + I) \\ &= e^x\sin x - e^x\cos x - I \end{aligned}

That brings back ∫exsin⁡x dx\int e^x\sin x\,dx⁠, which is II itself. Watch the signs: opening the bracket turns −∫(−sin⁡x)ex dx-\int(-\sin x)e^x\,dx into +∫(−sin⁡x)ex dx+\int(-\sin x)e^x\,dx⁠, and that is −I-I⁠.

∴ I=12ex(sin⁡x−cos⁡x)\therefore\ I = \frac12e^x(\sin x - \cos x)
Why?

II appears on both sides, so move it across: 2I=exsin⁡x−excos⁡x2I = e^x\sin x - e^x\cos x⁠. Then divide by 2.

I+I=exsin⁡x−excos⁡x2I=ex(sin⁡x−cos⁡x)I=12ex(sin⁡x−cos⁡x)\begin{aligned} I + I &= e^x\sin x - e^x\cos x \\ 2I &= e^x(\sin x - \cos x) \\ I &= \frac12e^x(\sin x - \cos x) \end{aligned}

No +C+ C is written here, because this result is only used for the definite integral.

∫0π/2exsin⁡x dx=12[ex(sin⁡x−cos⁡x)]0π/2=12eπ/2(1−0)−12e0(0−1)\begin{aligned} &\int_0^{\pi/2}e^x\sin x\,dx \\ &= \frac12\Big[e^x(\sin x - \cos x)\Big]_0^{\pi/2} \\ &= \frac12e^{\pi/2}(1 - 0) - \frac12e^0(0 - 1) \end{aligned}
Why?

Put in the limits, upper minus lower, with

sin⁡π2=1, cos⁡π2=0sin⁡0=0, cos⁡0=1\begin{aligned} \sin\frac{\pi}{2} &= 1,\ \cos\frac{\pi}{2} = 0 \\ \sin 0 &= 0,\ \cos 0 = 1 \end{aligned}

and e0=1e^0 = 1⁠. Watch the sign: −12(0−1)=+12-\frac12(0 - 1) = +\frac12⁠.

At x=π2: 12eπ/2(1−0)=12eπ/2At x=0: 12e0(0−1)=12(1)(−1)=−1212eπ/2−(−12)=12eπ/2+12\begin{aligned} &\text{At } x = \tfrac{\pi}{2}\text{: } \frac12e^{\pi/2}(1 - 0) \\ &= \frac12e^{\pi/2} \\[4pt] &\text{At } x = 0\text{: } \frac12e^0(0 - 1) \\ &= \frac12(1)(-1) = -\frac12 \\[4pt] &\frac12e^{\pi/2} - \left(-\frac12\right) \\ &= \frac12e^{\pi/2} + \frac12 \end{aligned}

Take out 12\frac12 for the second form: 12(eπ/2+1)\frac12\left(e^{\pi/2} + 1\right)⁠.

∴ ∫0π/2exsin⁡x dx=12eπ/2+12\therefore\ \displaystyle\int_0^{\pi/2}e^x\sin x\,dx = \frac12e^{\pi/2} + \frac12 or 12(eπ/2+1)\frac12\left(e^{\pi/2} + 1\right)⁠.

(b) Let I=∫dxcos⁡(x−a)cos⁡(x−b)I = \displaystyle\int\frac{dx}{\cos(x - a)\cos(x - b)}⁠. As (x−b)−(x−a)=a−b(x - b) - (x - a) = a - b⁠,

I=1sin⁡(a−b)×∫sin⁡[(x−b)−(x−a)]cos⁡(x−a)cos⁡(x−b) dx\begin{aligned} I &= \frac{1}{\sin(a - b)} \\ &\quad\times\int\frac{\sin[(x - b) - (x - a)]}{\cos(x - a)\cos(x - b)}\,dx \end{aligned}
Why?

The trick is to multiply and divide by the constant sin⁡(a−b)\sin(a - b)⁠. Written as sin⁡[(x−b)−(x−a)]\sin[(x - b) - (x - a)]⁠, the top can be expanded into the same angles as the bottom.

This needs sin⁡(a−b)≠0\sin(a - b) \ne 0⁠, which the question assumes.

(x−b)−(x−a)=x−b−x+a=a−b\begin{aligned} &(x - b) - (x - a) \\ &= x - b - x + a \\ &= a - b \end{aligned}

Multiplying and dividing by the same number changes nothing: sin⁡(a−b)sin⁡(a−b)=1\frac{\sin(a - b)}{\sin(a - b)} = 1⁠.

Using sin⁡(A−B)\sin(A - B) =sin⁡Acos⁡B−cos⁡Asin⁡B= \sin A\cos B - \cos A\sin B⁠, the integrand becomes

sin⁡(x−b)cos⁡(x−a)cos⁡(x−a)cos⁡(x−b)−cos⁡(x−b)sin⁡(x−a)cos⁡(x−a)cos⁡(x−b)=tan⁡(x−b)−tan⁡(x−a)\begin{aligned} &\frac{\sin(x - b)\cos(x - a)}{\cos(x - a)\cos(x - b)} \\ &\quad - \frac{\cos(x - b)\sin(x - a)}{\cos(x - a)\cos(x - b)} \\ &= \tan(x - b) - \tan(x - a) \end{aligned}
Why?

Take A=x−bA = x - b and B=x−aB = x - a⁠. Each part then cancels one cosine:

sin⁡[(x−b)−(x−a)]=sin⁡(x−b)cos⁡(x−a)−cos⁡(x−b)sin⁡(x−a)\begin{aligned} &\sin[(x - b) - (x - a)] \\ &= \sin(x - b)\cos(x - a) \\ &\quad - \cos(x - b)\sin(x - a) \end{aligned}

Split the fraction into two. In the first part cos⁡(x−a)\cos(x - a) cancels; in the second part cos⁡(x−b)\cos(x - b) cancels:

sin⁡(x−b)cos⁡(x−b)=tan⁡(x−b)\frac{\sin(x - b)}{\cos(x - b)} = \tan(x - b)

In the same way the second part gives tan⁡(x−a)\tan(x - a)⁠.

sin⁡(x−a)cos⁡(x−a)=tan⁡(x−a)\frac{\sin(x - a)}{\cos(x - a)} = \tan(x - a)
I=1sin⁡(a−b)∫tan⁡(x−b) dx−1sin⁡(a−b)∫tan⁡(x−a) dx\begin{aligned} I &= \frac{1}{\sin(a - b)}\int\tan(x - b)\,dx \\ &\quad - \frac{1}{\sin(a - b)}\int\tan(x - a)\,dx \end{aligned}
Why?

Standard integral:

∫tan⁡u du=log⁡∣sec⁡u∣+C\int\tan u\,du = \log|\sec u| + C

With u=x−bu = x - b we have du=dxdu = dx⁠, so

∫tan⁡(x−b) dx=log⁡∣sec⁡(x−b)∣+C\begin{aligned} &\int\tan(x - b)\,dx \\ &= \log|\sec(x - b)| + C \end{aligned}

The same holds with aa in place of bb⁠.

∴ I=1sin⁡(a−b)\therefore\ I = \dfrac{1}{\sin(a - b)} ×[log⁡∣sec⁡(x−b)∣\times\big[\log|\sec(x - b)| −log⁡∣sec⁡(x−a)∣]+C- \log|\sec(x - a)|\big] + C⁠.

Where this comes from

Chapter 7, Integrals: Integration by parts; trig identity integral.

Question type: (a) Integration by parts

How to spot it: click to see

(a) Type 8. Integration by parts: a product of two different kinds

Spot it: a product such as xsin⁡xx\sin x⁠, xexxe^x or xlog⁡xx\log x⁠. A lone log⁡x\log x or tan⁡−1x\tan^{-1}x works too: take the other function as 1.

Here: In exsin⁡xe^x\sin x⁠, take u=sin⁡xu = \sin x and integrate by parts twice. II comes back on the right, so solve 2I=ex(sin⁡x−cos⁡x)2I = e^x(\sin x - \cos x) before putting in the limits.

Found an error?

Tell us if something on this page is wrong or unclear. Send feedback on this question →