To differentiate the function from first principles, we need to evaluate the limit:
`f'(x)=lim_{h->0}{f(x+h)-f(x)}/h`
Consider the numerator of the limit.
`f(x+h)-f(x)`
`=(x+h)^2-5(x+h)+3-(x^2-5x+3)` expand brackets
`=x^2+2xh+h^2-5x-5h+3-x^2+5x-3` collect like terms
`=2xh-5h+h^2` factor the h
`=h(2x-5+h)`
Now put into the numerator of the limit to get:
`f'(x)=lim_{h->0}{h(2x-5+h)}/h` cancel common factor
`=lim_{h->0}(2x-5+h)` now take the limit
`=2x-5`
The derivative of the function is `f'(x)=2x-5` .