Differentiation from first principles Gradient of a straight line , or 𝑦2 −𝑦1 . 𝑥2 −𝑥1 If 𝑦 = 𝑓 𝑥 then this formula can be written as 𝑦1 𝑓(𝑥2 )−𝑓(𝑥1 ) 𝑥2 −𝑥1 𝑥2 − 𝑥1 =ℎ = 𝑓(𝑥2 ) − 𝑓(𝑥1 ) 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑖𝑛 𝑦𝑠 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑖𝑛 𝑥𝑠 𝑦2 𝑦2 − 𝑦1 As you know, the gradient of a straight line is given by 𝑦=𝑓 𝑥 If the difference between 𝑥1 and 𝑥2 is ℎ, then 𝑥2 = 𝑥1 + ℎ so the formula becomes 𝑓(𝑥1 +ℎ)−𝑓(𝑥1 ) (𝑥1 +ℎ)−𝑥1 𝑥 𝑥1 Since we’re now only dealing with a single 𝑥 value, we can lose the subscript 1, leaving 𝑓(𝑥+ℎ)−𝑓(𝑥) , (𝑥+ℎ)−𝑥 or simply 𝑓(𝑥+ℎ)−𝑓(𝑥) . ℎ Put that formula aside for a minute and let’s look at what happens with a curve. 𝑥2 = 𝑥1 +ℎ Gradient of a curve If we’re dealing with a curve then the gradient at a given point is the gradient of the tangent at that point. 𝑦=𝑓 𝑥 To find the gradient of the curve at P, we need to find the gradient of the tangent (blue line) at that point… … but in order to find a gradient we need the coordinates of TWO points on the tangent, and we only have one. Let’s use a chord (a line that cuts the curve in two places) as an approximation – i.e. the green line on this graph. The gradient of the chord is given by the formula from 𝑓(𝑥+ℎ)−𝑓(𝑥) the previous slide: ℎ … but that’s clearly not the same as the gradient of the tangent at P. Px 𝑥 𝑥 𝑥+ℎ Gradient of a curve 𝑦=𝑓 𝑥 How can we make the gradient of the chord closer to the gradient of the tangent? What happens if we move the second point closer to the first (reducing h)? You can see that the gradient of the new chord is closer to the gradient of the tangent. We can continue reducing h until h approaches 0, at which point the chord and the tangent become indistinguishable, as do their gradients. The gradient of the chord when this happens is the limit of the gradient as h approaches 0, or 𝑓(𝑥+ℎ)−𝑓(𝑥) ℎ→0 (𝑥+ℎ)−𝑥 𝑓 ′ 𝑥 = lim 𝑓(𝑥+ℎ)−𝑓(𝑥) ℎ ℎ→0 or lim P x 𝑥 𝑥 𝑥+ℎ 𝑥+ℎ The formula is given to you so you don’t need to memorise it. Derivation from first principles We are going to show that if 𝑓 𝑥 = 𝑥 2 then 𝑓′ 𝑥 = 2𝑥. ′ 𝑓 𝑥 = 𝑓(𝑥+ℎ)−𝑓(𝑥) lim ℎ ℎ→0 First, substitute in for 𝑓 𝑥 and 𝑓 𝑥 + ℎ : 𝑓′ 𝑥 = (𝑥+ℎ)2 −𝑥 2 lim ℎ ℎ→0 ℎ→0 Now expand the brackets and tidy up: 𝑓′ 𝑥 = = 𝑥 2 +2𝑥ℎ+ ℎ2 −𝑥 2 lim ℎ ℎ→0 2𝑥ℎ+ ℎ2 lim ℎ ℎ→0 = lim (2𝑥 + ℎ) ℎ→0 Now consider what will happen as h approaches zero… As h approaches zero, any term with h as a factor will become insignificant So 𝑓 ′ 𝑥 = lim 2𝑥 + ℎ = 2𝑥 ℎ(2𝑥+ℎ) ℎ ℎ→0 = lim Hence if 𝒇 𝒙 = 𝒙𝟐 then 𝒇′ 𝒙 = 𝟐𝒙. You need to be able to replicate this proof for small integer powers of x, i.e. for f(x) = x3, x4, etc. For higher powers, the binomial expansion will prove helpful. In Year 2 you will also have to apply it to sin x and cos x. Questions 1. Derive from first principles the expressions of the gradients of the curves (a) 𝑦 = 𝑥 (b) 𝑓(𝑥) = 𝑥 3 Prior knowledge required We will be using the same formula as before: 𝑓(𝑥+ℎ)−𝑓(𝑥) ℎ ℎ→0 𝑓 ′ 𝑥 = lim This time our f(x) is either sin x or cos x So 𝑓 𝑥 + ℎ = sin(𝑥 + ℎ) or cos(𝑥 + ℎ) and we’re going to need to use the identities 𝐴+𝐵 𝐴−𝐵 sin 2 2 𝐴+𝐵 𝐴−𝐵 −2 sin sin 2 2 sin 𝐴 − sin 𝐵 = 2 cos cos 𝐴 − cos 𝐵 = (these are in your formulae booklet) and also the small angle approximation that, as 𝜃 → 0, sin 𝜃 → 𝜃 so sin 𝜃 𝜃 → 1, or sin 𝜃 lim 𝜃→0 𝜃 =1 Angles MUST be in radians! Differentiation of sin x from first principles We are going to show that if 𝑓 𝑥 = sin 𝑥 2 cos ′ 𝑓 𝑥 = lim then 𝑓′ 𝑥 = cos 𝑥. ℎ→0 𝑓′ 𝑥 = 𝑓(𝑥+ℎ)−𝑓(𝑥) lim ℎ ℎ→0 First, substitute in for 𝑓 𝑥 and 𝑓 𝑥 + ℎ : sin 𝑥+ℎ −sin 𝑥 ℎ ℎ→0 𝑓 ′ 𝑥 = lim Now use the trig identity for sin A – sin B: 𝐴+𝐵 𝑓′ 𝑥 = = lim (𝑥+ℎ)+𝑥 𝑥+ℎ −𝑥 sin 2 2 2 cos ℎ ℎ→0 2𝑥+ℎ = 𝐴−𝐵 2 cos 2 sin 2 lim ℎ ℎ→0 2 cos 2 lim ℎ ℎ→0 ℎ sin2 and since 2𝑎𝑏 𝑐 ℎ 2 𝑥+ sin ℎ 2 ℎ 𝑏 is the same as 𝑎 × 𝑐 , ℎ 2 𝑓 ′ 𝑥 = lim cos(𝑥 + ) × ℎ→0 = lim cos 𝑥 + ℎ→0 ℎ 2 2 ℎ sin 2 ℎ 2 ℎ since lim ℎ→0 sin 2 ℎ 2 =1 As h approaches zero, any term with h as a factor will become insignificant So 𝑓 ′ 𝑥 = lim cos 𝑥 + ℎ→0 ℎ 2 = cos 𝑥 Hence if 𝒇 𝒙 = 𝐬𝐢𝐧 𝒙 then 𝒇′ 𝒙 = 𝐜𝐨𝐬 𝒙 Now you try it for cos x. Differentiation of cos x from first principles We are going to show that if 𝑓 𝑥 = cos 𝑥 then 𝑓 ′ 𝑥 = − sin 𝑥. 𝑓′ 𝑥 = 𝑓 ′ 𝑥 = lim and 𝑓(𝑥+ℎ)−𝑓(𝑥) lim ℎ ℎ→0 First, substitute in for 𝑓 𝑥 and 𝑓 𝑥 + ℎ : 𝐴+𝐵 𝑓′ 𝑥 = = lim −2 sin (𝑥+ℎ)+𝑥 𝑥+ℎ −𝑥 sin 2 2 ℎ ℎ→0 2𝑥+ℎ = 𝐴−𝐵 −2 sin 2 lim ℎ ℎ→0 ℎ sin2 ℎ 2 ℎ 𝑏 is the same as 𝑎 × 𝑐 , ℎ 2 ℎ→0 cos 𝑥+ℎ −cos 𝑥 ℎ ℎ→0 −2 sin 2 sin 2 lim ℎ ℎ→0 ℎ→0 2𝑎𝑏 since 𝑐 sin 𝑓 ′ 𝑥 = lim −sin(𝑥 + ) × 𝑓 ′ 𝑥 = lim Now use the trig identity for sin A – sin B: ℎ 2 −2 sin 𝑥+ = lim −sin 𝑥 + ℎ→0 ℎ 2 2 ℎ sin 2 ℎ 2 ℎ since lim ℎ→0 sin 2 ℎ 2 =1 As h approaches zero, any term with h as a factor will become insignificant So 𝑓′ 𝑥 = lim −sin 𝑥 + ℎ→0 ℎ 2 = −sin 𝑥 Hence if 𝒇 𝒙 = 𝐜𝐨𝐬 𝒙 then 𝒇′ 𝒙 = −𝐬𝐢𝐧 𝒙 Worksheet Question 1 𝑦 = 2𝑥 2 − 5𝑥 + 3 Question 2 5 3 𝑦 = 2 + 𝑥2 𝑥 Question 3 𝑦= 2 𝑥+1 Worksheet Question 4 𝑦 = cos 2𝑥 Question 5 𝑦 = sin(2 − 𝑥) Question 6 𝑦 = tan 𝑥