What is #f(x) = int xsinx^2 + tan^2x -cos^2x dx# if #f(0)=-3 #?

1 Answer
Jun 6, 2018

#f(x)=-1/2cosx^2+tanx-3/2x-1/2sinxcosx-5/2#

Explanation:

#f(x)=intxsinx^2+tan^2x-cos^2xdx#

The first term is of the form #g'(x)g(x)#, so integrates to #-1/2cosx^2#.

The second term we transform by use of a standard trig identity:
#tan^2x=sec^2x-1#. We know that #d/dx(tanx)=sec^2x#, so the second term integrates to #tanx-x#.

The third term we transform by use of another standard trig identity:
#cos^2x=1/2(1+cos2x)#
So
#int-cos^2xdx=-1/2int1+cos2xdx=-1/2(x+1/2sin2x)#
Recall that #sin2x=2sinxcosx#, and so the third term integrates to
#-1/2(x+sinxcosx)#.

Put the three integrated terms together:
#f(x)=-1/2cosx^2+tanx-3/2x-1/2sinxcosx+C#

Solve for C using the given condition, #f(0)=-3#:
#-3=-1/2+0-3/2*0-1/2*0*1+C#
#-3=-1/2+C#
#C=-5/2#

So
#f(x)=-1/2cosx^2+tanx-3/2x-1/2sinxcosx-5/2#