1

Find the integral $$I=\int\dfrac{\sin^2(x)dx}{\sin(x)+2\cos(x)}$$

Putting $t=\tan\dfrac{x}{2}\Rightarrow x=2\arctan(t), dx=\dfrac{2dt}{1+t^2},\sin(x)=\dfrac{2t}{1+t^2},\cos(x)=\dfrac{1-t^2}{1+t^2}$ gives $$\begin{align*} I &= \int\dfrac{\sin^2(x)dx}{\sin(x)+2\cos(x)} \\ &= \int\dfrac{\frac{4t^2}{(1+t^2)^2}\frac{2dt}{1+t^2}}{\frac{2t}{1+t^2}+\frac{2(1-t^2)}{1+t^2}}=\int\dfrac{\frac{8t^2dt}{(1+t^2)^3}}{\frac{2t+2-2t^2}{1+t^2}}=\int\dfrac{\frac{4t^2dt}{(1+t^2)^2}}{-t^2+t+1}=\int\dfrac{4t^2}{(1+t^2)^2(-t^2+t+1)}dt, \end{align*} $$ but this doesn't seem fun to integrate even thought it's a rational function. Is there a better approach (maybe a better substitution)?

SAQ
  • 367

2 Answers2

1

You can decompose the integrand from the start as

$$\begin{align*} \frac{\sin^2x}{\sin x+2\cos x} &= \frac{\sin^2x(\sin x-2\cos x)}{\sin^2x-4\cos^2x} \\ &= \frac{\sin^2x(\sin x-2\cos x)}{5\sin^2x-4} \\ &= \frac15 (\sin x-2\cos x) - \frac85 \cdot \frac{\cos x}{5\sin^2x-4} + \frac45 \cdot \frac{\sin x}{5\sin^2x-4} \end{align*}$$

Integrating the first two terms is easy. For the last term, employing the half-angle tangent sub leaves you with

$$\int \frac{\sin x}{5\sin^2x-4} \, dx \stackrel{x=2\arctan t}= - \int \frac{t}{t^4-3t^2+1} \, dt$$

and integrating becomes trivial upon completing the square in the denominator.

Alternatively, as OP pointed out in comments below, we have

$$\frac{\sin x}{5\sin^2x-4} = \frac{\sin x}{3-5\cos^2x}$$

so using the tangent substitution for this third term is in fact overkill.

user170231
  • 19,334
  • How did you come up with the idea to multiply the numerator and the denominator by $\sin(x)+2\cos(x)$? That's not clear for me at all. What's the idea? – SAQ Jan 31 '24 at 19:16
  • Rationalizing the denominator, which relies on the identity $\cos x=\pm\sqrt{1-\sin^2x}$. – user170231 Jan 31 '24 at 19:17
  • I am not sure I understand. Why are we rationalising the denominator? There aren't any roots. What's the need to do so? – SAQ Jan 31 '24 at 19:18
  • 1
    The square root is hidden in the cosine: $\sin x+2\cos x=\sin x+2\sqrt{1-\sin^2x}$. We rationalize to remove this square root, which lets us rewrite the denominator solely in terms of sine and in this case simplifies the problem. – user170231 Jan 31 '24 at 19:23
  • Oh, I see, thank you! May you also clarify for me how did you get $$\dfrac15(\sin(x)-2\cos(x))-\dfrac85\dfrac{\cos(x)}{5\sin^2(x)-4}+\dfrac45\dfrac{\sin(x)}{5\sin^2(x)-4}$$ That step is not clear for me either. – SAQ Jan 31 '24 at 19:26
  • Sure, that's a partial fraction expansion of $\frac{\sin^2x}{5\sin^2x-4}$, then multiplied by the factor of $\sin x-2\cos x$. It may be clearer to see how that expansion is obtained by replacing $y=\sin x$; so this step is basically writing$$\frac{y^2}{5y^2-4}=\frac15+\frac{4/5}{5y^2-4}$$ – user170231 Jan 31 '24 at 19:28
  • I think I got it. But then won't we have just$$\dfrac15(\sin(x)-2\cos(x))+\dfrac45\dfrac{\sin(x)-2\cos(x)}{5\sin^2(x)-4}$$ – SAQ Jan 31 '24 at 19:35
  • Exactly right, and I split up the fraction further because the part with $\cos$ in the numerator is more immediately addressable. – user170231 Jan 31 '24 at 19:37
  • 1
    I am not sure I see why you decided to put $x=2\arctan(t)$ for the last term. $d(\cos(x))=-\sin(x)dx$. We also have $\sin^2(x)=1-\cos^2(x)$. Isn't this an alternate approach and we won't need to substitute anything? – SAQ Jan 31 '24 at 19:39
  • Of course, that's a perfectly reasonable thing to do! The half-angle $\tan$ substitution is not at all necessary for this exercise, it just happened to be the first thing to occur to me. – user170231 Jan 31 '24 at 19:42
  • And sorry for the many questions, but I'm really trying to understand. How is $\dfrac15\int(\sin(x)-2\cos(x))dx$ easy to integrate? – SAQ Jan 31 '24 at 19:43
  • That integrand is simply $\frac{d}{dx}[-\cos x-2\sin x]$ – user170231 Jan 31 '24 at 19:44
  • I am not sure why you swapped the coefficients, but I don't know how to integrate that. – SAQ Jan 31 '24 at 19:46
  • I think you do! If $\sin x-2\cos x$ is the derivative of $-\cos x-2\sin x$, then the antiderivative of $\sin x-2\cos x$ is ... – user170231 Jan 31 '24 at 19:49
  • Oh, sorry, my mistake. So the integral of the first term is $-\dfrac15\cos(x)-\dfrac25\sin(x)+C$, right? – SAQ Jan 31 '24 at 19:52
  • And I think as things turned out, it would be better if we simplified the denominator to $1-5\cos^2(x)$ in the beginning. – SAQ Jan 31 '24 at 19:57
1

To solve the integral $I = \int \frac{\sin^2(x)}{\sin(x) + 2\cos(x)} \,dx$, we can start by simplifying the integrand.

First, notice that the denominator has both $ \sin(x) $ and $ \cos(x) $. Let's express everything in terms of $ \sin(x) $ to make it easier:

$ I = \int \frac{\sin^2(x)}{\sin(x) + 2\cos(x)} \,dx $

Now, use the identity $ \cos(x) = \sqrt{1 - \sin^2(x)} $ to replace $ \cos(x) $:

$ I = \int \frac{\sin^2(x)}{\sin(x) + 2\sqrt{1 - \sin^2(x)}} \,dx $

Next, let's substitute $ u = \sin(x) $ and $ du = \cos(x) \,dx $:

$ I = \int \frac{u^2}{u + 2\sqrt{1 - u^2}} \,du $

Now, factor the denominator:

$ I = \int \frac{u^2}{u + 2\sqrt{1 - u^2}} \,du = \int \frac{u^2}{u + 2\sqrt{1 - u^2}} \cdot \frac{u - 2\sqrt{1 - u^2}}{u - 2\sqrt{1 - u^2}} \,du $

Combine the terms in the numerator:

$ I = \int \frac{u^3 - 2u^2\sqrt{1 - u^2}}{u^2 - 4(1 - u^2)} \,du $

Simplify the denominator:

$ I = \int \frac{u^3 - 2u^2\sqrt{1 - u^2}}{5u^2 - 4} \,du $

Now, perform partial fraction decomposition to break this into simpler fractions:

$ I = \int \left(\frac{1}{5} - \frac{2u}{5(u^2 - 4)} - \frac{2\sqrt{1 - u^2}}{5(u^2 - 4)}\right) \,du $

Now, you can integrate each term separately:

$ I = \frac{1}{5}u - \frac{1}{5}\ln|u + 2| - \frac{1}{5}\arcsin\left(\frac{u}{2}\right) + C $

Finally, substitute back $ u = \sin(x) $:

$ I = \frac{1}{5}\sin(x) - \frac{1}{5}\ln|\sin(x) + 2| - \frac{1}{5}\arcsin\left(\frac{\sin(x)}{2}\right) + C $

where $ C $ is the constant of integration.

Ahmad Bazzi
  • 12,076