TITLE: Slope function of a curve
QUESTION [7 upvotes]: I have a question I am having trouble answering:
The slope function of a curve is: $$\frac{dy}{dx}=ux+k$$
u and k are constants.
The curve passes through $(0,-1)$ and $(2,-5)$
At $(2,-5)$ the slope equals $1$.
How do I get the equation?
I have tried integrating and pluging the two above points in and trying to solve for u and k but I end up getting the integration constant $c=-1$ and $k=2-u$  I then plug this into the integrated slope function: $$\frac{ux^2}{2} + kx -1$$
but I don't get the correct answer.
Could someone point out where I am going wrong wrong and how to correct it.

REPLY [2 votes]: With
$y' = ux + k$
we have in general
$y = \frac{1}{2}ux^2 + kx + c$,
for some constant $c$.   Plugging in the point $(0,  -1)$ yields
$c = -1$;
plugging in $(2, -5)$ gives
$2(u + k) = -4$
and, last but not least, plugging $x = 2$, $y' = 1$ into the slope equation gives
$2u + k = 1$.
Then
$2k= -4 - 2u = -4 - (1 - k)$,
whence
$k = -5$;
and
$u = 3$
immediately follows.
Hope this helps.  Cheers.