Separate the integrals.
#f(x) = int3sinxdx - intxcosxdx#
Integrate #intxcosxdx# by parts. Let #u = x# and #dv= cosxdx#. Then #du = dx# and #v= sinx#.
#intudv = uv - intvdu#
#intxcosx = xsinx - intsinxdx#
#intxcosx = xsinx - (-cosx) + C#
#intxcosx = xsinx + cosx + C#
Put this together:
#f(x) = int3sinxdx - (xsinx + cosx) + C#
#f(x) = int3sinxdx - xsinx - cosx + C#
#f(x) = C - 3cosx - xsinx - cosx #
You can solve for #C# now. We know that when #x= (7pi)/8#, #y = 0#.
#0 = C - 3cos((7pi)/8) - (7pi)/8sin((7pi)/8) - cos((7pi)/8)#
#C = 3cos((7pi)/8) + (7pi)/8sin((7pi)/8) + cos((7pi)/8)#
This will not be an exact expression. An approximation using a calculator yields #C ~~ -2.64#.
Therefore, #f(x) = -cosx - xsinx - 3cosx - 2.64#.
Hopefully this helps!