Solution:
Key idea: First divide so that only a constant over 3cosx−5 is left. An integral of the form ∫acosx+bdx is handled with t=tan2x, using cosx=1+t21−t2 and dx=1+t22dt.
Step 1 — Divide the fraction.
We write cosx as 31[(3cosx−5)+5].
3cosx−5cosx=31+35⋅3cosx−51
So the integral becomes I=3x+35J, where J=∫3cosx−5dx.
Step 2 — Substitute t = tan(x/2) in J.
We replace cosx and dx by their expressions in t.
J=∫3⋅1+t21−t2−51⋅1+t22dt
J=∫3(1−t2)−5(1+t2)2dt
Step 3 — Simplify the denominator.
We multiply out and collect terms.
3(1−t2)−5(1+t2)=−2−8t2
J=∫−2(1+4t2)2dt
J=−∫1+4t2dt
Step 4 — Integrate.
Put s=2t, so ds=2dt; the integral becomes −21∫1+s2ds.
J=−21tan−1(2t)
J=−21tan−1(2tan2x)
Step 5 — Combine.
We put J back into Step 1.
I=3x+35(−21tan−1(2tan2x))+C
I=3x−65tan−1(2tan2x)+C
Therefore, ∫3cosx−5cosxdx=3x−65tan−1(2tan2x)+C.