## More on differentiation

1. Here we like to find out the derivative for sin(x), cos(x), tan(x), ex and ln (x). We will start from the first principles.
2. Recall that differentiation from the first principles is
 f ' (x) = f(x + h) -f(x)    h

#### Exploration 1: The aim here is to find the limit of [ sin(x+h)-sin(x) ]/h as h tends to zero. We will start a plot of the process with h=0.001.

2. Set your window: Xmin=0, Xmax = 2p, Xscl=0.5p, Ymin=-1.25, Ymax= 1.25 & Yscl=1
3. Press [Y=]. At Y1=, enter (sin(x+0.001)-sin(x))/0.001. Note that h is allowed to be 0.001. You could choose to have a smaller h.
4. Plot the graph. Observe your graph. What is the limit of our process [ sin(x+h)-sin(x) ]/h as h tends to zero?
5. Enter your guess into Y2 and plot. How close is the process to your guess? Look at the table by pressing [2 nd] [graph]. Compare the values in Y1 and Y2.

Exploration 2:
We can now investigate the limit of [ cos(x+h)-cos(x) ]/h as h tends to zero by simply returning to [Y=] and press.

1. Go to Y1 and place your cursor in on "s" of sin and press [Del]. This will delete sin.
2. Press [2 nd] [Del] to insert.
3. Press [cos] and move on to the next "s" of sin and [Del]. Insert cos.
4. Repeat (iv) and (v) in Exploration 1.
Repeat this exploration for tan(x), ex and ln (x).
Function Derivative
sin x cos x
cos x -sin x
tan x     1
cos2x
ex ex
ln x 1
x
3. Example 1. Take the derivative of the following functions with respect to x:
1. y = sin x + cos x
2. y = 2 sin x + x
3. g = 1/2sin x- 5 cos x
4. g = 2ex - 3/2 cos x
5. y = ln x7
6. y = ln(2x3)
7. y = ln ( 1/√(x) )
8. p = log x
9. p = logb x
Solutions:
1. y ' (x) = cos x - sin x
2. y ' (x) = 2cos x + 1
3. g ' (x) = 1/2cos x + 5 sin x
4. g ' (x) = 2ex + 3/2 sin x
5. y = 7 ln x
y '(x) = 7/x
6. y = ln 2 + ln x3
y = ln 2 + 3 ln x
dy/dx = 3/x
7. y = ln 1 - ln √(x)
y = ln 1 - ln (x1/2)
y = 0 - 1/2ln x
dy/dx = -1/(2x)
8. p = log10 x. Here we need to change everything to base e. Note that loge x = ln x
p =ln x/ln 10
p = (1/ln 10)ln x
p ' (x) = (1/ln 10)(1/x)
p ' (x) = 1/(xln 10)
9. p = ln x/ln b p '(x) = 1/(xln b) as in previous solution.

4. Example 2. Find the gradient of the curve at the given value of x.
1. y = ln x at x=2
2. y = sin x + ln x at x = θ/2
3. y = x2 + ln (3x5) at x= 1
Solutions:
1. y '(x) = 1/x
y ' (2) = 1/2
2. y ' (x) = cos x + 1/x
y ' (θ/2) = cos(θ/2) + 1/(θ/2) ; where θ is some fixed angle.
y ' (θ/2) = cos(θ/2) + 2/θ
3. y = x2 + ln 3 + ln x5
y = x2 + ln 3 + 5ln x
y ' (x) = 2x + 5/x
y ' (1) = 2(1) + 5/1
y ' (1) = 7.

5. Example 3. Find the equation of the tangent to the curve y = x + ln x at x=1.
Solution:
Let us first find the point on the curve. We need to have the y-coordinate. We obtain this by subsituting x=1 into y =x + ln x .
y(1) = 1 + ln 1 = 1

Now let us find the derivative of y.
y ' (x) = 1 + 1/x.
y ' (1) = 1 + 1/1
y ' (1) = 2. The gradient of the tangent to the curve at x=1 is 2.

Now we will obtain the equation of the tangent at (1,1).
y - 1 = 2 (x -1 )
y = 2x -2 +1
y = 2x - 1.

6. Example 4. Find the smallest positive value of θ for which y = 2θ + 3cosθ has a gradient of 1/2.
Solution:
dy/dθ = 2 -3sinθ
2 -3sinθ = 1/2
2 -1/2 = 3sinθ
3/2 = 3sinθ
1/2 = sinθ
θ = π/6