# Math Help - 2 integrals...

1. ## 2 integrals...

problem 1: $\int \frac{\sin 2x}{\sin ^{4}x+\cos^{4}x } dx$

problem 2 : $\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx$

please write the full solutions because i'm a integration newbie
and a very happy christmas and new year,from India

2. Hello, earthboy!

The first one requires Olympic-level gymnastics.
I hope you're up for it . . .

$\displaystyle (1)\;\int \frac{\sin 2x}{\sin^4\!x+\cos^4\!x}\,dx$

To the denominator, add and subtract $2\sin^2\!x\cos^2\!x$

$\sin^4\!x {\bf + 2\sin^2\!x\cos^2\!x} + \cos^4\!x {\bf \:-\: 2\sin^2\!x\cos^2\!x}$

. . $=\;(\sin^4\!x + 2\sin^2\!x\cos^2\!x + \cos^4\!x) - \frac{1}{2}\cdot4\sin^2\!x\cos^2\!x}$

. . $=\;\underbrace{(\sin^2\!x + \cos^2\!x)^2}_{\text{This is }1^2} - \frac{1}{2}\underbrace{(2\sin x\cos x)^2}_{\text{This is }\sin^22x} \;\;=\;\;1 - \frac{1}{2}\sin^22x$

. . $=\;\; \frac{1}{2}\left[2 - \sin^22x\right] \;\;=\;\;\frac{1}{2}\left[1 + 1 - \sin^22x\right] \;\;=\;\; \frac{1}{2}\left[1 + \cos^2\!2x\right]$

The integral becomes: . $\displaystyle \int\frac{\sin 2x\,dx}{\frac{1}{2}(1 + \cos^2\!2x)} \;\;=\;\;2\int\frac{\sin2x\,dx}{1 + \cos^2\!2x}$

Let: $u \:=\:\cos2x \quad\Rightarrow\quad du \:=\:\text{-}2\sin2x\,dx \quad\Rightarrow\quad \sin2x\,dx \:=\:\text{-}\frac{1}{2}du$

Substitute: . $\displaystyle 2\int \frac{-\frac{1}{2}du}{1 + u^2} \;=\;-\int\frac{du}{1+u^2} \;\;=\;\;-\arctan u + C$

Back-substitute: . $-\arctan(\cos 2x) + C$

3. Originally Posted by earthboy
problem 1: $\int \frac{\sin 2x}{\sin ^{4}x+\cos^{4}x } dx$

problem 2 : $\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx$

please write the full solutions because i'm a integration newbie
and a very happy christmas and new year,from India
Here's an alternative for (1)

$\left[sin^2x+cos^2x\right]\left[sin^2x+cos^2x\right]=1=sin^4x+cos^4x+2(sinxcosx)^2$

$\displaystyle\Rightarrow\ sin^4x+cos^4x=1-2(sinxcosx)^2=1-\frac{1}{2}(2sinxcosx)^2=1-\frac{1}{2}sin^22x$

$\displaystyle\int{\frac{sin2x}{sin^4x+cos^4x}}dx=\ int{\frac{sin2x}{1-\frac{1}{2}sin^22x}}dx=\int{\frac{sin2x}{1-\frac{1}{2}\left[1-cos^22x\right]}}dx$

$u=cos2x\Rightarrow\ du=-2sin2xdx$

$\displaystyle\ -\frac{1}{2}\int{\frac{du}{1-\frac{1}{2}\left[1-u^2\right]}=-\int{\frac{du}{1+u^2}}$

For (2)

$cos3x=cos(2x+x)$

Use the identity $cos(A+B)=cosAcosB-sinAsinB$

$cos3x=cos2xcosx-sin2xsinx=\left[2cos^2x-1\right]cosx-2sin^2xcosx$

$=2cos^3x-cosx-2\left[1-cos^2x\right]cosx$

$=2cos^3x+2cos^3x-cosx-2cosx=4cos^3x-3cosx$

The integral is

$\displaystyle\int_{0}^{\pi}\left[{4cos^2x-3}\right]dx$

4. Originally Posted by earthboy
problem 1: $I = \int \frac{\sin 2x}{\sin ^{4}x+\cos^{4}x } dx$
By the fact that $a^4+b^4 = (a^2+b^2)^2-2(ab)^2$ we have:

$\sin^4{x}+\cos^4{x} = \left(\sin^2{x}+\cos^2{x}\right)^2-2\left(\sin{x}\cos{x}\right)^2 = 1-2\left(\frac{1}{2}\sin{2x}\right)^2 = 1-\frac{1}{2}\sin^2{2x}.$

\begin{aligned} \\& \int\frac{\sin{2x}}{1-\frac{1}{2}\sin^2{2x}}\;{dx} = \int\frac{2\sin{2x}}{2-\sin^2{2x}}\;{dx} = \int\frac{2\sin{2x}}{\left(\sqrt{2}-\sin{2x}}\right)\left(\sqrt{2}+\sin{2x}\right)}\;{ dx} \\& = \int\frac{\left(\sqrt{2}+\sin{2x}\right)-\left(\sqrt{2}-\sin{2x}\right)}{\left(\sqrt{2}-\sin{2x}}\right)\left(\sqrt{2}+\sin{2x}\right)}\;{ dx} = \int\frac{1}{\sqrt{2}-\sin{2x}}}\:{dx}-\int\frac{1}{\sqrt{2}+\sin{2x}}}\;{dx}\end{aligned }

Put $x = \arctan{t}$, then:

$\displaystyle \int\frac{1}{\sqrt{2}-\sin{2x}}}\;{dx} = \int\frac{1}{\sqrt{2}t^2-2t+\sqrt{2}}\;{dt}$ $\displaystyle = \int\frac{\sqrt{2}}{\left(\sqrt{2}t-1\right)^2+1}\;{dt} = \frac{\sqrt{2}}{\sqrt{2}}\arctan\left(\sqrt{2}t-1\right)+k_{1}$

$\displaystyle \int\frac{1}{\sqrt{2}+\sin{2x}}}\;{dx} = \int\frac{1}{\sqrt{2}t^2+2t+\sqrt{2}}\;{dt}$ $\displaystyle = \int\frac{\sqrt{2}}{\left(\sqrt{2}t+1\right)^2+1}\ ;{dt} = \frac{\sqrt{2}}{\sqrt{2}}\arctan\left(\sqrt{2}t+1\ right)+k_{2}$

Thus $I = \arctan\left(\sqrt{2}t-1\right)-\arctan\left(\sqrt{2}t+1\right) = \arctan\left(\sqrt{2}\tan{x}-1\right)-\arctan\left(\sqrt{2}\tan{x}+1\right)+k.$

5. Originally Posted by earthboy
problem 1: $\int \frac{\sin 2x}{\sin ^{4}x+\cos^{4}x } dx$

problem 2 : $\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx$
Note that:

\displaystyle \begin{aligned}\int\frac{\sin(2x)}{\sin^4(x)+\cos^ 4(x)}\text{ }dx &= \int\frac{2\sin(x)\cos(x)}{\sin^4(x)+\cos^4(x)}\te xt{ }dx\\ &= \int\frac{\frac{2\sin(x)\cos(x)}{\cos(x)^4}}{\tan^ 4(x)+1}\text{ }dx\\ &=\int\frac{2\tan(x)\sec^2(x)}{\tan^4(x)+1}\tex t{ }dx\end{aligned}

Let $\tan^2(x)=u\implies du=2\tan(x)\sec^2(x) dx$ so that

\displaystyle \begin{aligned}\int\frac{\sin(2x)}{\sin^4(x)+\cos^ 4(x)}\text{ }dx &= \int\frac{2\tan(x)\sec^2(x)}{\tan^4(x)+1}\text{ }dx\\ &= \int\frac{du}{u^2+1}\\ &= \arctan(u)+C\\ &= \arctan\left(\tan^2(x)\right)+C\end{aligned}

6. Originally Posted by earthboy
problem 1: $\int \frac{\sin 2x}{\sin ^{4}x+\cos^{4}x } dx$

problem 2 : $\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx$

wow! so many responses! what about the second problem??? please tell if its right or wrong

$\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx
= \int\limits_{0}^{2\pi}\cos 2x dx - \int\limits_{0}^{\pi} \frac{\sin 2x \sin x}{\cos x} dx
= -2 \int\limits_{0}^{\pi} \sin^{2} x dx
= -2 \int\limits_{0}^{\pi} \frac {1 - \cos 2x}{2} dx
= - \pi$

7. Originally Posted by earthboy
wow! so many responses! what about the second problem??? please tell if its right or wrong

$\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx
= \int\limits_{0}^{2\pi}\cos 2x dx - \int\limits_{0}^{\pi} \frac{\sin 2x \sin x}{\cos x} dx
= -2 \int\limits_{0}^{\pi} \sin^{2} x dx
= -2 \int\limits_{0}^{\pi} \frac {1 - \cos 2x}{2} dx
= - \pi$
Using the cos(A+B) identity..

$\displaystyle\int_{0}^{\pi}\frac{cos3x}{cosx}dx=\i nt_{0}^{\pi}\frac{cos2xcosx-sin2xsinx}{cosx}dx$

$=\displaystyle\int_{0}^{\pi}cos2xdx-\int_{0}^{\pi}\frac{2sinxcosxsinx}{cosx}dx$

$=\displaystyle\int_{0}^{\pi}cos2xdx-\int_{0}^{\pi}2sin^2xdx=\int_{0}^{\pi}cos2xdx-\int_{0}^{\pi}(1-cos2x)dx$

$=\displaystyle\int_{0}^{\pi}(2cos2x-1)dx$

Using

$\displaystyle\frac{d}{dx}sin2x=2cos2x$

$\displaystyle\int_{0}^{\pi}(2cos2x-1)dx=sin(2{\pi})-{\pi}=-{\pi}$

gives an incorrect answer for the area between the curve and the x-axis,
since the graph of the function crosses the x-axis twice between $0$ and ${\pi}.$

Hence, the x-axis crossing points are at

$\displaystyle\ 2cos2x-1=0\Rightarrow\ cos2x=\frac{1}{2}$

$\displaystyle\Rightarrow\ 2x=\frac{\pi}{3},\;\;x=\frac{\pi}{6}$

and at

$\displaystyle\ 2x=\frac{5{\pi}}{3},\;\;x=\frac{5{\pi}}{6}$

Inverting the negative sign for the integral in the middle part, the area is

$\displaystyle\int_{0}^{\frac{\pi}{6}}(2cos2x-1)dx-\int_{\frac{\pi}{6}}^{\frac{5{\pi}}{6}}(2cos2x-1)dx+\int_{\frac{5{\pi}}{6}}^{\pi}(2cos2x-1)dx$

which gives

$\displaystyle\ 2\frac{3\sqrt{3}-{\pi}}{6}+\frac{2{\pi}+3\sqrt{3}}{3}=2\sqrt{3}+\fr ac{\pi}{3}$

8. Originally Posted by Archie Meade

gives an incorrect answer for the area between the curve and the x-axis,
since the graph of the function crosses the x-axis twice between $0$ and ${\pi}.$
I concur with the OP's answer. I get $-\pi$ also.

9. @ Archie Meade, but we are not calculating the area, right? Just the definite integral!
Originally Posted by earthboy
please tell if its right or wrong
$\int\limits_{0}^{\pi} \frac{\cos (3x)}{\cos x} dx
= \int\limits_{0}^{2\pi}\cos 2x dx - \int\limits_{0}^{\pi} \frac{\sin 2x \sin x}{\cos x} dx
= -2 \int\limits_{0}^{\pi} \sin^{2} x dx
= -2 \int\limits_{0}^{\pi} \frac {1 - \cos 2x}{2} dx
= - \pi$
Looks good to me!

10. I'd like to remark that one can do $\displaystyle I_n=\int_0^{\pi}\frac{\cos(nx)}{\cos(x)}\text{ }dx$ in general and what is interesting (not really 'unbelievable' though if you see why) is that $I_n=0,\text{ }n\text{ even}$.

11. Yes, definite integral answer is fine for average value over the interval.

Alternative for area (application of integration).

12. Originally Posted by Drexel28
I'd like to remark that one can do $\displaystyle I_n=\int_0^{\pi}\frac{\cos(nx)}{\cos(x)}\text{ }dx$ in general and what is interesting (not really 'unbelievable' though if you see why) is that $I_n=0,\text{ }n\text{ even}$.
Let me try that.

Spoiler:
Putting $x\mapsto \pi-x$, we have:

$\displaystyle I_{n} = \int_{0}^{\pi}\frac{\cos{nx}}{\cos{x}}\;{dx} = -\int_{\pi}^{0}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx} = \int_{0}^{\pi}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx}.$

Noting that $\cos\left(n\pi-nx\right) = (-1)^n\cos{nx}$ and that $\cos\left(\pi-x\right) = -\cos{x}$, we have:

$\displaystyle 2I_{n} = \int_{0}^{\pi}\frac{\cos{nx}}{\cos{x}}\;{dx}+\int_ {0}^{\pi}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx} = \int_{0}^{\pi}\frac{\cos{nx}-(-1)^n\cos{nx}}{\cos{x}}\;{dx}.$

If $n$ is even, then $(-1)^n\cos{nx} = \cos{nx}$, and so:

$\displaystyle I_{n} = \frac{1}{2} \int_{0}^{\pi}\frac{\cos{nx}-\cos{nx}}{\cos{x}}\;{dx} = 0.$

13. Originally Posted by TheCoffeeMachine
Let me try that.

Spoiler:
Putting $x\mapsto \pi-x$, we have:

$\displaystyle I_{n} = \int_{0}^{\pi}\frac{\cos{nx}}{\cos{x}}\;{dx} = -\int_{\pi}^{0}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx} = \int_{0}^{\pi}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx}.$

Noting that $\cos\left(n\pi-nx\right) = (-1)^n\cos{nx}$ and that $\cos\left(\pi-x\right) = -\cos{x}$, we have:

$\displaystyle 2I_{n} = \int_{0}^{\pi}\frac{\cos{nx}}{\cos{x}}\;{dx}+\int_ {0}^{\pi}\frac{\cos\left(n\pi-nx\right)}{\cos\left(\pi-x\right)}\;{dx} = \int_{0}^{\pi}\frac{\cos{nx}-(-1)^n\cos{nx}}{\cos{x}}\;{dx}.$

If $n$ is even, then $(-1)^n\cos{nx} = \cos{nx}$, and so:

$\displaystyle I_{n} = \frac{1}{2} \int_{0}^{\pi}\frac{\cos{nx}-\cos{nx}}{\cos{x}}\;{dx} = 0.$
Good, good. But you can shorten it to

Spoiler:

\displaystyle \begin{aligned}I_{2k} &= \int_0^{\pi}\frac{\cos(2k x)}{\cos(x)}\text{ }dx\\ &=\int_{0}^{\pi}\frac{\cos(2k(\pi-x))}{\cos(\pi-x)}\text{ }dx\\ &= \int_0^{\pi}\frac{\cos(2 k x)}{-\cos(x)}\text{ }dx\\ &= -I_{2k}\end{aligned}