Slope function of a curve 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.
 A: From $\frac{dy}{dx}=ux+k$ you have $y=\frac{ux^{2}}{2}+kx+c$. The
three pieces of information yield the equations
\begin{align*}
-1 & =0u+0k+1c\\
-5 & =2u+2k+1c\\
1 & =2u+1k+0c.
\end{align*}
You can describe this by the matrix equation
$$
M\mathbf{x}=\mathbf{b}
$$
where
$$
M=\left[\begin{array}{ccc}
0 & 0 & 1\\
2 & 2 & 1\\
2 & 1 & 0
\end{array}\right]
$$
and
$$
\mathbf{b}=\left[\begin{array}{c}
-1\\
-5\\
+1
\end{array}\right].
$$
Note that the way I've written it,
$$
\mathbf{x}=\left[\begin{array}{c}
u\\
k\\
c
\end{array}\right].
$$
Solving,
$$
\mathbf{x}=M^{-1}\mathbf{b}=\left[\begin{array}{c}
+3\\
-5\\
-1
\end{array}\right]=\left[\begin{array}{c}
u\\
k\\
c
\end{array}\right].
$$
This is equivalent to going through and solving each equation in terms
of one of the independent variables.
A: You solved for $c$ correctly, but you made a mistake with $k$. Note that when you plug in the point $(2, -5)$, you should get:
\begin{align*}
\frac{u(2)^2}{2} + k(2) - 1 &= -5 \\
2u+ 2k &= -4 \\
u+ k &= -2 \tag{1}\\
\end{align*}
Now since the slope at $(2,-5)$ is $1$, we also know that:
\begin{align*}
\frac{dy}{dx}&=ux+k \\
1 &= u(2) + k \\
-2u - k &= -1 \tag{2}\\
\end{align*}
Adding together $(1)$ and $(2)$ yields:
$$
-u=-3 \iff u = 3
$$
Hence, using $(1)$, we obtain $k = -2-u = -2-(3) = -5$.
A: 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.
