TITLE: Solving separable differential equation
QUESTION [7 upvotes]: Seems straight-forward but I've been unable to get it right. Here are my steps:
$$y'(x) = \sqrt{-2y(x) + 28},\hspace{20 pt} y(-4)=-4$$
$$\int {1 \over \sqrt{28-2y} }\hspace{2 pt}\text{d}y = \int \text{d}x$$
$$-\sqrt{28-2y} = x + c$$
$$(28-2y) = (x+c)^2$$
$$y = -1/2x^2 - cx - c^2/2 + 14$$
$$c = {-2, 10}$$
$$\Rightarrow y = -1/2x^2 - 10x - 36$$
I've checked it over many countless times but for the life of me I can't figure out why it won't work. I've tried plugging the result back into the original equation and it seems to me like it checks out if you take the negative of the square root..

REPLY [2 votes]: So what we want here is a particular solution to our ODE given our condition: $y(-4) = -4$
$$y'(x) = \sqrt{-2y(x) + 28},\hspace{20 pt} y(-4)=-4$$
$$\Rightarrow \dfrac{dy}{dx} = \sqrt{-2y(x) + 28}$$
$$\Rightarrow \int {1 \over \sqrt{28-2y} }\hspace{2 pt}\text{d}y = \int {1}~\text{d}x$$
$u = 28-2y$
$du = -2dx$
$dx = -\dfrac{1}{2}du$
$$\Rightarrow -\dfrac{1}{2}\int {1 \over \sqrt{u} }\hspace{2 pt}\text{d}y = \int {1}~\text{d}x$$
$$\Rightarrow -\dfrac{1}{2}\int {u^{-\dfrac{1}{2}}} \hspace{2 pt}\text{d}y = \int {1}~\text{d}x$$
$$\Rightarrow -\dfrac{1}{2}2u^{\dfrac{1}{2}} = x$$
$$\Rightarrow -\sqrt{28-2y} = x + c$$
$$\Rightarrow \sqrt{28-2y} = -c - x,~~y(-4) = -4$$
$$\Rightarrow \sqrt{28-2(-4)} = -c - (-4)$$
$$\Rightarrow \sqrt{36} = -c + 4$$
$$\Rightarrow 6 = -c + 4$$
$$\Rightarrow c = -2$$
$$\Rightarrow \sqrt{28-2y}^{2} = (-c-x)^2$$
$$\Rightarrow 28-2y = (-(-2)-x)$$
$$\Rightarrow 28-2y = (2-x)^{2}$$
$$\Rightarrow 28-2y = 4-4x+x^{2}$$
$$\Rightarrow 2y = 28-4+4x-x^{2}$$
$$\Rightarrow y(x) = \dfrac{28-4+4x-x^{2}}{2}$$
$$\Rightarrow y(x) = \dfrac{28}{2}-\dfrac{4}{2}+\dfrac{4x}{2}-\dfrac{x^{2}}{2}$$
$$\Rightarrow y(x) = 14-2+2x-\dfrac{1}{2}x^{2}$$
$$\Rightarrow y(x) = -\dfrac{1}{2}x^{2}+2x+12.$$
Hence, 
$~~~~~~~~~~~~~~~~~~~~~~~~y(x) = -\dfrac{1}{2}x^{2}+2x+12$
is our particular solution found to our original first-order seperable linear ordinary differential equation. $\blacksquare$
I hope this helped out, and hopefully I did not make any mistakes to cause any type of confusion
here.