What is f(x) = int xsinx- sec2x dxf(x)=xsinxsec2xdx if f(pi/12)=-2 f(π12)=2?

1 Answer

color(blue)(f(x)=-x*cos x+sin x-1/2 ln (sec 2x+tan 2x) + 1/2 ln sqrt3+pi/24*sqrt(2+sqrt3)-1/2*sqrt(2-sqrt3)-2)f(x)=xcosx+sinx12ln(sec2x+tan2x)+12ln3+π242+312232

also color (blue)(f(x)=-x*cos x+sin x-1/2 ln (sec 2x+tan 2x) -1.73129)f(x)=xcosx+sinx12ln(sec2x+tan2x)1.73129

Explanation:

Start by performing color(blue)(" Integration by parts") Integration by parts using the formula

color(blue)(int u dv=uv-int v du )udv=uvvdu

the solution is quite long because it consists of two terms.

from the given:

int (x sin x - sec 2x) dx(xsinxsec2x)dx

color (red)("First part:")First part:

int (x sinx) dx(xsinx)dx

Let u=xu=x, and dv=sin x dxdv=sinxdx
and v=-cos xv=cosx and du=dxdu=dx

so that int (x sinx) dx=-x*cos x-int -cos x dx(xsinx)dx=xcosxcosxdx

then color (blue)(int (x sinx) dx=-x*cos x+sin x)(xsinx)dx=xcosx+sinx

color (red)(" second part:") second part:

Use the formula: int (sec u) du=ln (sec u+tan u)+C(secu)du=ln(secu+tanu)+C

so that

color(blue)(int sec 2x dx=1/2*ln(sec 2x+tan 2x))sec2xdx=12ln(sec2x+tan2x)

Now , combine the first and second parts

color (magenta)(f(x)=int (x sin x - sec 2x) dx=f(x)=(xsinxsec2x)dx=
color(magenta)(-x*cos x+sin x-1/2*ln(sec 2x+tan 2x)+C)xcosx+sinx12ln(sec2x+tan2x)+C

Solve for C: using f(pi/12)=-2f(π12)=2 and then

-2=-(pi/12)*cos (pi/12)+sin (pi/12)-1/2*lnabs(sec 2*(pi/12)+tan 2*(pi/12))+C2=(π12)cos(π12)+sin(π12)12lnsec2(π12)+tan2(π12)+C

-2=-(pi/12)*1/2*sqrt(2+sqrt3)+1/2*sqrt(2-sqrt3)-1/2*lnabs(2/sqrt3+1/sqrt3)+C2=(π12)122+3+122312ln23+13+C

C=1/2 ln sqrt3+pi/24*sqrt(2+sqrt3)-1/2*sqrt(2-sqrt3)-2C=12ln3+π242+312232

The final answer is

color (magenta)(f(x)=-x*cos x+sin x-1/2 ln (sec 2x+tan 2x) + 1/2 ln sqrt3+pi/24*sqrt(2+sqrt3)-1/2*sqrt(2-sqrt3)-2)f(x)=xcosx+sinx12ln(sec2x+tan2x)+12ln3+π242+312232

simplifying the square roots we have the following

color (magenta)(f(x)=-x*cos x+sin x-1/2 ln (sec 2x+tan 2x) -1.73129)f(x)=xcosx+sinx12ln(sec2x+tan2x)1.73129