Integrating a Tricky Cosine Function: Need Help with Substitution

  • Thread starter Dreadfort
  • Start date
  • Tags
    Integral
In summary: I'm stuck after that.In summary, the student is trying to solve an integrational equation using substitution and limits, but is getting stuck. They suggest trying another way, and mention complex variable and residues.
  • #1
Dreadfort
14
2

Homework Statement


Solve the integral:
[/B]
##\int_{-\infty}^\infty {\frac {\cos(x)}{x^2 + 1}} \, dx##

Homework Equations

The Attempt at a Solution


Lenovo_A1000_IMG_20180227_214029.jpg
I'm a bit stuck here, so what to substitute for tan \theta so as to compute the integral? Help me out here please
 

Attachments

  • Lenovo_A1000_IMG_20180227_214029.jpg
    Lenovo_A1000_IMG_20180227_214029.jpg
    24.4 KB · Views: 718
Last edited by a moderator:
Physics news on Phys.org
  • #2
That's going to be hard since your attachment is unreadable.
 
  • #3
phinds said:
That's going to be hard since your attachment is unreadable.
So what I did, I substituted x = \tan (\theta) and the limits to -\frac {\pi} {2} to +\frac {\pi} {2}. {\sec (\theta)}^2 cancels out leaving behind \int {\cos{\tan(\theta)}} \, dx. I'm stuck after that
 
  • #4
I think you can't continue with ##\cos(\tan \theta)##. I have a question, have you learn about Complex variable, Residues? We can use them to solve some improper integral like this
 
  • #5
Nguyen Son said:
I think you can't continue with ##\cos(\tan \theta)##. I have a question, have you learn about Complex variable, Residues? We can use them to solve some improper integral like this
Not really, I haven't. Could you tell me how to use it, I'm going to try it then
 
  • #6
I made a mistake but I am thinking :)
 
  • #7
Arman777 said:
Theres much more easy way
So how to approach it ?
 
  • #8
Hmmm, so I think we should try another way, because you haven't learned complex variable and residues. I think your teacher will not happy/satisfy if you use Calculus II knowledge to solve Calculus I problem, right? :DD:DD:DD
 
  • Like
Likes Dreadfort
  • #9
Nguyen Son said:
Hmmm, so I think we should try another way, because you haven't learned complex variable and residues. I think your teacher will not happy/satisfy if you use Calculus II knowledge to solve Calculus I problem, right? :DD:DD:DD
Yes I think that'll be better for now, till the time I learn to use Complex variable residues and all that
 
  • #10
With complex variable and residues knowledge, I can give you the answer is ##\frac{\pi}{e}##, but we should try another way to obtain it :biggrin:
 
  • #11
Nguyen Son said:
By complex variable and residues knowledge, I can give you the answer is ##\frac{\pi}{e}##, but we should try another way to obtain it :biggrin:
Yes mate
 
  • #12
You can try integration by part to find the solution. It works If I didnt make any mistake. Take as ##u=cosx## and ##dx\frac {1} {1+x^2}=dw## and you ll see that you can find a solution.
 
  • Like
Likes Dreadfort
  • #13
I just wonder you solved or not ?
 
  • #14
Member cautioned to not post messy, illegible images
Arman777 said:
I just wonder you solved or not ?
I substituted u and w like you said but in the end I got back the same integral again. Dunno where am going wrong. Am I supposed to substitute u in terms of w?

Lenovo_A1000_IMG_20180228_171505.jpg
 

Attachments

  • Lenovo_A1000_IMG_20180228_171505.jpg
    Lenovo_A1000_IMG_20180228_171505.jpg
    30.7 KB · Views: 724
  • #15
Dreadfort said:
I substituted u and w like you said but in the end I got back the same integral again. Dunno where am going wrong. Am I supposed to substitute u in terms of w?

View attachment 221206
Its kind of hard to understand.

Lets call the integral that we are trying to find I. In the end ehat did you get ?
 
  • #16
Arman777 said:
Its kind of hard to understand.

Lets call the integral that we are trying to find I. In the end ehat did you get ?
I got back I again. So I am going wrong somewhere
 
  • #17
Dreadfort said:
I got back I again. So I am going wrong somewhere
I got something like, I=2a-I where a=sinarctanx or it was something like that simply a=uw
 
  • #18
Arman777 said:
I got something like, I=2a-I where a=sinarctanx or it was something like that simply a=uw
Solution's given \pi /e
 
  • #19
Dreadfort said:
Solution's given \pi /e
Well If I=a then you ll find the solution after the steps.
Its just the part of the solution.
 
  • #20
Arman777 said:
Well If I=a then you ll find the solution after the steps.
Its just the part of the solution.
Ok I am working it out
 
  • #21
Dreadfort said:
Ok I am working it out

I would have a little more to say if you had posted something more legible, but I wouldn't break your neck pushing the integration by parts. It's really not going to work. The problem is a perfectly straightforward contour integral. The only other way I know of to do it is to use a Feynman parametric integral approach. I.e. write ##F(y)=\int_{-\infty}^{\infty} \frac{\sin(xy)}{x (1+x^2)} dx## and try to find a differential equation for ##F(y)## that you can solve. Once you've done that your integral is ##F'(1)##.
 
  • Like
Likes Dreadfort
  • #22
Dreadfort said:
So what I did, I substituted x = \tan (\theta) and the limits to -\frac {\pi} {2} to +\frac {\pi} {2}. {\sec (\theta)}^2 cancels out leaving behind \int {\cos{\tan(\theta)}} \, dx. I'm stuck after that
Please take a look at out LaTeX tutorial (https://www.physicsforums.com/help/latexhelp/). It looks like you already understand a lot of it, but at this site you have to use a pair of # characters at each end of your expression (for inline math expressions) or a pair of $ characters (for standalone math expressions).

Using these begin/end tags, what you wrote above looks like
I substituted ##x = \tan (\theta)## and the limits to ##-\frac {\pi} {2}## to ##+\frac {\pi} {2}. {\sec (\theta)}^2## cancels out leaving behind ##\int {\cos{\tan(\theta)}} \, dx##.
 
  • Like
Likes Dreadfort
  • #23
Dick said:
I would have a little more to say if you had posted something more legible, but I wouldn't break your neck pushing the integration by parts. It's really not going to work. The problem is a perfectly straightforward contour integral. The only other way I know of to do it is to use a Feynman parametric integral approach. I.e. write ##F(y)=\int_{-\infty}^{\infty} \frac{\sin(xy)}{x (1+x^2)} dx## and try to find a differential equation for ##F(y)## that you can solve. Once you've done that your integral is ##F'(1)##.
So its a Calculus II problem then, don't know why its given in our assignment. I'll brush up on contour integration to solve this one
 
  • Like
Likes Arman777
  • #24
Dreadfort said:
So its a Calculus II problem then, don't know why its given in our assignment. I'll brush up on contour integration to solve this one

Booth actually is the subject matter your course is currently covering? Usually assignment questions about what is currently being covered.

I'll bet it's about aspects of definite integration come, indefinite integration of this looking too difficul if possible at all my method of your level (or mine).
 
  • #25
epenguin said:
Booth actually is the subject matter your course is currently covering? Usually assignment questions about what is currently being covered.

I'll bet it's about aspects of definite integration come, indefinite integration of this looking too difficul if possible at all my method of your level (or mine).
I am doing BSc Physics and this is in my first year Mathematics module. The topic for this assignment was Improper Integrals
 
  • #26
Dreadfort said:
I am doing BSc Physics and this is in my first year Mathematics module. The topic for this assignment was Improper Integrals

I will outline another approach that does not use contour integration, but is still way beyond most Calculus II material.

A fairly standard trick when dealing with such problems is to introduce a function like
$$F(k) = \int_{-\infty}^{\infty} \frac{\cos(kx)}{x^2+1} \, dx, $$
and to note that you want to compute ##F(1)##. We can try differentiating twice ##F(k)## under the integral sign to get back something close to ##F(k)## again, and so get a differential equation to solve. However, in this case, differentiating once or twice leads to a divergent integral, so to get around that we introduce an additional "mollifier" to ensure convergence. In other words, we look at
$$G_a(k) = \int_{-\infty}^{\infty} \frac{e^{-ax^2} \cos(kx)}{x^2+1} \, dx,$$
where ##a>0##. At the very end we will take the limit ##a \to 0.##

Differentiating twice wrt ##k## under the integral sign gives
$$\frac{d^2}{dk^2} G_a(k) = -\int_{-\infty}^{\infty} \frac{e^{-ax^2} \, x^2 \,\cos(kx)}{x^2+1} \, dx.$$
Writing ##-x^2 = -(x^2+1) +1## in the numerator, we obtain
$$\frac{d^2}{dk^2} G_a(k) = - \int_{-\infty}^{\infty} \cos(kx) e^{-a x^2} \, dx + G_a(k)$$
The integral on the right is do-able, so the differential equation for ##G_a## is
$$\frac{d^2}{dk^2} G_a(k) = G_a(k) - \frac{\sqrt{\pi}}{\sqrt{a}} e^{-k^2/(4a)}.$$

This can be solved in terms of the so-called "error function", and the resulting solution contains two constants of integration. If we note that ##G_a(k) = G_a(-k)## for all real ##k##, we can express one of the integration constants in terms of the other. Now we also have that ##G_a(0) = \int e^{-ax^2}/(x^2+1) \, dx,## which is do-able in terms of the error function. We can also get ##G_a(0)## by putting ##k=0## in the solution of the differential equation. Equating these two quantities fixes the constant of integration, so now we have an explicit formula for ##G_a(k)## that no longer contains any unknown constants. Now we can put ##k=1## and then take the limit as ##a \to 0##.

We get the answer ##\pi/e##, which could have been obtained in 3 or 4 lines of easy work using contour integration!
 
  • Like
Likes Dreadfort and Nguyen Son
  • #27
Ray Vickson said:
I will outline another approach that does not use contour integration, but is still way beyond most Calculus II material.

A fairly standard trick when dealing with such problems is to introduce a function like
$$F(k) = \int_{-\infty}^{\infty} \frac{\cos(kx)}{x^2+1} \, dx, $$
and to note that you want to compute ##F(1)##. We can try differentiating twice ##F(k)## under the integral sign to get back something close to ##F(k)## again, and so get a differential equation to solve. However, in this case, differentiating once or twice leads to a divergent integral, so to get around that we introduce an additional "mollifier" to ensure convergence. In other words, we look at
$$G_a(k) = \int_{-\infty}^{\infty} \frac{e^{-ax^2} \cos(kx)}{x^2+1} \, dx,$$
where ##a>0##. At the very end we will take the limit ##a \to 0.##

Differentiating twice wrt ##k## under the integral sign gives
$$\frac{d^2}{dk^2} G_a(k) = -\int_{-\infty}^{\infty} \frac{e^{-ax^2} \, x^2 \,\cos(kx)}{x^2+1} \, dx.$$
Writing ##-x^2 = -(x^2+1) +1## in the numerator, we obtain
$$\frac{d^2}{dk^2} G_a(k) = - \int_{-\infty}^{\infty} \cos(kx) e^{-a x^2} \, dx + G_a(k)$$
The integral on the right is do-able, so the differential equation for ##G_a## is
$$\frac{d^2}{dk^2} G_a(k) = G_a(k) - \frac{\sqrt{\pi}}{\sqrt{a}} e^{-k^2/(4a)}.$$

This can be solved in terms of the so-called "error function", and the resulting solution contains two constants of integration. If we note that ##G_a(k) = G_a(-k)## for all real ##k##, we can express one of the integration constants in terms of the other. Now we also have that ##G_a(0) = \int e^{-ax^2}/(x^2+1) \, dx,## which is do-able in terms of the error function. We can also get ##G_a(0)## by putting ##k=0## in the solution of the differential equation. Equating these two quantities fixes the constant of integration, so now we have an explicit formula for ##G_a(k)## that no longer contains any unknown constants. Now we can put ##k=1## and then take the limit as ##a \to 0##.

We get the answer ##\pi/e##, which could have been obtained in 3 or 4 lines of easy work using contour integration!
Thanks mate I'll be working it out now
 
  • #28
I think you were closer to an answer earlier on.

Expecting you to use techniques much more advanced than your course level would be odd.

I even said I thought this was about definite integration. If indefinite integration does not seem to be giving right answers, looking carefully at the definite integrals you might zero in.

:oldwink:
 
Last edited:
  • Like
Likes Dreadfort

What is an integral?

An integral is a mathematical concept that represents the area under a curve on a graph. It is used to find the exact value of a quantity that is changing continuously over a given interval.

Why is help needed with integrals?

Integrals can be challenging to solve, especially for complex functions. It requires a good understanding of mathematical concepts and techniques, and sometimes, it can be difficult to know where to start. Therefore, seeking help can make the process easier and more efficient.

What are some common techniques for solving integrals?

Some common techniques for solving integrals include substitution, integration by parts, and using trigonometric identities. It is also useful to know the basic properties of integrals, such as linearity and the fundamental theorem of calculus.

How can one check if their integral solution is correct?

One can check if their integral solution is correct by differentiating the solution and comparing it to the original function. If they are the same, then the solution is correct. Additionally, online integral calculators can be used to verify the solution.

Are there any tips for solving integrals?

Some tips for solving integrals include breaking down the integral into smaller parts, recognizing patterns, and practicing regularly. It is also helpful to understand the concepts behind the techniques used for solving integrals rather than just memorizing formulas.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
140
  • Calculus and Beyond Homework Help
Replies
9
Views
964
  • Calculus and Beyond Homework Help
Replies
7
Views
935
  • Calculus and Beyond Homework Help
Replies
5
Views
687
  • Calculus and Beyond Homework Help
Replies
8
Views
667
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
424
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
Back
Top