Solution:
Key idea: Every term contains ex, so we put t=ex; then dx=tdt, the integrand becomes a rational function of t, and we split it into partial fractions.
Step 1 — Substitute t = eˣ.
Put t=ex, so dt=exdx; in other words, dx=tdt; also, e2x=t2.
I=∫t2+2t−83t2−2t⋅tdt
I=∫t2+2t−83t−2dt
Step 2 — Factorise the denominator.
The numbers 4 and −2 have product −8 and sum 2.
t2+2t−8=(t+4)(t−2)
Step 3 — Set up and solve the partial fractions.
We write one constant over each factor and clear the denominators.
3t−2=A(t−2)+B(t+4)
We put t=2, which removes the A term.
4=6B
B=32
We put t=−4, which removes the B term.
−14=−6A
A=37
Step 4 — Integrate.
Each fraction gives a logarithm.
I=37log∣t+4∣+32log∣t−2∣+C
Step 5 — Return to x.
We put back t=ex. Since ex+4>0, its modulus sign may be dropped.
I=37log(ex+4)+32log∣ex−2∣+C
Therefore, ∫e2x+2ex−83e2x−2exdx=37log(ex+4)+32log∣ex−2∣+C.