To solve this we must recall that int sin (u)du = -cos u +c∫sin(u)du=−cosu+c, where uu is some function of x. In this case our u is x^3x3, so du = 3x^2du=3x2. Thus our first part of the integral will yield -cos (x^3)/3 +c−cos(x3)3+c; double checking this by differentiation, we do indeed receive 3x^2sinx^3/3 = x^2sinx^33x2sinx33=x2sinx3.
For our second part, recall that cot u = cos u/sin ucotu=cosusinu. Recall also that d/(du)sin u = (cos u) duddusinu=(cosu)du. If our u is 2x, then du is 2. Recall further that d/(du) ln u = (du)/uddulnu=duu. Using these facts...
int -cot2xdx = int -(cos2x)/(sin2x) = int -(du)/(2u) = -1/2 int (du)/u = -1/2 lnu + c = -(ln sin 2x)/2 +c∫−cot2xdx=∫−cos2xsin2x=∫−du2u=−12∫duu=−12lnu+c=−lnsin2x2+c
Thus our general f (x) is:
f (x) = -cosx^3/3 - ln (sin 2x)/2 + cf(x)=−cosx33−ln(sin2x)2+c
If f (pi/8) = -1f(π8)=−1, then...
f (pi/8) = -cos (pi^3/512)/3 -ln sin (pi/4)/2 +c = -1-> c = -1 + cos (pi^3/512)/3 + ln sin (pi/4)/2 f(π8)=−cos(π3512)3−lnsin(π4)2+c=−1→c=−1+cos(π3512)3+lnsin(π4)2
Thus...
f (x)=-cosx^3/3 -ln sin (2x)/2 -1 + cos (pi^3/512)/3 + ln sin (pi/4)/2f(x)=−cosx33−lnsin(2x)2−1+cos(π3512)3+lnsin(π4)2
This answer is somewhat lengthy yes, but note that -1 + cos (pi^3/512)/3 + ln sin (pi/4)/2−1+cos(π3512)3+lnsin(π4)2 is in fact constant and can be calculated; this calculation is left to the student as many professors would simply accept the current form.