Integral of (12sinx-2cosx+3)/(sinx+cosx) ?

1 Answer
Jun 11, 2018

#I=5x-7ln(cos(x)+sin(x))+6/sqrt(2)tanh^-1((tan(x/2)-1)/sqrt(2))+C#

Explanation:

We want to solve

#I=int(12sin(x)-2cos(x)+3)/(sin(x)+cos(x))#

Let's split this into two separate integral

#I=int(12sin(x)-2cos(x))/(sin(x)+cos(x))dx+int3/(sin(x)+cos(x))dx#

First integral

Let

#I_1=int(12sin(x)-2cos(x))/(sin(x)+cos(x))dx#

Consider the much easier integral

#I_M=Aint(sin(x)+cos(x))/(sin(x)+cos(x))dx+Bint(cos(x)-sin(x))/(sin(x)+cos(x))dx#

Now determinate the constants #color(red)(A# and #color(red)(B#, such that #color(blue)(I_1=I_M#

#A-B=12# and #A+B=-2#

Thus #color(red)(A=5# and #color(red)(B=-7#, so

#I_1=5int(sin(x)+cos(x))/(sin(x)+cos(x))dx-7int(cos(x)-sin(x))/(sin(x)+cos(x))dx#

#color(white)(I_1)=5x-7ln(cos(x)+sin(x))+C_1#

Second integral

Let

#I_2=int3/(sin(x)+cos(x))dx#

Substitute #color(blue)(u=tan(x/2) larr color(red)("Weierstrass substitution"#

#I_2=6int1/((2u)/(1+u^2)+(1-u^2)/(1+u^2))*1/(u^2+1)du#

#color(white)(I_2)=6int1/(-u^2+2u+1)du#

#color(white)(I_2)=6int1/(2-(u-1)^2)du#

Let #color(blue)(s=u-1=>ds=du#

#I_2=6int1/(2-s^2)ds#

#color(white)(I_2)=3int1/(1-(s/sqrt(2))^2)ds#

#color(white)(I_2)=6/sqrt(2)tanh^-1(s/sqrt(2))+C_1#

Substitute back #color(blue)(s=u-1# and #color(blue)(u=tan(x/2)#

#I_2=6/sqrt(2)tanh^-1((tan(x/2)-1)/sqrt(2))+C_1#

Combining these

#I=5x-7ln(cos(x)+sin(x))+6/sqrt(2)tanh^-1((tan(x/2)-1)/sqrt(2))+C#

Hopefully not too many typos :-)