Solution:
Key idea: An integrand built from ex becomes a rational function after the substitution u=ex; that rational function is then split into partial fractions.
Step 1 — Substitute u=ex.
We take ex out of the numerator and put ex=u, so exdx=du and e2x=u2.
∫e2x+2ex−83e2x−2exdx=∫e2x+2ex−8(3ex−2)exdx=∫u2+2u−83u−2du
Step 2 — Factorise the denominator.
We need two numbers with product −8 and sum 2; they are 4 and −2.
u2+2u−8=(u+4)(u−2)
Step 3 — Find the partial fractions.
We write (u+4)(u−2)3u−2=u+4A+u−2B, so 3u−2=A(u−2)+B(u+4).
Then we put u=−4 and u=2.
u=−4:−14Au=2:4B=−6A=37=6B=32
Step 4 — Integrate and put back u=ex.
Each fraction gives a log term, and then we replace u by ex.
∫(u+4)(u−2)3u−2du=37log∣u+4∣+32log∣u−2∣+C=37log(ex+4)+32log∣ex−2∣+C
The modulus on ex+4 can be dropped because ex+4 is always positive.
Therefore, ∫e2x+2ex−83e2x−2exdx=37log(ex+4)+32log∣ex−2∣+C, for x=log2.