Indefinite Integration Problem

AI Thread Summary
The discussion revolves around the indefinite integral of 1/(sin(x) + cos(x)) and various methods to solve it. Participants suggest using trigonometric identities, such as sin(x) + cos(x) = sqrt(2)cos(x - pi/4), and substitutions like t = tan(x/2) to simplify the integral. There are debates about the correct application of algebra and trigonometric identities, with some participants correcting each other's mistakes. The conversation highlights different approaches to integrating the function, including partial fractions and recognizing the antiderivative of sec(x). Overall, the thread illustrates collaborative problem-solving in calculus.
ron_jay
Messages
81
Reaction score
0

Homework Statement



Integrate: \int \frac{1}{\sin{x}+cos{x}}dx

Homework Equations



The one above and basic integration formulae which need not be mentioned.

The Attempt at a Solution



\int \frac{1}{(\sin{x}+cos{x})} \times\frac{(\sin{x}-cos{x})}{(\sin{x}-cos{x})} dx

- \int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx

- \int \frac{\sin{x}-cos{x}}{\cos{2x}} dx

Well after that I can't figure out what to do next...
 
Last edited:
Physics news on Phys.org
-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx

break up the numerator and then use trig identities to change the denominator so you have it in terms of only cosine and sine respectively.

i'm doing it right now, interesting.
 
Last edited:
argh ... hm
 
ron_jay said:
-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx
This is incorrect. There should be no negative sign in front of the integral.
 
he factored out a negative so he could change it to cos2x unless i forgot my algebra.

\sin^{2}x-\cos^{2}x \rightarrow -(\cos^{2}x-\sin^{2}x)
 
Whao! My bad, didn't realize he'd swapped the cosine and sine.
 
How about using the identity sin(x)+cos(x)=sqrt(2)cos(x-pi/4), if you know the antiderivative of sec(x)?

Or the substitution t=tan(x/2)?
 
rocophysics said:
-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx

break up the numerator and then use trig identities to change the denominator so you have it in terms of only cosine and sine respectively.

i'm doing it right now, interesting.

How about splitting this into two terms and substituting 2cos^2(x)-1 for the denominator in one case and 1-2sin^2(x) in the other? (Though morphisms first suggestion is much more direct).
 
Dick said:
How about splitting this into two terms and substituting 2cos^2(x)-1 for the denominator in one case and 1-2sin^2(x) in the other? (Though morphisms first suggestion is much more direct).
Yes, that's what I meant. I didn't state it clearly so that the OP could work it. After doing that though, I didn't like the results.
 
  • #10
rocophysics said:
Yes, that's what I meant. I didn't state it clearly so that the OP could work it. After doing that though, I didn't like the results.

It's not that bad. Then you just have to apply partial fractions to integrate 1/(2u^2-1). You can see the sqrt(2) popping up, which corresponds to stuff you would get in morphism's approach if you expand the trig functions and use stuff like sin(pi/4)=sqrt(2)/2.
 
  • #11
Dick said:
It's not that bad. Then you just have to apply partial fractions to integrate 1/(2u^2-1). You can see the sqrt(2) popping up, which corresponds to stuff you would get in morphism's approach if you expand the trig functions and use stuff like sin(pi/4)=sqrt(2)/2.
K let me keep going further, I bet I'm having more fun with this Integral than ron_jay, lol.
 
  • #12
morphism said:
How about using the identity sin(x)+cos(x)=sqrt(2)cos(x-pi/4), if you know the antiderivative of sec(x)?

Or the substitution t=tan(x/2)?

This is an interesting proposition, however, I have not come across the given identity yet or the anti-derivative of sec(x). So either I do it in a different way or learn these new identities, the proof of which I would be glad if you could post a link to.

Dick said:
How about splitting this into two terms and substituting 2cos^2(x)-1 for the denominator in one case and 1-2sin^2(x) in the other? (Though morphisms first suggestion is much more direct).

By splitting, is this what you mean:

\int \frac{\cos{x}}{1-2\sin^2{x}} - \frac{\sin{x}}{2\cos^2{x}-1} dx
 
Last edited:
  • #13
morphism said:
How about using the identity sin(x)+cos(x)=sqrt(2)cos(x-pi/4), if you know the antiderivative of sec(x)?

Or the substitution t=tan(x/2)?

Where did you get this identity from? Just plug in x= 60 or any value and see if you get LHS=RHS
 
  • #14
ron_jay said:
This is an interesting proposition, however, I have not come across the given identity yet or the anti-derivative of sec(x). So either I do it in a different way or learn these new identities, the proof of which I would be glad if you could post a link to.
By splitting, is this what you mean:

\int \frac{\cos{x}}{2\cos^2{x}-1} - \frac{\sin{x}}{1-2\sin^2{x}} dx
you chose the wrong trig identities

if you switch around the denominators, do you notice that you can use u-substitutions?

from there, 1 will be nice to integrate while the other you will need to use partial fractions.
 
  • #15
The identity is just cos(x-y)=sin(x)sin(y)+cos(x)cos(y) with y=pi/4 so that sin(y)=cos(y)=1/sqrt(2). [unplebeian: make sure you don't confuse radians with degrees.]

As for the antiderivative of sec(x), there are several ways of computing it - I count 3 off the top of my head. I will demonstrate how it can be done with the substitution t=tan(x/2), although it's not the slickest way to go about it.

First we need the following preliminary result:
cos(x) = cos^2(x/2) - sin^2(x/2) = (1 - tan^2(x/2))/sec^2(x/2) = (1-t^2)/(1+t^2)
(Try to see if you can get a corresponding result for sin(x)!)

Now onto \int \sec x \, dx. If we let t=tan(x/2), then dt/dx=(1/2)sec^2(x/2)=(1+t^2)/2. So:

\int \sec x \, dx = \int \frac{1}{\cos x} \, dx = \int \frac{1}{\frac{1-t^2}{1+t^2}} \cdot \frac{2}{1+t^2} \, dt

Try to take it from here.
 
  • #16
I prefer this way:

\int \sec x dx = \int \frac{\sec x(\sec x + \tan x)}{\sec x + \tan x} dx

= \int \frac{\sec^2 x + \sec x \tan x}{\sec x + \tan x}dx = ln |\sec x + \tan x| + C
 
Last edited:
  • #17
Is this right?

the square root of the sum of the squares of the coefficients of the sine and cosine is \sqrt2. Therefore, we multiply both the numerator and the denominator by \frac{1}{\sqrt2}:\frac{1}{\sqrt2} \int \frac{1}{\frac{1}{\sqrt2}\sin{x}+\frac{1}{\sqrt2}\cos{x}} dx

\frac{1}{\sqrt2} \int<br /> \frac{1}{\cos{x}\cos{\frac{\pi}{4}}+\sin{x}sin{\frac{\pi}{4}}} dx

\frac{1}{\sqrt2} \int \frac{1}{\cos{(x-\frac{\pi}{4}})} dx

\frac{1}{\sqrt2} \int \sec{(x-\frac{\pi}{4})} dx

using the integration :\int \sec{x} dx = ln|\sec{x}+tan{x}|+C

\frac{1}{\sqrt2} ln|\sec{(x-\frac{\pi}{4})}+tan{(x-\frac{\pi}{4})}|+C

Is this it?
 
Last edited:
  • #18
Looks fine to me.
 
  • #19
morphism said:
How about using the identity sin(x)+cos(x)=sqrt(2)cos(x-pi/4),

You first wrote the above and then said this to explain it

morphism said:
The identity is just cos(x-y)=sin(x)sin(y)+cos(x)cos(y) with y=pi/4 so that sin(y)=cos(y)=1/sqrt(2). [unplebeian: make sure you don't confuse radians with degrees.]

Am I just not getting this? It's been known to happen.
 
  • #20
unplebeian said:
Am I just not getting this? It's been known to happen.

Explicitly starting from the sum angle identity (working in radians);

\cos(A-B) = \sin(A)\sin(B)+\cos(A)\cos(B)

Setting A = x, \;\;\; B = \pi/4;

\cos\left(x-\frac{\pi}{4}\right) = \sin(x)\sin\underbrace{\left(\frac{\pi}{4}\right)}_{=1/\sqrt{2}} +\cos(x)\underbrace{\cos\left(\frac{\pi}{4}\right)}_{=1/\sqrt{2}}

Multiply both sides by \sqrt{2};

\sin(x)+\cos(x) = \sqrt{2}\cos\left(x-\frac{\pi}{4}\right)

Does that make more sense?
 
Last edited:
  • #21
morphism said:
The identity is just cos(x-y)=sin(x)sin(y)+cos(x)cos(y) with y=pi/4 so that sin(y)=cos(y)=1/sqrt(2). [unplebeian: make sure you don't confuse radians with degrees.]

As for the antiderivative of sec(x), there are several ways of computing it - I count 3 off the top of my head. I will demonstrate how it can be done with the substitution t=tan(x/2), although it's not the slickest way to go about it.

First we need the following preliminary result:
cos(x) = cos^2(x/2) - sin^2(x/2) = (1 - tan^2(x/2))/sec^2(x/2) = (1-t^2)/(1+t^2)
(Try to see if you can get a corresponding result for sin(x)!)

Now onto \int \sec x \, dx. If we let t=tan(x/2), then dt/dx=(1/2)sec^2(x/2)=(1+t^2)/2. So:

\int \sec x \, dx = \int \frac{1}{\cos x} \, dx = \int \frac{1}{\frac{1-t^2}{1+t^2}} \cdot \frac{2}{1+t^2} \, dt

Try to take it from here.

Hootenanny said:
Explicitly starting from the sum angle identity (working in radians);

\cos(A-B) = \sin(A)\sin(B)+\cos(A)\cos(B)

Setting A = x, \;\;\; B = \pi/4;

\cos\left(x-\frac{\pi}{4}\right) = \sin(x)\sin\underbrace{\left(\frac{\pi}{4}\right)}_{=1/\sqrt{2}} +\cos(x)\underbrace{\cos\left(\frac{\pi}{4}\right)}_{=1/\sqrt{2}}

Multiply both sides be \sqrt{2};

\sin(x)+\cos(x) = \sqrt{2}\cos\left(x-\frac{\pi}{4}\right)

Does that make more sense?


Makes perfect sense, thank you! I guess it was just a mind block!
 
  • #22
unplebeian said:
Makes perfect sense, thank you! I guess it was just a mind block!
A pleasure, Merry Christmas :smile:
 

Similar threads

Back
Top