Integrating trig equations

jonnburton

Junior Member
Joined
Dec 16, 2012
Messages
155
I've had to integrate the following function, and believe I have followed the instructions laid out in the book for doing so but have come to the wrong answer.

Find \(\displaystyle \int^0_{-\frac{\pi}{4}} \frac{2}{cosx - sin x} dx\)


To put this into terms that can be integrated:

\(\displaystyle cos x - sin x = Rcos(x - \alpha)\)

\(\displaystyle Rcosxcos\alpha - Rsinxsin\alpha =cos x - sin x \)


\(\displaystyle Rcos\alpha =1\)
\(\displaystyle Rsin\alpha =1\)

\(\displaystyle R(cos^2\alpha + sin^2\alpha) = \sqrt{1^2 + 1^2} = \sqrt 2\)

\(\displaystyle \sqrt2 cos\alpha = 1\)

\(\displaystyle \alpha = 0.785^c\)


\(\displaystyle cosx - sinx = \sqrt2 cos(x-0.785^c)\)


So now the integral can be expressed as:

\(\displaystyle \int^0_{-\frac{\pi}{4}} \frac{2}{\sqrt2 cos(x-0.785^c)}dx\)

Factoring out the constants\(\displaystyle 2\) and \(\displaystyle \frac{1}{\sqrt2}\):

\(\displaystyle \frac{2}{\sqrt2}\int^0_{-\frac{\pi}{4}} \frac{1}{ cos(x-0.785^c)}dx

\(\displaystyle \frac{2}{\sqrt2}\int^0_{-\frac{\pi}{4}} sec(x - 0.785^c)dx\)


\(\displaystyle \int sec (x) dx = ln|sec (x) + tan(x)|+c \)

so this integral comes to:

\(\displaystyle \left[ln|sec (x-0.785^c) + tan (x-0.785^c)\right]^0_\frac{-\pi}{4}\)


Could anybody tell me whether what I have done up to this stage is correct? Despite checking it several times, my answer is nothing like that provided in the book, which is \(\displaystyle \sqrt2 ln(1+\sqrt2)\)\)
 
I've had to integrate the following function, and believe I have followed the instructions laid out in the book for doing so but have come to the wrong answer.

Find \(\displaystyle \int^0_{-\frac{\pi}{4}} \frac{2}{cosx - sin x} dx\)


To put this into terms that can be integrated:

\(\displaystyle cos x - sin x = Rcos(x - \alpha)\)

\(\displaystyle Rcosxcos\alpha - Rsinxsin\alpha =cos x - sin x \)


\(\displaystyle Rcos\alpha =1\)
\(\displaystyle Rsin\alpha =1\)

\(\displaystyle R(cos^2\alpha + sin^2\alpha) = \sqrt{1^2 + 1^2} = \sqrt 2\)

\(\displaystyle \sqrt2 cos\alpha = 1\)

\(\displaystyle \alpha = 0.785^c\)
What in the world is "c"? At first I thought you had intended \(\displaystyle 0.785^o\) or "degrees" but that is certanly wrong. If \(\displaystyle cos(\alpha)= \frac{1}{\sqrt{2}}\) then \(\displaystyle \alpha= 45^o\) or \(\displaystyle \frac{\pi}{4}\) radians. And since the lower limit of integration is \(\displaystyle \pi/4\) radians is clearly intended.

(And, in fact, the derivative of sin(x) is cos(x) and the derivative of cos(x) is -sin(x) only when x is in radians. In any Calculus problem, unless an angle measurement is specifically give in degrees, radian measure is intended.)


\(\displaystyle cosx - sinx = \sqrt2 cos(x-0.785^c)\)


So now the integral can be expressed as:

\(\displaystyle \int^0_{-\frac{\pi}{4}} \frac{2}{\sqrt2 cos(x-0.785^c)}dx\)
No, \(\displaystyle \int_0^{-\frac{\pi}{4}} \frac{2}{\sqrt{2} cos(x- \pi/4)}dx\)

Factoring out the constants\(\displaystyle 2\) and \(\displaystyle \frac{1}{\sqrt2}\):

\(\displaystyle \frac{2}{\sqrt2}\int^0_{-\frac{\pi}{4}} \frac{1}{ cos(x-0.785^c)}dx\)
Surely you realize that \(\displaystyle \frac{2}{\sqrt{2}}= \sqrt{2}\)? The integral should be
\(\displaystyle -\sqrt{2}\int_{-\frac{\pi}{4}}^0 \frac{1}{cos(x-\pi/4)}dx\)

\(\displaystyle \frac{2}{\sqrt2}\int^0_{-\frac{\pi}{4}} sec(x - 0.785^c)dx\)


\(\displaystyle \int sec (x) dx = ln|sec (x) + tan(x)|+c \)

so this integral comes to:

\(\displaystyle \left[ln|sec (x-0.785^c) + tan (x-0.785^c)\right]^0_\frac{-\pi}{4}\)


Could anybody tell me whether what I have done up to this stage is correct? Despite checking it several times, my answer is nothing like that provided in the book, which is \(\displaystyle \sqrt2 ln(1+\sqrt2)\)
Again, no. You should have \(\displaystyle x- \pi/4\) instead of "x- 0.75".
 
Last edited:
Hello, jonnburton!

\(\displaystyle \displaystyle I \;=\;\int^0_{\text{-}\frac{\pi}{4}} \frac{2}{\cos x - \sin x}\,dx\)
The denominator is:
.. \(\displaystyle \cos x - \sin x \;=\;\sqrt{2}\left(\frac{1}{\sqrt{2}}\cos x - \frac{1}{\sqrt{2}}\sin x\right)\)

n . . . . . . . . . . \(\displaystyle =\;\sqrt{2}\left(\cos\frac{\pi}{4}\cos x - \sin\frac{\pi}{4}\sin x\right) \)

n . . . . . . . . . . \(\displaystyle =\;\sqrt{2}\cos\left(x + \frac{\pi}{4}\right)\)


Then: .\(\displaystyle \displaystyle I \;=\;\int^0_{\text{-}\frac{\pi}{4}}\frac{2}{\sqrt{2}\cos(x+\frac{\pi}{4})}\,dx \;=\; \sqrt{2}\int^0_{\text{-}\frac{\pi}{4}}\sec(x + \tfrac{\pi}{4})\,dx \)

. . . . . . .\(\displaystyle =\;\sqrt{2}\,\ln\left|\sec(x+ \tfrac{\pi}{4}) + \tan(x+ \tfrac{\pi}{4})\right|\,\bigg]^0_{\text{-}\frac{\pi}{4}}\)

. . . . . . .\(\displaystyle =\;\sqrt{2}\bigg[\ln\left|\sec\tfrac{\pi}{4} + \tan\tfrac{\pi}{4}\right| - \ln\big|\sec 0 + \tan 0\big| \bigg]\)

. . . . . . .\(\displaystyle =\;\sqrt{2}\bigg[\ln\left|\sqrt{2} + 1\right| - \ln\big|1 + 0\big|\bigg]\)

. . . . . . .\(\displaystyle =\;\sqrt{2}\ln\left|1 + \sqrt{2}\right|\)
 
Thanks a lot for your replies.

The superscript c was supposed to indicate radians - my textbook uses this symbol for radian measure.

One thing I've seen is that I got confused with the signs at the start.Writing \(\displaystyle cos x - sin x = Rcos(x+\alpha)\) and not \(\displaystyle Rcos(x-\alpha)\) might have avoided this.

The other thing is, I didn't notice the angle involved was \(\displaystyle \frac{\pi}{4}\).

And I should without doubt have seen that the factor to bring out was \(\displaystyle \sqrt2\). I admit that only after writing it down after it was pointed out did I realise that \(\displaystyle \frac{2}{\sqrt2} = \sqrt2\).

I should familiarize myself with the decimal equivalents of things like \(\displaystyle \frac{\pi}{4}\) to avoid confusion.

Thanks again.
 
Top