# Finding the derivative using first principles

How would I go at finding the derivative of:

$$f(x)=\frac{3x-1}{x+{2}},x≠-2 \mathbb{}$$

using first principles?

• Welcome to Mathematics Stack Exchange. You could apply your definition of derivative. What is that? Jun 11 '19 at 22:37
• that's all the information the question gives me. Jun 11 '19 at 22:40
• Do you know what a derivative is? If not, you’re going to have a difficult time with this question Jun 11 '19 at 22:41
• oh sorry, well I believe its the rate of change of a function? Jun 11 '19 at 22:43
• @J.W. Tanner .. Ahh I didn't see. I will delay the answer. :) Jun 11 '19 at 22:46

For $$x_0\ne2$$ we have by definition of the derivative: \begin{align} f'(x_0) &= \lim_{x\to x_0} \frac{f(x)-f(x_0)}{x-x_0}\\ &= \lim_{x\to x_0} \left(\frac{3x-1}{x+2} - \frac{3x_0-1}{x_0+2}\right)\cdot \frac1{x-x_0}\\ &= \lim_{x\to x_0} \frac{(3x-1)(x_0+2)-(3x_0-1)(x+2)}{(x+2)(x_0+2)(x-x_0)}\\ &= \lim_{x\to x_0} \frac{7(x-x_0)}{(x+2)(x_0+2)(x-x_0)}\\ &= \lim_{x\to x_0} \frac7{(x+2)(x_0+2)}\\ &= \frac7{(x+2)^2}. \end{align}
The definition of derivative, applied to this function, is $$\lim_{h\to 0}\frac1{h} \left[ \frac{3(x+h)-1}{(x+h)+2}-\frac{3x-1}{x+2}\right]$$ Cross multiply to get $$\lim_{h\to 0} \left[ \frac{(x+2)(3x+3h-1)-(x+h+2)(3x-1)}{h(x+h+2)(x+2)}\right]\\ = \lim_{h\to 0} \left[ \frac{3x^2+3hx-x+6x+6h-2-3x^2+x-3hx+h-6x+2}{h(x+h+2)(x+2)}\right]\\ = \lim_{h\to 0} \left[ \frac{3hx+6h-3hx+h}{h(x+h+2)(x+2)}\right]\\ = \lim_{h\to 0} \left[ \frac{3x+6-3x+1}{(x+h+2)(x+2)}\right] \\ = \lim_{h\to 0} \left[ \frac{7}{(x+h+2)(x+2)}\right]$$ Up to here we have not yet used the intention of taking $$h \to 0$$ but now we do, getting the answer $$\frac7{(x+2)^2}$$
This is quite straight forward actually. $$f'(x)$$ is defined according to the first principle as $$\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
\begin{align} &f(x)=\frac{3x-1}{x+2}\\ &f(x+h)=\frac{3x+3h-1}{x+h+2}\\ &\implies \frac{f(x+h)-f(x)}{h}=\frac{(3x-3h-1)(x+2)-(3x-1)(x+h+2)}{h}\\ &\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}= \lim_{h\to 0} \frac{7h}{h(x+h+2)(x+2)}\\ &=\frac{7}{(x+2)^2} \end{align}