1. Home
  2. Explore
  3. Mathematics
  4. Chain Rule Differentiation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Chain Rule Differentiation

Transcript

this video is about problem solving with the chain  rule a very important and Powerful computational   rule from calculus in this first problem the goal  is to find a bunch of derivatives with the chain   rule but let's State what the chain rule says  first the chain rule is all about differentiating   functions that are compositions of two simpler  functions like a function G of H of X we want to   take the derivative of such a function when the  functions G and H have derivatives themselves they are differentiable the chain rule says  take the derivative of the outer function the   G is the outer function because it gets done  second when you do this composition G Prime   plug in the inner function h of x h is called the  inner function because when you compose these two   functions H gets applied first then multiply  times the derivative of the inner function   so to use this what we need to do in each case  is recognize these functions as compositions of

two simpler functions in part a f of x is e to the  2x power think carefully about what happens when   you plug a number in for X what do you do you  plug it in right there which means you multiply   by 2 first before you exponentiate the inside  function the thing that gets done first is 2x   then you exponentiate you raise e to that power  the outside function the thing that gets done   second is e to the x so we can write this as G  of H of X where we should say what G and H are G of X is the outer function that's e to the X and  H of X is the inner function that is 2 times x so   so according to this chain rule that  you see here when I differentiate f

I need to find the derivative of G first well  let's do that here G Prime of X will be e to the x   I need to plug in h of X into that so I get e  to the 2x when I replace X here with 2x I get   e to the 2x then the chain rule says to multiply  that times the derivative of H of x h Prime of X   here is a constant the constant 2. so again I  took the derivative of the outside function G   Prime that was e to the X but then I plugged in  the inside function h of X that's 2x I need to

replace that x with 2x to get this then multiply  times the derivative of the inside function h of   X is the inside function its derivative is 2 I  multiply by that there is the answer for part a   more typically you would write that as 2 e to the  2X in Part B it's a similar question f of x equals   e to the negative X let's go ahead and do the rest  of these without writing out explicitly what G and H are each time we'll just think about it that  is definitely the quicker way to go f of x is e   to the negative x what is the inside function what  is playing the role of the H of x what gets done   first that's Negative X multiply X by negative 1.  then you exponentiate g of X the outside function   is still e to the X but the inside function now  for this question is negative X not 2x but once

again the chain rule says take the derivative of  the outside function the outside function is e   to the X here but then plug in replace x with the  inside function which in this case is negative X   then do H Prime take the derivative of the inside  function the derivative of negative X is negative   one there's the answer more typically you'd write  that as negative e to the negative X and that will be the derivative of e to the negative X you can  always check these things by graphing them as well   and making sure that it does look like the graph  of the derivative is telling you slopes of tangent   lines to the original function part C is a little  trickier what is the derivative of f of x equals   e to the x squared it's a little trickier because  it's easy to misinterpret what you're supposed to

do here when you replace x with a number are you  taking e to the X and then squaring the result or   are you squaring first the answer is when you use  this kind of notation you are squaring first the   inside function is x squared we don't do e to the  X first and then square if we had meant to do e to   the X first and then Square we would either write  that or by a property of exponents we'd multiply those exponents and get e to the 2X so understand  that these are different things there you're there   you're multiplying you're exponentiating first  and then squaring here you're squaring first and   then exponentiating that's very very important  to realize and it affects the answer the inside   function here is x squared the outside function  is e to the x once again I take the derivative of

the outside function e to the X but then I plug in  the inside function in place of x to get another   x squared there then multiply times the derivative  of the inside function the derivative of x squared   is 2x there's the answer more typically you'd  put the 2x in front and write it like that that   is the derivative of e to the x squared Part  D find the derivative of the square root of e   to the 3x I'm going to do this one in two ways  first let's do it by treating the square root as a one-half power so f of x equals well I guess  in both cases I'll do that but I also want to use   a property of exponents with this first method  here treat the square root as a one-half power

and then what I'm trying to say with this first  method is multiply those exponents to get e to   the three halves X that's another way to write  the same function I have not taken a derivative   yet now take the derivative use the chain rule  the inside function is three halves times x   the outside function is e to the X I take the  derivative of the outside function e to the X to   get e to the X but then I replace x with 3 halves  X and then multiply times the derivative of that inside function the derivative of three halves X  is three halves there's the answer three halves   e to the three halves X if I preferred writing  it in terms of square roots I can kind of undo   what I did in this first situation I could  put that one half out in front and put a   as a power like this is what I meant and then make  that a square root so I could write three halves   square root of e to the three x that would be a  less common way to write it actually it would be

just simpler to leave it like this let me also  do this with a chain rule where I use the chain   rule twice really let's look at this and realize  I could think of this as a composition really of   three functions take a number X first multiply it  by three so the most inside function would be 3x   the middle function would be exponentiation e to  the X and then the most outside function would   be the square root of x x to the one-half  power so if I use the chain rule that way

to try to get the same answer ultimately you  have to be careful the derivative of the most   outside function x to the one half is one half  x to the negative one-half but then I need to   replace x with e to the 3x then multiply times the  derivative of that inside function e to the 3x for   which I need the chain rule again and if you think  about it carefully you'll get e to the 3x times 3.   then simplify this is three halves this is e  to the 3x to the first Power I can add those exponents and write e to the 3 x to the one-half  power and you do see that this is ultimately the   same thing that I got before this is the right  answer last we're going to take the derivative of

this thing right there not an exponential function  but a polynomial being raised to a high power a   100th power do I have to literally expand this  thing to the 100th power no definitely don't   do that it could take you the rest of your life  I think if you did it well maybe not quite the   rest of your life but a long long time try to find  the derivative of this some other way and the key is the chain rule think of this entire polynomial  inside the parentheses as the inside function what   gets done first and raising to the 100 power  x to the 100 power as the outside function   so let's go ahead and write this function down  here so you don't I don't have to keep moving   the paper this is f of x equals X cubed plus  five x squared minus 4X plus 1 to the 100 power   I'll differentiate this with the chain rule when  I finish it I am also going to give you a little

extra treat and show you that Mathematica can  actually expand this mathematic as a computer   program by Wolfram research and I'll show you  what the answer is but that's just for fun what's the outside function again x to the  100 power what's the derivative of x to the   100th power it's 100 times x to the 99 power  but replace x with the entire inside function   this entire thing gets raised to the 99 Power then multiply times the derivative of that inside  function it's very important to use parentheses   here students often forget parentheses I'm going  to multiply times the entire derivative of this   it needs to be inside parentheses 3x squared plus  10x minus 4 will be the derivative of that inside   function okay so now let's show you briefly just  for fun what Mathematica produces when you expand   that expression this entire polynomial to  the 100 power in all its Glory there it is

let's move it up so you can see the  entire thing here if I could click on this   there we go and look while those coefficients  get humongous then they get smaller at the end and your highest power of X is indeed x to the 300  power right there isn't that fun number two as you   can see is kind of an abstract problem where you  might have some information you don't actually   need to solve the problem but that's part of the  point is for you to try to decide what information   is necessary you can see ultimately based on some  functional data we're given a function H that is   a composition G of f of x and we're supposed  to compute H Prime of 2. the fact that it's

a composition means we need the chain rule okay  so we need to do that and ultimately plug in 2.   for any value of x h Prime of X by the chain  rule as we talked about in the first problem   is the derivative of the outside function in this  case the outside function is G plug in the inside   function into that derivative and then multiply  times the derivative of the inside function and   certainly when I plug in x equals 2 that's got  to be true as well H Prime of 2 would be G Prime

of f of 2 times F Prime of 2 do we have the  information we need to finish this problem we   do have F Prime of 2 that's negative one we also  have F of 2 that's going to be necessary to be   eight so this becomes G Prime of 8 times F Prime  of 2 which is negative 1. do we know G Prime of   8 look over here yes we do that's three so this  becomes 3 times negative 1 or negative three the   other pieces of information G of 2 being 1 G of 8  being 2 G Prime two equaling 3 are not necessary to solve the problem we need the things that you  see here use just those pieces of information to   solve the problem in number three we're trying to  apply derivatives to help us understand the graph   of a function for what values of X is the graph  of this function going to be concave down we'll   need to find the second derivative and figure  out where it's negative it turns out we will   need the product rule in addition to the chain  rule in this problem when we find that second

derivative so we'll get a little bit more practice  with the product rule so the derivative here first use the chain rule e to the negative x  squared what's the inside function what's the   outside function the inside function is negative  x squared by the way when you see the expression   negative x squared it's understood that you do  x squared first and then multiply by negative 1.   because if you had done multiplying by negative  one first and then squaring the negative sign   would go away so it is it is understood that  that kind of expression equals This Not That okay so this is the inside function e to the x is the  outside function we need to take the derivative of   the outside function the derivative of e to the x  is e to the X plug in the inside function negative   x squared then multiply times the derivative of  the inside function which will be negative 2X   more typically you'd put  the negative 2x out in front

then take the second derivative we're trying to  figure out where this function is concave down   here we need the product rule as well here's  our first function here's our second function   and when we take the derivative of the second  function we will need the chain rule again the   derivative of the first function negative  2x is negative 2. multiply that times the   second function then add the first function  times the derivative of the second and be careful about minus signs here as I'm trying  to be in differentiating the second function e   to the negative x squared it's the same as the  original first derivative I once again use the   chain rule get e to the negative x squared times  negative 2X be really careful about minus signs

simplify a little bit the two minus signs  cancel become a plus sign 2 times 2 is 4   we get two x's gives us x squared and we get  multiplied by e to the negative x squared again   we're trying to figure out where is this negative  okay it's probably okay it could be helpful to   figure out where it equals zero let's go ahead  and just put the inequality like that right away   we're supposed to solve this inequality for the  values of X that will make that true doesn't look very easy does it well it's easier than it looks  the key thing is to factor as much as possible   out of the first these two terms here is there a  common factor certainly there's a common factor   of two that can be factored out there's also a  common factor of e to the negative x squared that   can be factored out what's left if you factor it  out like this what's left here is a negative one   and what's left here is a plus 2x squared we're  trying to figure out what values of X will make

this negative this thing is always positive no  matter what x is so the sign of this product   is completely determined by the sign of what's in  parentheses here this is equivalent to negative 1   plus 2x squared being negative that's equivalent  adding 1 to both sides to 2x squared being less   than 1. that's equivalent dividing both sides by  one-half to x squared being less than one half   and careful that's equivalent to the absolute  value of x being less than the square root of

one-half which is the same as 1 over square root  of 2 which is the same as square root of 2 over 2.   you need the absolute value signs there if  you're going to be accurate here when you   take the square root of both sides um X could  be positive or negative here this if you want   a little bit more detail about what this means  this means X itself is between negative square   root of 2 over 2 and positive square root  of 2 over 2 and interval centered at zero that's where the graph is concave down if you're  going to write the answer in interval notation you   could say it's concave down on the open interval  from negative square root of 2 over 2 to positive   square root over two over two you might even argue  it's concave down still at the endpoints those are   technically what's called an inflection points  more on that in a second when I draw the graph

um probably you could say the answer is either  way those points are where the second derivative   actually equals zero in set builder notation you  could say this is the set of all real numbers X   the set of all elements of the real numbers such  that X is between these two numbers negative   square root of two over two and positive square  root of two over two let's go ahead and graph   this function you know square root of two over  two I believe is about 0.707 something like that this interval is centered on zero negative square  root of two over two and positive square root of   two over two and it turns out you can check this  on your calculator that the graph of this function   looks like well it's called a bell-shaped  curve it's going to look about like this

and you can see it is concave down between these  two points that's where it looks like a frown   concave down looks like a frown what does concave  down really mean it means slopes are decreasing   the derivative F Prime is decreasing between these  two values of X and it's concave up otherwise at   these two points you have changes in concavity  those are called inflection points of the graph   and you can also think about where this function  is increasing or decreasing based on the sign of the first derivative it's a bell-shaped curve it's  related to something very important in statistics   called the normal distribution problem four is a  population growth word problem the population P of   Minnesota a state in the United States in millions  of people at time T years after the year 2000 is   approximated by this function that you see right  here and exponential growth function part A essays

says based on this formula find an estimated  population in the year 2019 that's a few years   ago I'm making this in 2022 include units and  then in part based on this formula how fast is the   population changing in the year 2019 include units  there so a basic function and derivative problem   but we do need the chain rule that's why it's in  this video the inside function is .00754 times T and the outside function you could say if you like  is 4.919 times e to the T let's give this function   name name let's call it f of T if you're not given  a name you can certainly give the function a name   like I just did in part A we're trying to find the  population in the year 2019 that's 19 years after   the year 2000 we're trying to find F of 19. some  people might write P of 19 but technically that's

abusing notation because it P is technically  a dependent variable not a function name   what does this give us it gives us  4.919 times e to the .00754 times 19. go ahead and compute this it's going  to be something probably bigger than 5   million what's the actual answer I don't know  offhand I didn't look it up 4.919 times e to   the .00754 times 19 power make sure I type  everything correctly I think that looks good

about five point six seven seven if you round  it million people would be the units okay   you could go ahead and look it up and see how  accurate this is okay this is a model it's not   going to be completely accurate and to tell  you the truth if I had to guess is it is this   uh too big or too small I would guess maybe  too big though that could be wrong the the   um population growth rates in terms of birth uh  per thousand people or something has gone down

over time especially since the year 2008 and  especially since covid so I mean covet in 2019   hadn't occurred yet but I'm thinking maybe this is  too big but there's also immigration to take into   account migration from state to state that kind  of thing so who knows for sure you can look it up   all right Part B ased on the formula  how fast derivative rate of change   is the population changing in the year 2019  in function notation we're trying to find F Prime of 19. in liveness notation which you  should also know we're trying to find DP DT   and we're trying to evaluate that at time 19.  but we need the chain rule is the point here   let's go ahead and write the derivative of this  with the chain Rule and with the variable T and   we'll once again use an evaluate symbol at the  end so I'm going to plug in 19 at the very end   it's not maybe the best notation here but we're  stuck with it at the moment the derivative of

the outside function 4.919 times e to the t  is itself 4.91 times 9 times e to the T but   remember with the chain rule you need to plug  in the inside function so I get a .00754 times t and then the chain rule says multiply times the  derivative of that inside function that's going   to multiply by .00754 and actually now if you  plug in t equals 19 and if you think about what   just happened that's the same as the original  function value at T equals 19. so I can take   the previous answer and I can just multiply by  .00754 that's very interesting and nice that you   can do that nice property of exponential functions  with base e here and so I just take this previous answer I've already computed that part just  multiply this now by .00754 to get about .0428 what are the units this is very  important this would be million people

per year that's the rate of growth the  instantaneous rate of growth or the estimate for   the instantaneous rate of growth in the year 2019  the population is growing by that many people per   year approximately probably makes more intuitive  sense if we convert this to like thousands of   people per year to convert Millions to thousands  you multiply this no this decimal by a thousand   which moves the decimal point to the right  by three spots this would be the same as 42.8

000 people per year that's a little easier to  get your mind around you know that's like this   the population of a medium-sized city or town  depending on the terminology you want to use in   a given year number five is an abstract compound  interest problem if you invest P dollars in the   bank account that has an annual interest rate of  R percent realize here are for example if it's a   four percent interest rate would be the number  four not point zero four in the way this is set

up so you got to be careful the percent sign is a  signifier for that it's compounded twice per year   then after tears you will have eight dollars  according to this formula so I use the compound   interest formula and I essentially divided R by a  hundred and also by 2 because of compounding twice   per year and I raise this to the 2T power the 2  in this case is sometimes called n in the compound   interest formula the number of compounding  periods per year if R were a decimal without a percent sign like a 0.04 I would not divide by  100 I'd have R over two instead of R over 200.

it's going to be easier to interpret derivatives  without thinking about it this way part A says   find the ADT assuming P and R are constant treat  PNR as constant as t as the independent variable   then interpret that what does it represent then in  Part B we're going to find a different derivative   dadr assuming p and t are constant we're making  different assumptions about what's Constant is that okay to do yes whether a letter represents a  constant or a variable is all on your head it's on   how you're thinking about it I emphasize this all  the time to my students and it's very important   to realize you can do that we also want to  understand what that represents we'll want   to think about units for these derivatives and  interpret them as rates of change I'm not going   to bother plugging in numbers for these things but  you certainly could to make it more concrete okay

but I won't take the time to do that before I take  the derivative or as I take the derivatives here   I also want to mention that you will sometimes  see these derivatives written in an alternative   notation with instead of an ordinary looking  D kind of a curvy looking D like this   that's called partial derivative notation that's  related to multi-variable calculus and it's kind   of highlighting the fact that I could actually  think of well prnt all as being quote-unquote

variables if I wanted to and when I use this  notation I'm kind of emphasizing that I'm treating   the other variables as constant it's kind of a  weird thing to do does it really matter does it   really matter whether you use an ordinary D or  kind of a curvy D it doesn't really matter okay   it's just notation it's just meant to communicate  something don't take it don't get scared off by   it is all all I'm trying to say if I treat PNR  as constant and T is the variable this becomes an exponential function of T I need to know  about derivatives of exponential functions   I also need the chain rule because the inside  function there is 2T instead of just a plain t   the base is not e this is not a continuous  interest rate here it's an annual effective   interest rate you might call it actually it's  nominal since it's compounded twice per year

so this is a little tricky this is like my base  I'm going to need to have a factor of the natural   log of this space in this derivative so it's kind  of going to be a complicated looking derivative   the p is a constant it just carry gets carried  along for the ride let me go ahead and multiply   times the natural log of this base 1 plus r  over 200. then times that base 1 plus r over 200 to the 2T power I'm taking the derivative of the  outside function here and now when I write 2T   instead of just a t I'm plugging in the inside  function and then the chain rule says multiply   times the derivative of the inside function 2.  this crazy looking expression a product of one   two three four things is the derivative of this  thing okay when you think of this as a function   of T and treat P and R as constants I'm not going  to write out what it represents but let me just

describe it we should write out its units at  least it would be units of a per unit of t   a is in dollars a is an amount of in dollars and  T is time in years this would be in dollars per   year so if you took particular numbers like maybe  p is a thousand R is four um and a particular time   moment in time like T equals five or something and  plug those numbers in here you would get a number   and that number whatever it is would represent  how fast the amount a is growing at time t

in dollars per year it would be a rate of change  with respect to time so then if you let time go a   little further you'd multiply that rate of change  times the change in time to estimate the new   amount a short time later this is fundamental  stuff to know I'm just describing it verbally   try try examples I would encourage you to do  that Part B again we're finding the derivative   dadr the rate of change of a with respect to R in  partial derivative notation I'd use a curvy kind

of D like that but again that's just notation  don't worry about it don't let it scare you off   differentiating with respect to r Treat the p  and t is constant okay and I'd be thinking about   small changes in the interest rate instead of  small changes in time if I want to interpret the   derivative as a function of r treating the p and  t is constant this is not exponential it's well   I guess you call it a polynomial if 2T is a is a  whole number at least that could be expanded out if you if you wanted to though like at the end  of problem one in this video we would not want   to expand it out we'd want to use the chain  rule differentiate it as is what's the inside   function the inside function would be 1 plus r  over 200. what's the outside function P times

what should I call it uh x to the 2T power  where X is the variable 2T is a constant here   2T is like an N or something so careful the  derivative of that outside function it's really a   constant times a power function you got to use the  power rule you got to bring down the 2T in front   what you may have wanted to do in part A but you  shouldn't have done in part A bring down that 2T gotta subtract one from that exponent as  well I'm plugging in the inside function

and subtracting one from the exponent to T minus  one then multiply times the derivative of this   inside function with respect to R derivative of  one is zero derivative of R over 200 is 1 over   200. plug-in numbers to interpret this as a rate  of change units of a per unit of our dollars per   percent it's actually better to say percentage  point percentage Point instead of percent because   well if you say percent it  can easily get misinterpreted if you let R say R starts out at four  percent and increases to five percent

as a percent growth growth from four to five is  twenty five percent growth but that's not what   you want to think about if you're thinking about  this rate of change you'd want to think about the   fact that Delta R the change in R is one and what  we say is we say it's one percentage Point even   though it grew by 25 percent from four to five  anything that grows from four to five Grows by 25 percent we want to emphasize the change in R not  as a percent but as an actual amount you might say   and we use the phrase percentage point that  is what people use so again plug in particular   numbers to help you understand this as a rate of  change to help you estimate changes in a if you   let R increase a little bit our final problem  is kind of a fun problem to derive the quotient   rule using the product rule and the chain rule  let f and g be differentiable for all X having

derivatives for all X and let Q of X be the  quotient f of x divided by G of X by writing   Q of x equals f of x times G to the G of x to  the negative 1 power which we certainly can do   use the product rule chain Rule and some algebra  to derive the final form of the quotient rule as   it's usually written from the last video and this  is the way I say it low D High minus Heidi low   over the square of what's below the low function  is G of X the high function is f of x low D High

means the lower function times the derivative  of the higher function minus High the low means   the top function the high function times  the derivative of the low function over the   square of what's below meaning Square the lower  function that's the final form of the chain rule   so what do we want to do here we want to  differentiate Q of X written like this where   we don't need the quotient rule but we can use the  product rule n chain Rule now what is Q Prime of X here it's a product first of all so it's the  derivative of the first function f Prime of x   times the second function G of x to the negative 1  power we don't need the chain rule there plus the   first function times the derivative of the second  G of x to the negative 1 power I definitely need   the chain rule there think about it with me here  the inside function focused on this part there is

G of X that's what gets done first the outside  function is Raising to the negative 1 power you   could say x to the negative one power the chain  rule says take the derivative of that outside   function the derivative of x to the negative 1  power by the power rule would be negative One X   to the negative two power but then replace x with  the inside function G of X in this case that gets   raised to the negative 2 power then multiply  times the derivative of that inside function there is Q Prime in a not standard form we need  to write this in the standard form to help us   finish this problem we want to write things as  fractions this is f Prime of x divided by G of   X and then we have minus right this entire thing  as a fraction you'd have f of x times G Prime of x

divided by G of X quantity squared and again I put  the negative sign in front to compensate for that   negative 1. this is a difference of two fractions  we need a common denominator this one has a   denominator of G of X this one has a denominator  the bottom of G of x squared to get a common   denominator I need to multiply this one by G of X  on both the top and the bottom it doesn't change   the function because I'm really multiplying by 1.  that's going to give me that common denominator

and now that I've got that common denominator  I can now subtract these two fractions by   subtracting their numerators and I get I'll write  it in the form I usually write it low D High minus   High Delo over the square of what's below assuming  everything is differentiable technically assuming   we're not dividing by zero we have derived not  proved because we have not written sentences   but we have derived the quotient rule with the  product rule and chain rule thanks for watching

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent