<s>[INST] Find $\int_0^\frac{\pi}{2} \frac {\theta \cos \theta } { \sin \theta + \sin ^ 3 \theta }\:d\theta$ My Calc 2 teacher wasn't able to solve this:
$$\int_0^\frac{\pi}{2} \frac {\theta \cos \theta  } { \sin \theta + \sin ^ 3 \theta }\:d\theta$$
Can someone help me solve this?
 [/INST] $$
\int \frac {\theta \cos \theta  } { \sin \theta + \sin ^ 3 \theta} \,d\theta = \underbrace{\int \theta \, dx = \theta x - \int x\,d\theta}_{\text{integration by parts}}
$$
$$
dx = \frac { \cos \theta  } { \sin \theta + \sin ^ 3 \theta} \,d\theta = \frac{du}{u+u^3} = \frac{du}{u(1+u^2)} = \left( \frac A u + \frac{Bu+C}{1+u^2} \right)\,du
$$
$$
\frac{Bu}{1+u^2} \, du = \frac B 2\cdot \frac{dw} w
$$
$$
\int \frac C {1+u^2} \, du = C \arctan u +\text{constant}
$$
You need to do a bit of algebra to find the three coefficients $A,B,C$, and then put everything together.
I'm getting $A=1$, $B=-1$, $C=0$, so
$$
\int \left( \frac 1 u - \frac u {1+u^2}\right)\, du = \log |u| - \frac 1 2 \log(1+u^2) + \text{constant}
$$
but we don't need the constant: in integration by parts we need only one antiderivative, not all of them.
This is
$$
\log|\sin\theta| - \frac 1 2 \log(1+\sin^2\theta).
$$
So the integral is
$$
\theta\left( \log|\sin\theta| - \frac 1 2 \log(1+\sin^2\theta) \right) - \int \left( \log|\sin\theta| - \frac 1 2 \log(1+\sin^2\theta) \right) \, d\theta + \text{constant}
$$
I haven't taken it beyond that yet, and I don't know whether it can be done is closed form.
However, sometimes it is possible to find a definite integral even if you can't find the indefinite integral.
</s>