How to use these solu­tions

These are full worked solu­tions to the eight prac­tice ques­tions in Spe­cial Forms, Par­tial Frac­tions and Inte­gra­tion by Parts. Try each inte­gral your­self first, then fol­low the steps here to see where your work­ing agrees or dif­fers. The best check on any inte­gral is to dif­fer­en­ti­ate your answer: you should get back the func­tion you started with.

Ques­tion 1: Three direct spe­cial forms

The prob­lem

Find (a) ∫dxx2−25\displaystyle \int\frac{dx}{x^2 - 25}; (b) ∫dx4+9x2\displaystyle \int\frac{dx}{4 + 9x^2}; (c) ∫dxx2+16\displaystyle \int\frac{dx}{\sqrt{x^2 + 16}}.

Under­stand­ing the prob­lem

Each inte­grand matches one of the stan­dard forms in the les­son once you iden­tify the con­stant aa. In (b) the coef­fi­cient 99 on x2x^2 must be taken out first.

The idea

Use

∫dxx2−a2=12alog⁡∣x−ax+a∣,∫dxx2+a2=1atan⁡−1xa,∫dxx2+a2=log⁡∣x+x2+a2∣.\displaystyle \int\frac{dx}{x^2 - a^2} = \frac{1}{2a}\log\left\lvert\frac{x - a}{x + a}\right\rvert,\quad \int\frac{dx}{x^2 + a^2} = \frac1a\tan^{-1}\frac xa,\quad \int\frac{dx}{\sqrt{x^2 + a^2}} = \log\left\lvert x + \sqrt{x^2 + a^2}\right\rvert.

Step-by-step solu­tion

Part (a)

Step 1. x2−25=x2−52x^2 - 25 = x^2 - 5^2, so a=5a = 5.

Step 2. Apply the for­mula.

∫dxx2−25=12×5log⁡∣x−5x+5∣+C=110log⁡∣x−5x+5∣+C.\displaystyle \int\frac{dx}{x^2 - 25} = \frac{1}{2 \times 5}\log\left\lvert\frac{x - 5}{x + 5}\right\rvert + C = \frac{1}{10}\log\left\lvert\frac{x - 5}{x + 5}\right\rvert + C.

Part (b)

Step 1. Take out the 99 so that x2x^2 has coef­fi­cient 11.

∫dx4+9x2=19∫dxx2+49=19∫dxx2+(23)2.\displaystyle \int\frac{dx}{4 + 9x^2} = \frac19\int\frac{dx}{x^2 + \frac49} = \frac19\int\frac{dx}{x^2 + \left(\frac23\right)^2}.

Step 2. Now a=23\displaystyle a = \frac23, and 1a=32\displaystyle \frac1a = \frac32.

19⋅32tan⁡−1x2/3+C=16tan⁡−13x2+C.\displaystyle \frac19 \cdot \frac32\tan^{-1}\frac{x}{2/3} + C = \frac16\tan^{-1}\frac{3x}{2} + C.

Part (c)

Step 1. x2+16=x2+42x^2 + 16 = x^2 + 4^2, so a=4a = 4.

Step 2. Apply the for­mula.

∫dxx2+16=log⁡∣x+x2+16∣+C.\displaystyle \int\frac{dx}{\sqrt{x^2 + 16}} = \log\left\lvert x + \sqrt{x^2 + 16}\right\rvert + C.

Check­ing the answer

(b) Dif­fer­en­ti­ate: 16⋅11+9x24⋅32=14⋅44+9x2=14+9x2\displaystyle \frac16 \cdot \frac{1}{1 + \frac{9x^2}{4}} \cdot \frac32 = \frac14 \cdot \frac{4}{4 + 9x^2} = \frac{1}{4 + 9x^2}. Cor­rect.

Answer

(a) 110log⁡∣x−5x+5∣+C\displaystyle \frac{1}{10}\log\left\lvert\frac{x - 5}{x + 5}\right\rvert + C; (b) 16tan⁡−13x2+C\displaystyle \frac16\tan^{-1}\frac{3x}{2} + C; (c) log⁡∣x+x2+16∣+C\log\left\lvert x + \sqrt{x^2 + 16}\right\rvert + C.

Com­mon mis­take to avoid

In (b), do not use a=2a = 2 and for­get the 99. The for­mula needs the form x2+a2x^2 + a^2 with coef­fi­cient 11 on x2x^2.

Ques­tion 2: Com­plet­ing the square

The prob­lem

Find (a) ∫dxx2−4x+13\displaystyle \int\frac{dx}{x^2 - 4x + 13}; (b) ∫dx5−4x−x2\displaystyle \int\frac{dx}{\sqrt{5 - 4x - x^2}}.

Under­stand­ing the prob­lem

The qua­drat­ics are not yet in a stan­dard form. After com­plet­ing the square each becomes (x−h)2+a2(x - h)^2 + a^2 or a2−(x−h)2a^2 - (x - h)^2.

The idea

Com­plete the square, then use the tan⁡−1\tan^{-1} form for (a) and the sin⁡−1\sin^{-1} form for (b), with x−hx - h in place of xx.

Step-by-step solu­tion

Part (a)

Step 1. Com­plete the square: half of −4-4 is −2-2.

x2−4x+13=(x2−4x+4)+9=(x−2)2+32.x^2 - 4x + 13 = (x^2 - 4x + 4) + 9 = (x - 2)^2 + 3^2.

Step 2. Apply ∫dxX2+a2=1atan⁡−1Xa\displaystyle \int\frac{dx}{X^2 + a^2} = \frac1a\tan^{-1}\frac Xa with X=x−2X = x - 2, a=3a = 3.

∫dx(x−2)2+32=13tan⁡−1x−23+C.\displaystyle \int\frac{dx}{(x - 2)^2 + 3^2} = \frac13\tan^{-1}\frac{x - 2}{3} + C.

Part (b)

Step 1. Take out a minus sign from the xx terms and com­plete the square.

5−4x−x2=5−(x2+4x)=5−[(x+2)2−4]=9−(x+2)2=32−(x+2)2. \begin{aligned} 5 - 4x - x^2 &= 5 - (x^2 + 4x) \\ &= 5 - \bigl[(x + 2)^2 - 4\bigr] \\ &= 9 - (x + 2)^2 = 3^2 - (x + 2)^2. \end{aligned}

Step 2. Apply ∫dxa2−X2=sin⁡−1Xa\displaystyle \int\frac{dx}{\sqrt{a^2 - X^2}} = \sin^{-1}\frac Xa with X=x+2X = x + 2, a=3a = 3.

∫dx9−(x+2)2=sin⁡−1x+23+C.\displaystyle \int\frac{dx}{\sqrt{9 - (x + 2)^2}} = \sin^{-1}\frac{x + 2}{3} + C.

Check­ing the answer

(b) Dif­fer­en­ti­ate: 11−(x+2)29⋅13=19−(x+2)2\displaystyle \frac{1}{\sqrt{1 - \frac{(x + 2)^2}{9}}} \cdot \frac13 = \frac{1}{\sqrt{9 - (x + 2)^2}}, and 9−(x+2)2=5−4x−x29 - (x + 2)^2 = 5 - 4x - x^2. Cor­rect.

Answer

(a) 13tan⁡−1x−23+C\displaystyle \frac13\tan^{-1}\frac{x - 2}{3} + C; (b) sin⁡−1x+23+C\displaystyle \sin^{-1}\frac{x + 2}{3} + C.

Ques­tion 3: A lin­ear term over a qua­dratic

The prob­lem

Find ∫3x−2x2+2x+5 dx\displaystyle \int\frac{3x - 2}{x^2 + 2x + 5}\,dx.

Under­stand­ing the prob­lem

The numer­a­tor is lin­ear and the denom­i­na­tor a qua­dratic that does not fac­torise (22−20<02^2 - 20 < 0). This is the pat­tern of Exam­ple 4 in the les­son.

The idea

Write the numer­a­tor as (a mul­ti­ple of the deriv­a­tive of the denom­i­na­tor) ++ (a con­stant). The first part inte­grates to a log⁡\log; the sec­ond, after com­plet­ing the square, to a tan⁡−1\tan^{-1}.

Step-by-step solu­tion

Step 1. The deriv­a­tive of the denom­i­na­tor is 2x+22x + 2. Find λ\lambda and μ\mu with 3x−2=λ(2x+2)+μ3x - 2 = \lambda(2x + 2) + \mu.

Com­par­ing coef­fi­cients of xx: 2λ=3⇒λ=32\displaystyle 2\lambda = 3 \Rightarrow \lambda = \frac32. Con­stants: 2λ+μ=−2⇒3+μ=−2⇒μ=−52\lambda + \mu = -2 \Rightarrow 3 + \mu = -2 \Rightarrow \mu = -5.

3x−2=32(2x+2)−5.\displaystyle 3x - 2 = \frac32(2x + 2) - 5.

Step 2. Split the inte­gral.

∫3x−2x2+2x+5 dx=32∫2x+2x2+2x+5 dx−5∫dxx2+2x+5.\displaystyle \int\frac{3x - 2}{x^2 + 2x + 5}\,dx = \frac32\int\frac{2x + 2}{x^2 + 2x + 5}\,dx - 5\int\frac{dx}{x^2 + 2x + 5}.

Step 3. First inte­gral: the numer­a­tor is the deriv­a­tive of the denom­i­na­tor, so it gives a log­a­rithm (the denom­i­na­tor is always pos­i­tive, so no mod­u­lus is needed).

32log⁡(x2+2x+5).\displaystyle \frac32\log(x^2 + 2x + 5).

Step 4. Sec­ond inte­gral: com­plete the square, x2+2x+5=(x+1)2+22x^2 + 2x + 5 = (x + 1)^2 + 2^2.

5∫dx(x+1)2+22=52tan⁡−1x+12.\displaystyle 5\int\frac{dx}{(x + 1)^2 + 2^2} = \frac52\tan^{-1}\frac{x + 1}{2}.

Step 5. Com­bine.

∫3x−2x2+2x+5 dx=32log⁡(x2+2x+5)−52tan⁡−1x+12+C.\displaystyle \int\frac{3x - 2}{x^2 + 2x + 5}\,dx = \frac32\log(x^2 + 2x + 5) - \frac52\tan^{-1}\frac{x + 1}{2} + C.

Check­ing the answer

Dif­fer­en­ti­ate: 32⋅2x+2x2+2x+5−52⋅2(x+1)2+4=3x+3−5x2+2x+5=3x−2x2+2x+5\displaystyle \frac32 \cdot \frac{2x + 2}{x^2 + 2x + 5} - \frac52 \cdot \frac{2}{(x + 1)^2 + 4} = \frac{3x + 3 - 5}{x^2 + 2x + 5} = \frac{3x - 2}{x^2 + 2x + 5}. Cor­rect.

Answer

32log⁡(x2+2x+5)−52tan⁡−1x+12+C\displaystyle \frac32\log(x^2 + 2x + 5) - \frac52\tan^{-1}\frac{x + 1}{2} + C.

Ques­tion 4: Par­tial frac­tions

The prob­lem

Find (a) ∫x+4x2−3x+2 dx\displaystyle \int\frac{x + 4}{x^2 - 3x + 2}\,dx; (b) ∫2x(x+1)(x2+1) dx\displaystyle \int\frac{2x}{(x + 1)(x^2 + 1)}\,dx.

Under­stand­ing the prob­lem

Both are proper ratio­nal func­tions (the top has lower degree than the bot­tom). In (a) the denom­i­na­tor fac­torises into two lin­ear fac­tors; in (b) there is one lin­ear fac­tor and one qua­dratic fac­tor that does not fac­torise.

The idea

Split into par­tial frac­tions using the pat­terns in the les­son, find the con­stants, and inte­grate each piece.

Step-by-step solu­tion

Part (a)

Step 1. Fac­torise: x2−3x+2=(x−1)(x−2)x^2 - 3x + 2 = (x - 1)(x - 2). Write

x+4(x−1)(x−2)=Ax−1+Bx−2  ⇒  x+4=A(x−2)+B(x−1).\displaystyle \frac{x + 4}{(x - 1)(x - 2)} = \frac{A}{x - 1} + \frac{B}{x - 2} \;\Rightarrow\; x + 4 = A(x - 2) + B(x - 1).

Step 2. Put x=1x = 1: 5=A(−1)5 = A(-1), so A=−5A = -5. Put x=2x = 2: 6=B(1)6 = B(1), so B=6B = 6.

Step 3. Inte­grate.

∫(−5x−1+6x−2)dx=−5log⁡∣x−1∣+6log⁡∣x−2∣+C.\displaystyle \int\left(\frac{-5}{x - 1} + \frac{6}{x - 2}\right)dx = -5\log\lvert x - 1 \rvert + 6\log\lvert x - 2 \rvert + C.

Part (b)

Step 1. Write

2x(x+1)(x2+1)=Ax+1+Bx+Cx2+1  ⇒  2x=A(x2+1)+(Bx+C)(x+1).\displaystyle \frac{2x}{(x + 1)(x^2 + 1)} = \frac{A}{x + 1} + \frac{Bx + C}{x^2 + 1} \;\Rightarrow\; 2x = A(x^2 + 1) + (Bx + C)(x + 1).

Step 2. Put x=−1x = -1: −2=A(2)-2 = A(2), so A=−1A = -1.

Step 3. Com­pare coef­fi­cients. x2x^2: 0=A+B0 = A + B, so B=1B = 1. Con­stant term: 0=A+C0 = A + C, so C=1C = 1.

2x(x+1)(x2+1)=−1x+1+x+1x2+1.\displaystyle \frac{2x}{(x + 1)(x^2 + 1)} = \frac{-1}{x + 1} + \frac{x + 1}{x^2 + 1}.

Step 4. Split the sec­ond frac­tion as xx2+1+1x2+1\displaystyle \frac{x}{x^2 + 1} + \frac{1}{x^2 + 1} and inte­grate each part.

∫−1x+1 dx=−log⁡∣x+1∣,∫xx2+1 dx=12log⁡(x2+1),∫1x2+1 dx=tan⁡−1x.\displaystyle \begin{aligned} \int\frac{-1}{x + 1}\,dx &= -\log\lvert x + 1 \rvert, \\ \int\frac{x}{x^2 + 1}\,dx &= \frac12\log(x^2 + 1), \\ \int\frac{1}{x^2 + 1}\,dx &= \tan^{-1}x. \end{aligned}

Step 5. Com­bine.

−log⁡∣x+1∣+12log⁡(x2+1)+tan⁡−1x+C.\displaystyle -\log\lvert x + 1 \rvert + \frac12\log(x^2 + 1) + \tan^{-1}x + C.

Check­ing the answer

(b) Check the xx coef­fi­cient too: B+C=1+1=2B + C = 1 + 1 = 2, which matches 2x2x on the left. All three coef­fi­cients agree.

Answer

(a) 6log⁡∣x−2∣−5log⁡∣x−1∣+C6\log\lvert x - 2 \rvert - 5\log\lvert x - 1 \rvert + C; (b) −log⁡∣x+1∣+12log⁡(x2+1)+tan⁡−1x+C\displaystyle -\log\lvert x + 1 \rvert + \frac12\log(x^2 + 1) + \tan^{-1}x + C.

Ques­tion 5: Inte­gra­tion by parts

The prob­lem

Find (a) ∫xsin⁡3x dx\displaystyle \int x\sin 3x\,dx; (b) ∫xlog⁡(2x) dx\displaystyle \int x\log(2x)\,dx; (c) ∫x2e−x dx\displaystyle \int x^2e^{-x}\,dx.

Under­stand­ing the prob­lem

Each inte­grand is a prod­uct of two dif­fer­ent kinds of func­tion, so inte­gra­tion by parts is needed.

The idea

∫u v dx=u∫v dx−∫(u′∫v dx)dx,\displaystyle \int u\,v\,dx = u\int v\,dx - \int\left(u'\int v\,dx\right)dx,

choos­ing uu by ILATE (Inverse trig, Log, Alge­braic, Trig, Expo­nen­tial). In (a) and (c), uu is the alge­braic fac­tor; in (b), u=log⁡(2x)u = \log(2x).

Step-by-step solu­tion

Part (a)

Step 1. Take u=xu = x, v=sin⁡3xv = \sin 3x. Then u′=1u' = 1 and ∫sin⁡3x dx=−cos⁡3x3\displaystyle \int\sin 3x\,dx = -\frac{\cos 3x}{3}.

Step 2. Apply the for­mula.

∫xsin⁡3x dx=x(−cos⁡3x3)−∫1⋅(−cos⁡3x3)dx=−xcos⁡3x3+13∫cos⁡3x dx=−xcos⁡3x3+sin⁡3x9+C.\displaystyle \begin{aligned} \int x\sin 3x\,dx &= x\left(-\frac{\cos 3x}{3}\right) - \int 1 \cdot \left(-\frac{\cos 3x}{3}\right)dx \\ &= -\frac{x\cos 3x}{3} + \frac13\int\cos 3x\,dx \\ &= -\frac{x\cos 3x}{3} + \frac{\sin 3x}{9} + C. \end{aligned}

Part (b)

Step 1. Take u=log⁡(2x)u = \log(2x) (L comes before A), v=xv = x. Then u′=22x=1x\displaystyle u' = \frac{2}{2x} = \frac1x and ∫x dx=x22\displaystyle \int x\,dx = \frac{x^2}{2}.

Step 2. Apply the for­mula.

∫xlog⁡(2x) dx=x22log⁡(2x)−∫1x⋅x22 dx=x22log⁡(2x)−∫x2 dx=x22log⁡(2x)−x24+C.\displaystyle \begin{aligned} \int x\log(2x)\,dx &= \frac{x^2}{2}\log(2x) - \int\frac1x \cdot \frac{x^2}{2}\,dx \\ &= \frac{x^2}{2}\log(2x) - \int\frac x2\,dx \\ &= \frac{x^2}{2}\log(2x) - \frac{x^2}{4} + C. \end{aligned}

Part (c)

Step 1. Take u=x2u = x^2, v=e−xv = e^{-x}. Then u′=2xu' = 2x and ∫e−x dx=−e−x\displaystyle \int e^{-x}\,dx = -e^{-x}.

∫x2e−x dx=−x2e−x+∫2xe−x dx.\displaystyle \int x^2e^{-x}\,dx = -x^2e^{-x} + \int 2xe^{-x}\,dx.

Step 2. The new inte­gral still has a prod­uct, so use parts again with u=2xu = 2x, v=e−xv = e^{-x}.

∫2xe−x dx=−2xe−x+∫2e−x dx=−2xe−x−2e−x.\displaystyle \int 2xe^{-x}\,dx = -2xe^{-x} + \int 2e^{-x}\,dx = -2xe^{-x} - 2e^{-x}.

Step 3. Com­bine and fac­tor.

∫x2e−x dx=−x2e−x−2xe−x−2e−x+C=−e−x(x2+2x+2)+C.\displaystyle \int x^2e^{-x}\,dx = -x^2e^{-x} - 2xe^{-x} - 2e^{-x} + C = -e^{-x}(x^2 + 2x + 2) + C.

Check­ing the answer

(c) Dif­fer­en­ti­ate: e−x(x2+2x+2)−e−x(2x+2)=x2e−xe^{-x}(x^2 + 2x + 2) - e^{-x}(2x + 2) = x^2e^{-x}. Cor­rect.

Answer

(a) −xcos⁡3x3+sin⁡3x9+C\displaystyle -\frac{x\cos 3x}{3} + \frac{\sin 3x}{9} + C; (b) x22log⁡(2x)−x24+C\displaystyle \frac{x^2}{2}\log(2x) - \frac{x^2}{4} + C; (c) −e−x(x2+2x+2)+C-e^{-x}(x^2 + 2x + 2) + C.

Com­mon mis­take to avoid

In (b), choos­ing u=xu = x would force you to inte­grate log⁡(2x)\log(2x) first, which is harder. Fol­low ILATE.

Ques­tion 6: sin⁡−1x\sin^{-1}x and an ex(f+f′)e^x(f + f') inte­gral

The prob­lem

Find (a) ∫sin⁡−1x dx\displaystyle \int\sin^{-1}x\,dx; (b) ∫ex(tan⁡x+sec⁡2x)dx\displaystyle \int e^x\left(\tan x + \sec^2 x\right)dx.

Under­stand­ing the prob­lem

(a) has only one func­tion, but you can treat it as sin⁡−1x×1\sin^{-1}x \times 1 and use parts. (b) has the spe­cial pat­tern ex(f+f′)e^x(f + f').

The idea

(a) Parts with u=sin⁡−1xu = \sin^{-1}x, v=1v = 1. (b) Use ∫ex(f(x)+f′(x))dx=exf(x)+C\displaystyle \int e^x\bigl(f(x) + f'(x)\bigr)dx = e^xf(x) + C with f(x)=tan⁡xf(x) = \tan x.

Step-by-step solu­tion

Part (a)

Step 1. Take u=sin⁡−1xu = \sin^{-1}x, v=1v = 1. Then u′=11−x2\displaystyle u' = \frac{1}{\sqrt{1 - x^2}} and ∫1 dx=x\displaystyle \int 1\,dx = x.

∫sin⁡−1x dx=xsin⁡−1x−∫x1−x2 dx.\displaystyle \int\sin^{-1}x\,dx = x\sin^{-1}x - \int\frac{x}{\sqrt{1 - x^2}}\,dx.

Step 2. For the remain­ing inte­gral put t=1−x2t = 1 - x^2, so dt=−2x dxdt = -2x\,dx.

∫x1−x2 dx=−12∫t−1/2 dt=−t=−1−x2.\displaystyle \int\frac{x}{\sqrt{1 - x^2}}\,dx = -\frac12\int t^{-1/2}\,dt = -\sqrt t = -\sqrt{1 - x^2}.

Step 3. Sub­sti­tute back.

∫sin⁡−1x dx=xsin⁡−1x+1−x2+C.\displaystyle \int\sin^{-1}x\,dx = x\sin^{-1}x + \sqrt{1 - x^2} + C.

Part (b)

Step 1. Let f(x)=tan⁡xf(x) = \tan x. Then f′(x)=sec⁡2xf'(x) = \sec^2 x, so the inte­grand is exactly ex(f+f′)e^x(f + f').

Step 2. Apply the rule.

∫ex(tan⁡x+sec⁡2x) dx=extan⁡x+C.\displaystyle \int e^x(\tan x + \sec^2 x)\,dx = e^x\tan x + C.

Check­ing the answer

(a) Dif­fer­en­ti­ate: sin⁡−1x+x1−x2−x1−x2=sin⁡−1x\displaystyle \sin^{-1}x + \frac{x}{\sqrt{1 - x^2}} - \frac{x}{\sqrt{1 - x^2}} = \sin^{-1}x. (b) Dif­fer­en­ti­ate: extan⁡x+exsec⁡2xe^x\tan x + e^x\sec^2 x. Both cor­rect.

Answer

(a) xsin⁡−1x+1−x2+Cx\sin^{-1}x + \sqrt{1 - x^2} + C; (b) extan⁡x+Ce^x\tan x + C.

Ques­tion 7: 16−x2\sqrt{16 - x^2}

The prob­lem

Find ∫16−x2 dx\displaystyle \int\sqrt{16 - x^2}\,dx.

Under­stand­ing the prob­lem

This is the form a2−x2\sqrt{a^2 - x^2} with a=4a = 4.

The idea

Use the lesson's for­mula

∫a2−x2 dx=x2a2−x2+a22sin⁡−1xa+C.\displaystyle \int\sqrt{a^2 - x^2}\,dx = \frac x2\sqrt{a^2 - x^2} + \frac{a^2}{2}\sin^{-1}\frac xa + C.

Step-by-step solu­tion

Step 1. Iden­tify a=4a = 4, so a2=16a^2 = 16 and a22=8\displaystyle \frac{a^2}{2} = 8.

Step 2. Sub­sti­tute.

∫16−x2 dx=x216−x2+8sin⁡−1x4+C.\displaystyle \int\sqrt{16 - x^2}\,dx = \frac x2\sqrt{16 - x^2} + 8\sin^{-1}\frac x4 + C.

Check­ing the answer

Over [−4,4][-4, 4] this should give the area of a half-disc of radius 44, which is 8π8\pi. The for­mula gives 8⋅π2−8⋅(−π2)=8π\displaystyle 8 \cdot \frac{\pi}{2} - 8 \cdot \left(-\frac{\pi}{2}\right) = 8\pi. Cor­rect.

Answer

x216−x2+8sin⁡−1x4+C\displaystyle \frac x2\sqrt{16 - x^2} + 8\sin^{-1}\frac x4 + C.

Ques­tion 8: e2xsin⁡xe^{2x}\sin x by parts twice

The prob­lem

Find ∫e2xsin⁡x dx\displaystyle \int e^{2x}\sin x\,dx (use parts twice).

Under­stand­ing the prob­lem

Nei­ther fac­tor dis­ap­pears on dif­fer­en­ti­a­tion: sin⁡x\sin x turns into cos⁡x\cos x and back, e2xe^{2x} stays expo­nen­tial. After two appli­ca­tions of parts the orig­i­nal inte­gral reap­pears, and you solve for it like an unknown.

The idea

Call the inte­gral II. Apply parts twice, always keep­ing the trigono­met­ric fac­tor as uu (T before E in ILATE). You will get an equa­tion of the form I=(known)−kII = (\text{known}) - kI.

Step-by-step solu­tion

Step 1. Let I=∫e2xsin⁡x dx\displaystyle I = \int e^{2x}\sin x\,dx. Take u=sin⁡xu = \sin x, v=e2xv = e^{2x}, so ∫e2x dx=e2x2\displaystyle \int e^{2x}\,dx = \frac{e^{2x}}{2}.

I=e2x2sin⁡x−12∫e2xcos⁡x dx.\displaystyle I = \frac{e^{2x}}{2}\sin x - \frac12\int e^{2x}\cos x\,dx.

Step 2. Apply parts to ∫e2xcos⁡x dx\displaystyle \int e^{2x}\cos x\,dx with u=cos⁡xu = \cos x, u′=−sin⁡xu' = -\sin x.

∫e2xcos⁡x dx=e2x2cos⁡x+12∫e2xsin⁡x dx=e2x2cos⁡x+12I.\displaystyle \int e^{2x}\cos x\,dx = \frac{e^{2x}}{2}\cos x + \frac12\int e^{2x}\sin x\,dx = \frac{e^{2x}}{2}\cos x + \frac12 I.

Step 3. Sub­sti­tute into Step 1.

I=e2x2sin⁡x−e2x4cos⁡x−14I.\displaystyle I = \frac{e^{2x}}{2}\sin x - \frac{e^{2x}}{4}\cos x - \frac14 I.

Step 4. Move 14I\displaystyle \frac14 I to the left and solve.

54I=e2x4(2sin⁡x−cos⁡x)I=e2x5(2sin⁡x−cos⁡x)+C.\displaystyle \begin{aligned} \frac54 I &= \frac{e^{2x}}{4}(2\sin x - \cos x) \\ I &= \frac{e^{2x}}{5}(2\sin x - \cos x) + C. \end{aligned}

Check­ing the answer

Dif­fer­en­ti­ate: 2e2x5(2sin⁡x−cos⁡x)+e2x5(2cos⁡x+sin⁡x)=e2x5(5sin⁡x)=e2xsin⁡x\displaystyle \frac{2e^{2x}}{5}(2\sin x - \cos x) + \frac{e^{2x}}{5}(2\cos x + \sin x) = \frac{e^{2x}}{5}(5\sin x) = e^{2x}\sin x. Cor­rect.

Answer

∫e2xsin⁡x dx=e2x5(2sin⁡x−cos⁡x)+C\displaystyle \int e^{2x}\sin x\,dx = \frac{e^{2x}}{5}(2\sin x - \cos x) + C.

Com­mon mis­take to avoid

In the sec­ond appli­ca­tion, keep the same choice (uu = the trigono­met­ric fac­tor). Switch­ing to u=e2xu = e^{2x} undoes the first step and gives I=II = I.