in this video we're computing the integral of e to the negative x cosine x and we're doing this
on the interval 0 to infinity so this is an improper integral and actually the infinities
can be handled fairly casually but the symbolic integration here requires multiple applications
of integration by parts in what i normally call the looping trick so we're going to start with
our integration by parts substitutions and what i want to do is let u be e to the negative x
dv is the other part of the integral so u is either the negative x the derivative of that
is negative e to the negative x so our differential is negative e to the negative x dx
dv is cosine x dx and that means v itself is going to be sine of x then we apply the integration
by parts formula and our original integral is equal to u times v that's e to the negative x
sine of x and we're evaluating that on zero to infinity
minus the integral of v d u and we can pull the minus sign out of d u and combine it with the
minus sign in front of this integral to get a plus so we have a plus e to the negative x times sine x
dx now when you look at that second integral you might think well we didn't make any progress here
because that's just as hard as the integral we started with but we're going to apply
integration by parts a second time and we'll retrieve a second copy of the original integral
before we do that part i want to evaluate this first term across the limits of integration
and when i sub in the infinity into e to the negative x that's e to the negative infinity
or one over e to the infinity which is clearly zero at the same time the sine function always
stays finite it's bounded between negative 1 and 1. so if i take something that's approaching 0
multiplied by something finite i know the answer is 0. then when i sub in the lower limit the e
to the negative x gives me a 1 and the sine of 0 gives me a 0. so that one also vanishes
so both of those are gone and we perform a second integration by parts this time we're
going to let u be the same thing the exponential piece e to the negative x so d u is negative e to
the negative x dx this time dv is sine x dx and that means v is the negative of cosine x we apply
the integration by parts formula a second time and we start with u times v that's a negative
e to the negative x cosine x evaluate it again on zero to infinity and then i have minus the
integral of v d u and v and d u both carry minus signs here and those are going to cancel out
and this is where i retrieve another copy of the original integral e to the negative x
cosine x and before we move on i want to evaluate the first term again across these
limits of integration so again when i sub in the infinity upper limit here e to the
negative infinity is clearly zero while the cosine function stays finite so that first term
vanishes then i subtract what i get by substituting in zero and the subtraction kills
the minus sign out in front and when i sub in zero for x into e to the negative x i just get one and
when i sub in zero for x and the cosine function i get one so that first term evaluates to just
one and then i have minus the original integral e to the negative x cosine x dx on 0 to infinity
now each of these lines along the left side of the screen is equal to that original
integral so if i just emphasize that by rewriting it the original integral just evaluated to 1 minus
the original integral and this is the key to the looping trick so i've discovered a second copy of
my original integral on the right hand side of the equation with a minus sign in front of it
let's just add that integral to both sides and that gives us twice the original integral on
the left hand side and now all i have to do is divide by two and i find that my original
integral is equal to one-half and we're done if you enjoyed this video or at least found it useful
check out another one by clicking one of the links on the left or click the xlab logo on
the right to explore dozens of physics and math playlists as always you can leave your questions
comments and requests in the comments section below and i'll get back to you within 24 hours
thanks for watching zach's lab and best of luck on your math and physics journey