Start  one thing i want to emphasize
which i said before but i'll say again
the answers on webassign need to be exact.
so if the answer is 1/3, 0.33 is not correct. umm if you got burned by that in the first assignment do a ask your teacher and say i didnt know any better and well give you the points back. in general we dont want to do that but since its you know time to learn the stuff so you get the hang of it 
0:30  if you feel that youve been robbed by the grading on web assign
do an ask your teacher well look at your answers and well decide whether youve been robbed or not
and give you your points back.
its not our goal to beat you into the dirt its our goal to measure whether you know how to do the stuff. the second assignment is due on wednesday morning so just about 48 hours from now. the extra credit has now expired so now every question is worth 1 point 
1:01  anything that you had answered over the weekend was worth a point and 1/2.
uhh and ill put up the next assignment pretty soon. thatll be due for next wednesday. and extra credit goes until sunday night. any questions? issues? 
1:46  umm okay so this is going to be our first full week of classes.
nice change. so if you remember what weve been doing is working on techniques of integration. 
2:03  last time
we did a lot of substitution
you did a lot of substitno the next homework assignment
does a lot of substitution questions
but at the end of it, of the class
i introduced the idea of integration by parts.
which is essentially 
2:30  the product rule
written for integrals.
so uh it says that if you have an integral so im writing it in its usual form which looks like a function times the derivative of another function. then this is the product of those 2 functions minus the integral of now we get to take the..uhh.. we get to integrate this guy and take the derivative of this guy. 
3:05  there are a number of
little pneumonic methods that
people may have learned like the zoro rule
and little tables, things like that
thats fine if you want to use them
the problem with say, the zoro method
is if you write something in the wrong place
then zoro gives you the wrong answer.
the same thing with memorizing the formula a form of the table 
3:30  if you write the form of the table wrong the answer is wrong.
so let me remind this is just the product rule written sideways. right? product rule says that the thing is the derivative times the thing product of 2 things so so the product rule for derivatives says..let me just write primes i guess. 
4:01  uv prime
is..
u dv + v du
and so if we just integrate
the product rule and rearrange we get this.
and its just another way for the product rule. so essentially even though were going to focus on techniques of integration for 
4:31  another week or 2
theres really 2 techniques of integration.
theres substitution and theres parts. thats pretty much it. so theres substitution which we did last week and you did in your previous course. 
5:17  integration by parts
looks like just some silly formula
its a very powerful technique
that lets you rearrange something into terms of something else.
so does substitution. so im going to do a few examples of integration by parts. 
5:35  so say the integral
i dont know lets do something easy first.
x times the sin of x dx. so the trick in parts is we want to look for one part 
6:02  which is u
so that
du is simpler whatever that means.
and another part so thats the derivative part is an integral you can do. 
6:32  so looking at this
to my mind
2 obvious choices
only one of which works
the other one makes it worse.
anyone want to make a suggestion what i might let u be/ x..right. so if i let this be u no actually let me write it nicely. so im going to let u be x. and then once u is x 
7:00  dv is forced on you.
and again its important to write the dx because if you dont then sometimes you forget which one youre integrating and which one youre differentiating blah blah blah its not as important as in substitution where the dx actually measures something here its just reminding you that this is the derivative of the thing. so if u is x 
7:30  then we need to know what du is.
whats du? so im hearing a few people say 1 its not 1 its 1dx. so its just dx. and then v..if dv is the sin then the integral of the sin is the cosine except its negative. so v is cos. theres a plus c but i dont care about it. 
8:01  so now
so now we have
using parts, the integral of xsinxdx
is..and then the formula tells me
its this times this
minus the integral
of this times this.
so thats the zoro business. so its uv so u is x. and v 
8:30  is cosx.
did i lose a minus sign? well its there its just not here. and then its minus the integral of v which is cosx let me put the minus sign here just to emphasize. dv and dv is just dx. so here its important to remember the dx so that you dont wind up with an integral without a dx. and now this is an easy integral. 
9:00  just the integral of the sin we just did it.
uhh so this is xcosx minus minus is plus. and then when i integrate cosinemaybe i dontlet me not do that. the integral of cosx is sinx. and then i get a constant. 
9:31  so this whole answer
xcosx+sinx.
plus a constant. anybody confused? have a question? how many of you have done integration by parts before? okay so i guess maybe i dont need to belabor this how many of you have not done integration by parts? well then i should belabor this okay. did anyone raise their hand both times? 
10:00  alright so this technique is you know pretty straightforward.
the hardest thing in integration by parts is picking out what is good to do first. im going to do another example. 
10:36  so this one
integral of the log
doesnt look like something you could do.
theres no substitution to make. unless youre really clever. theres sort of i dont know but in fact there are 2 parts sitting there. and theyre parts you can deal with. 
11:16  so lets see.
so A) lets let u be the log. b) let u be 1. 
11:32  c) let u be dx.
d) let u be 1/x. and e) you just cant do it. so i think i have all the answers except hers so shes gonna hurry then shes going to wave at me when shes done. 
12:01  some of you keep changing your mind.
you cant see the little graph going up and down 
12:35  okay im stopping the clickers
did you get it yet?
68% think its this. and 13% think its this. and its none of these. okay so 
13:04  so there are definite parts here.
theres this part and this part. and if you use the little rule thats over here somewhere if we take the derivative of the log it becomes 1/x so thats something simpler i guess 1/x seems simpler to me than the log. and we can integrate dx to get x. so this would be a good thing. 
13:31  if we try this
when we take the derivative of 1 we get 0.
thats not going to be so nice. cause then well just get that the integral is 0 and then we cant integrate lnxdx anyway. cause thats the whole point. so again you dont know what to do so if we use b so im going to let u be 1 and then so i guess dv is 
14:02  lnxdx
and then du is 0
and then v is whatever the integral of lnxdx is.
well then that tells me that the integral of lnxdx is.. wait a minute did i lose a sign somewhere? oh yeah thats right. you know this just doesnt give me anything useful 
14:30  should have a plus here.
anyway, so this is useless this is not what i want to do. and in fact you never want to let u be 1 because it doesnt take you anywhere so this is gone. sometimes you let u be dx but you cant really have u be dx here so instead what im going to do is im going to let u 
15:03  be the ln
and dv be dx
and then du
is 1/x
dx.
and i can integrate dx to get x. and so now this becomes this times this minus the integral of v du. 
15:37  and x times 1/x is 1
so this becomes
x lnx
minus the integral of 1dx
which is xlnxx
plus a constant.
now often, when its easy and i should have done it before 
16:03  its worthwhile because derivatives are easy
to check your answer.
especially in integration its easy to make some stupid mistake. and derivatives are in general easy so we can take the derivative of this and make sure we get the ln back. so its really worth doing that. so we just take the derivative of xlnxx 
16:31  and when we take the derivative
we have to use the product rule here so the derivative of x is 1
that leaves me with a lnx lying around
and then
x
times the derivative of lnx
which is 1/x
minus the derivative of x which is 1.
plus the derivative of a constant which is 0 and so i get lnx plus 1 minus 1. so thats lnx so thats good. 
17:01  so that was easy
and if i had made some silly mistake up here like putting a plus sign
then i would get a plus sign here and i wouldnt get
0 i wouldnt get the ln back
and i would know that i made some silly mistake.
its worth checking when its easy. if checking takes longer than the actual problem its probably not worth it. but here this is an easy check. i should have checked that one but ill leave that one for you to check. 
17:32  umm what else do i want to do?
so sometimes parts is useful even though it doesnt look like it umm theres a famous story for a anybody know who peter lacks is? so hes a famous mathematician he won the national medal of science about 15 years ago and when somebody asked him what he did to win the national medal of science he said oh i integrated by parts 
18:00  so he used integration by parts in a very clever way
to solve some partial differential equations
he said oh i just did integration by parts.
so its a powerful technique. i know theres something else i gotta do here. let me do another one that is maybe slightly less obvious. suppose i have something uhh like 
18:32  the integral
e^x
sinx..dx.
so here and certainly i can use integration by parts and my rule of thumb says look for 1 part that du is simpler 
19:01  and another part where you can do the other part.
uhh so what should i take u to be? sinx. okay. i dont know that du is any simpler but its certainly there and i can certainly integrate e^x. 
19:33  so thats okay.
and so by parts this tells me that this must be uv minus the integral of v du. so thats minus a minus e^x cosxdx. 
20:02  well
does it look likedid i make a mistake?
okay so oh because im stupid. yeah thats better. i would have made the same mistake a second time around so that doesnt look like it helped. but you know maybe 
20:31  we could try again
and see if it gets any better.
so lets try again. not try another integral but lets try this part here by parts. so so now in this piece i want to do this by parts and im going to play the same trick. im going to let u be the cosine and so du now i get a minus sign is minus the sin 
21:01  and dv is e^x.
so v is..... dx is e^x. and so that means that this whole thing becomes well i get this from before let me write it down here i still have this e^xsinx floating around from before. let me just rewrite the whole thing. this is from before and then minus 
21:31  now when i do parts here
i get e^xcosx.
and then i get minus i get minus a minus sinx and then dx 
22:08  okay
now that looks like we didnt get anywhere
and somewhere i have a mistake.
wheres my mistake? i know theres a sign wrong oh no no no theres not, its fine okay. so if i distribute the negative i get a thing 
22:31  equals e^xsinxe^cosx
plus itself.
well remember what were doing. were trying to solve for something. trying to figure out what this integral is. so that means.. if i distribute the minus here i have 2 of those guys 
23:04  and i can just bring this one
over here
and add them together.
we get that well i dont know what that integral is but twice it is e^xsinxe^xcosx. 
23:33  well if twice it is this
then the integral i want must be half of that.
so sometimes 
24:01  integration by parts doesnt seem to go anywhere
but you ended back where you started
now if i had taken
the part to be e to theif i had taken u to be e^x
instead of taking u to be the sin i would have gotten the same answer.

24:32  yeah?
*student asks question* its magic. well i know that its done because i have the answer. yeah. an integral equals some junk minus itself. right? and so since i have a thing equal some junk minus itself that means that twice the thing 
25:03  is that junk.
now if i had done the slightly harder version which i think ill put on the homework noooo..ughh... like if that had been an e^2x or a sin3x or something like that then instead of being this thing equals some junk minus itself itd be this thing equals some junk 
25:31  minus 5 times itself.
but this still is the same trick. i get something expressed with terms of some extra stuff plus itself so that means i can solve for the thing i want. this is not obvious. but once you see it, it is obvious. yeah? well, supposed to make a sort of uh, reasonable so the rule is 
26:01  instead of simpler, how about not worse?
cause if its the same and its always going to be the same then you get back where you started. so there is an order essentially the thing that you want to try letting your u be first is the ugliest thing that gets better when you take the derivative of it. so if its something like inverse trig 
26:30  is pretty ugly
and when you take the derivative they become rational functions.
logs and exponentials well log gets better exponentials not so much. trig functions well they dont get worse. exponentials they dont get worse. polynomials they get better. so there is some kind of an order and theres somedoes anyone know this pneumonic its like... 
27:11  i dont know so
yeah so theres some pneumonic that you can use
logs are good, inverse trigs are almost as good as logs
algebraic? yeah algebraic things
trig
so if you can remember that
when whatever it is
the thing that gets the nicest thing when you take its derivative is best to do first.

27:35  so logs becomelogs are horrible theyre this transcendental thing.
but their derivative..1/x, come on. inverse trig, theyre also pretty horrible. inverse tan but its derivative not so bad 1/1+x^2 is nicer than inverse form. algebraic things when you take the derivative the degree goes down. trig well it doesnt get worse. 
28:00  exponentials, they dont get worse.
so if you want to memorize this little thing okay. obviously you can tell i dont know what it is. i guess in that case what were going to do one other example. 
28:41  when its appropriate.
umm so so this fact is true only if x is positive. but if x is negative then we havethis doesnt make any sense. 
29:02  so this is true.
as long as x isnt 0. and well deal with what if x is 0 in about 2 weeks. so if this is true so when do you have to? when x is negative. if we are sloppy and leave them off its not wrong 
29:31  most people know, its okay if we leave them off most of the time but sometimes its important.
did that answer your question at all? okay so let me do say another relatively easy one. 
30:09  so this one is really just like the other one.
im going to have to do integration by parts a coupe of times on this one. right? because here obviously if you want to use that little formula or you just want to think about it i take the derivative of x^2 
30:31  it becomes 2x thats nicer because its a lower power.
integral of sin2x is something i can do so if i take the derivative of sin2x it becomes a 2cos2x or better the integral of x^2 is 1/3x^3 thats worse. so i dont really want to do that unless i have to. so it seems obvious to me that were going to let u be x^2 
31:00  so du is 2x
dx.
and well let dv be the sin 2x so v is i have to deal with this 2 so in my mind i make the substitution w=2x so dw is 2dx so i pick up a half. this is 1/2 cos2x except we need it to be negative. 
31:33  okay so this becomes uv minus the integral of v... 1/2cos 2x du du is a 2x 
32:05  and then this 2 cancels that 2.
but the negative from the cosine changes the sign there. and so well this is almost like the one i just did. again im going to have to do integration by parts. get rid of this x but when i take the derivative of x i get a 1 so thats going to be good. so this is 
32:32  just keep this guy
from before
and then here
youre going to let u be x
so dv
is dx thats good.
and im sorry thats a u du is dx. dv is the cosine and so v is 1/2sin 2x 
33:00  that.
and so now this thing just comes along for the ride. x^2/2 cos2x minus.. uv so thats minus 1/2xsin2x minus the integral of v du 
33:31  so v is a 1/2
sin2x
and du is dx.
were almost done here. so that whole business is.. x^2/2 cos2x minus x/2 
34:01  sin2x plus...
so i get a 1/2
the integral of sin2x is 1/2cos2x except its negative
so change the sign again.
so im pretty sure thats right. probably worth taking the derivative to check. 
34:40  oh yeah see thats why i should have checked.
yeah cause otherwise these wont cancel. yeah? okay so lets well lets check that it works. and if it works well go back and see where it came from, if it doesnt work 
35:03  then well go back and see that i screwed up.
which is not unheard of as you know already. okay so lets check this. so if i take the derivative of x^2cos2x derivative of x^2/2 is x but its negative. and then minus.. x^2/2 times the derivative of cos2x 
35:33  which is a 2sin2x except its negative
which changes the sign back.
so thats the derivative of this bit. and then we have minus this x/2 whose derivative is a 1/2. and then we have minus oh no i already have a minus x/2 
36:00  and then derivative of sin2x
is 2cos2x.
so those 2's cancel thatll be good and then here the derivative of 1/4cos2x is.. 2sin2x except its positive. and now lets just check that everything in sight cancels except xsin2x. something looks wrong here already. 
36:34  did i screw up?
probably. okay so this is a 2.. sin2x and.. this is an xcos2x. uhh x^2 there should be another x^2 oh no i started with x^2 ok good. so heres my original integral x^2sin2x is what i started with. 
37:01  this xcos2x
cancels with this xcos2x cause its minus.
one of the signs is wrong. nobody heard that. okay so somewhere i made a sign error i want this to cancel with this but somewhere i have a negative sign wrong. so let me just check that the other bits cancel. 
37:30  and then ill help you find out where its wrong.
and then this guy certainly cancels with this guy. wait wait wait wait wait this is the 1/2sin2x? this is a 1/2sin2x. so they cancel for sure. so theres trouble here and she found it which is good. uhh so where is it? you found it, tell me now. either of you i dont care. right here? 
38:01  that should be a plus?
that makes sense. so why is this a plus? because its a minus minus? oh yeah, i just copied wrong. okay this is why you should check. okay so this plus now becomes this plus 
38:33  this plus is the 1/2xsin2x
which is this one
yeah i cant even copy my own writing which is good.
and this still stays negative so its good so now its right. ok so were checking. yeah? the tabular method is really the same. 
39:03  its the same.
as long as you can make it clear what youre doing. so the tabular method is the same as this its just a little more organized. its the same. the only thingthe only problem that i have with the tabular method is that when youre doing something like this sometimeswell it works if you pay attention. what the tabular method is doing 
39:31  is just organizing everything into rows and columns and you dont bother to rewrite
those things that you already have.
the problem with not bothering to rewrite them until you get to the end is that you forget about them in the middle. and so you can wind up with you need to use them sometimes. so the problem i have with all these variations, theyre fine as long as you know what youre doing. 
40:00  but
a lot of times theyre shortcuts
shortcuts dont always work
because youre taking a shortcut through the woods and then you run into a bear trap.
its not a good idea. so shortcuts are fine as long as you understand that theyre going to work. bottom line about the tabular method im not going to teach it because it doesnt always work. i mean it does its harder when it doesnt want to work. i know theres another thing i need to say okay 
40:31  these things also work just fine
with definite integrals.
and usually with definite integrals so these are ones with bounds on them you want to oh 2 things i need to say so before i say definite integrals cause thats sort of obvious 
41:02  suppose i have something
since im sticking with the sin i might as welllets do the cosine this time.
suppose i have x^23e^xdx. i am not going to do this every time. if i do integration by parts the e^x is not going to get any better its not going to get any worse the x could become an x^22. 
41:30  let me just do it once or twice
so we let u be x^23.
so du is 23x^22. dv is e^x. v is e^x. and so this is 23x^22e^x minus the integral of 23x^22e^xdx. 
42:03  lets do parts again.
so if i do it again us is x^22 du is 22x^21. dv is e^xdx. v is e^x so when i do parts again from before i have this and then i get 23 times 
42:31  and so i get 22e^x
ahhh..
uv
x^22...
e^x
yeah
sorry.
still too early i havent had enough coffee yet. 
43:03  this is x...
its uv
thank you this ones right.
so here i get x^23e^x23x^22e^x minus the integral of x^21 e^x except i picked up a 22 here the patter should be clear now. every time i integrate by parts i pick up a new term like this. 
43:31  and i get a new integral with something lower.
in fact in general rather than just doing this lets write a reduction formula lets not do it lets not do it for any particular number lets do it for n. so again if i integrate by parts du is nx^n1. 
44:01  dx
dv is e^x.
so v is e^x. so this is x^ne^x minus the integral of nx^n1e^x dx. and now i just apply this over and over and over again. to see so now i dont have to just keep doing it. i can see that in fact 
44:32  the integral of x^23e^x is going to be so i get an x^23 e^x then i lose a 23x^22e^x and then i have this integral which is going to give me a factor of 23 
45:05  and so theres an integral here that im not writing
and thats going to give me a 22x^21e^x.
and then theres going to be another integral in here which im not going to write. and im going to pick up a factor n, n1, n2, blah blah blah and the signs are going to alternate all the way down to the bottom. 
45:30  so that means that
what am i going to get?
im going to get x^23... let me just put the e^x in the front im always going to get e^x. x^23 then im going to lose a 23 x^22 then im going to gain 23 times 22 
46:00  x^21
then im going to lose
23 times 22 times 21
x^20
then im going to gain 23 times 22 times 21 times 20
x^19
and so on.
until i finally get down to 23 times 22 let me just write 23 factorial. 
46:37  times e^x.
plus c. 23 factorial means 23 times 22 times 21times..and so on. k? so whats the point of this? sometimes its easier just to make a formula 
47:00  and use the formula over and over and over i do not recommend
that you memorize this formula
because its really easy to derive.
and its also really easy to mess up in your memory maybe this should be a plus or maybe this is where the n goes or whatever. so its really not to your benefit except when youre using it to memorize such a formula. now computers memorize such formulas and there are certain programs that will do integrals for you. and they just use these formulas 
47:31  and computers are really good at looking up information on the fly.
uhh so one last thing to say is that umm i didnt do definite integrals ill do that first thing tuesday. there is another homework assignment due on webassign on wednesday theres also a paper homework assignment which you can get from the class webpage which is due during the second recitation of this week. 
48:00  it counts
1 problem counts as more than 1 point so.
