integral (2+8 e^x)/e^x dx
For the integrand (2+8 e^x)/e^x, substitute u = e^x and du = e^x dx:
= integral (2+8u)/u^2 du
For the integrand (2+8u)/u^2, substitute s = 2+8u and ds = 8 du:
= 8 integral s/(-2+s)^2 ds
Expanding the integrand s/(-2+s)^2 gives s/(4-4 s+s^2):
= 8 integral s/(4-4 s+s^2) ds
Rewrite the integrand s/(4-4 s+s^2) as 2/(4-4 s+s^2)+(-4+2 s)/(2 (4-4 s+s^2)):
= 8 integral (2/(4-4 s+s^2)+(-4+2 s)/(2 (4-4 s+s^2))) ds
Integrate the sum term by term and factor out constants:
= 16 integral 1/(4-4 s+s^2) ds+4 integral (-4+2 s)/(4-4 s+s^2) ds
For the integrand (-4+2 s)/(4-4 s+s^2), substitute p = 4-4 s+s^2 and dp = (-4+2 s) ds:
= 4 integral 1/p dp+16 integral 1/(4-4 s+s^2) ds
For the integrand 1/(4-4 s+s^2), complete the square:
= 16 integral 1/(-2+s)^2 ds+4 integral 1/p dp
For the integrand 1/(-2+s)^2, substitute w = -2+s and dw = ds:
= 16 integral 1/w^2 dw+4 integral 1/p dp
The integral of 1/w^2 is -1/w:
= -16/w+4 integral 1/p dp
The integral of 1/p is log(p):
= -16/w+4 log(p)+constant
Substitute back for w = -2+s:
= (4 (-4+(-2+s) log(p)))/(-2+s)+constant
Substitute back for p = 4-4 s+s^2:
= (4 (-4+(-2+s) log((-2+s)^2)))/(-2+s)+constant
Substitute back for s = 2+8 u:
= -2/u+4 log(64 u^2)+constant
Substitute back for u = e^x:
= -2 e^(-x)+4 log(64 e^(2 x))+constant, which is equivalent for restricted x values to:
= -2 e^(-x)+8 x+constant and that's your answer
J