Indefinite Integration Problem

  • Thread starter ron_jay
  • Start date
  • #1
81
0

Homework Statement



Integrate: [tex] \int \frac{1}{\sin{x}+cos{x}}dx[/tex]

Homework Equations



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

The Attempt at a Solution



[tex] \int \frac{1}{(\sin{x}+cos{x})} \times\frac{(\sin{x}-cos{x})}{(\sin{x}-cos{x})} dx [/tex]

[tex] - \int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx [/tex]

[tex] - \int \frac{\sin{x}-cos{x}}{\cos{2x}} dx [/tex]

Well after that I can't figure out what to do next...
 
Last edited:

Answers and Replies

  • #2
1,753
1
[tex]-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx [/tex]

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:
  • #3
1,753
1
argh ... hm
 
  • #4
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,621
7
[tex]-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx [/tex]
This is incorrect. There should be no negative sign in front of the integral.
 
  • #5
1,753
1
he factored out a negative so he could change it to cos2x unless i forgot my algebra.

[tex]\sin^{2}x-\cos^{2}x \rightarrow -(\cos^{2}x-\sin^{2}x)[/tex]
 
  • #6
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,621
7
Whao! My bad, didn't realise he'd swapped the cosine and sine.
 
  • #7
morphism
Science Advisor
Homework Helper
2,015
4
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)?
 
  • #8
Dick
Science Advisor
Homework Helper
26,263
619
[tex]-\int \frac{\sin{x}-cos{x}}{\cos^2{x}-sin^2{x}} dx [/tex]

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).
 
  • #9
1,753
1
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
Dick
Science Advisor
Homework Helper
26,263
619
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
1,753
1
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
81
0
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.

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:

[tex] \int \frac{\cos{x}}{1-2\sin^2{x}} - \frac{\sin{x}}{2\cos^2{x}-1} dx [/tex]
 
Last edited:
  • #13
154
0
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
1,753
1
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:

[tex] \int \frac{\cos{x}}{2\cos^2{x}-1} - \frac{\sin{x}}{1-2\sin^2{x}} dx [/tex]
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
morphism
Science Advisor
Homework Helper
2,015
4
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 [itex]\int \sec x \, dx[/itex]. If we let t=tan(x/2), then dt/dx=(1/2)sec^2(x/2)=(1+t^2)/2. So:

[tex] \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[/tex]

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

[tex]\int \sec x dx = \int \frac{\sec x(\sec x + \tan x)}{\sec x + \tan x} dx[/tex]

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

the square root of the sum of the squares of the coefficients of the sine and cosine is [tex]\sqrt2[/tex]. Therefore, we multiply both the numerator and the denominator by [tex]\frac{1}{\sqrt2}[/tex]:


[tex] \frac{1}{\sqrt2} \int \frac{1}{\frac{1}{\sqrt2}\sin{x}+\frac{1}{\sqrt2}\cos{x}} dx [/tex]

[tex] \frac{1}{\sqrt2} \int
\frac{1}{\cos{x}\cos{\frac{\pi}{4}}+\sin{x}sin{\frac{\pi}{4}}} dx[/tex]

[tex] \frac{1}{\sqrt2} \int \frac{1}{\cos{(x-\frac{\pi}{4}})} dx [/tex]

[tex] \frac{1}{\sqrt2} \int \sec{(x-\frac{\pi}{4})} dx [/tex]

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

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

Is this it?
 
Last edited:
  • #18
Dick
Science Advisor
Homework Helper
26,263
619
Looks fine to me.
 
  • #19
154
0
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

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
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,621
7
Am I just not getting this? It's been known to happen.

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

[tex]\cos(A-B) = \sin(A)\sin(B)+\cos(A)\cos(B)[/tex]

Setting [itex]A = x, \;\;\; B = \pi/4[/itex];

[tex]\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}}[/tex]

Multiply both sides by [itex]\sqrt{2}[/itex];

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

Does that make more sense?
 
Last edited:
  • #21
154
0
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 [itex]\int \sec x \, dx[/itex]. If we let t=tan(x/2), then dt/dx=(1/2)sec^2(x/2)=(1+t^2)/2. So:

[tex] \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[/tex]

Try to take it from here.

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

[tex]\cos(A-B) = \sin(A)\sin(B)+\cos(A)\cos(B)[/tex]

Setting [itex]A = x, \;\;\; B = \pi/4[/itex];

[tex]\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}}[/tex]

Multiply both sides be [itex]\sqrt{2}[/itex];

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

Does that make more sense?


Makes perfect sense, thank you! I guess it was just a mind block!
 
  • #22
Hootenanny
Staff Emeritus
Science Advisor
Gold Member
9,621
7
Makes perfect sense, thank you! I guess it was just a mind block!
A pleasure, Merry Christmas :smile:
 

Related Threads on Indefinite Integration Problem

  • Last Post
Replies
9
Views
3K
  • Last Post
Replies
15
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
4
Views
1K
Replies
5
Views
2K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
4
Views
917
  • Last Post
Replies
1
Views
798
  • Last Post
Replies
5
Views
2K
Top