# Solving separable differential equation

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..

-
Isn't it $\int \frac{1}{\sqrt{\ldots}} d y$ that you have on the left side. – Dario Sep 19 '10 at 19:00
Yes, you're right, my mistake, I did have it like that on paper. This was just my first time using latex.. – Radu Sep 19 '10 at 19:08
$c$ is $-2$, not $10$, as follows from $-\sqrt{28-2y}=x+c$. In any case $c=10$ wouldn't give your final line. – Robin Chapman Sep 19 '10 at 19:31
@Robin, fixed that mistake too. Sorry for being careless in posting my work. With $c =-2$, I'm getting $-1/2x^2 + 2x + 12$ which is in fact correct. Do you mind submitting it as an answer? – Radu Sep 19 '10 at 19:46

As Robin Chapman has pointed out, the correct choice is $c=-2$, not $c=10$. This gives $$y(x)=\frac{28-(x-2)^2}{2} = -\frac{x^2}{2} + 2x + 12.$$

However, this formula describes a parabola $y(x)$ which hits its highest point $y=14$ at $x=-2$, and this is a decreasing function for $x>-2$, which disagrees with the ODE. (Since the square root in the right-hand side of the ODE can't be negative, the solution $y(x)$ can't be decreasing.) Moreover, the right-hand side of the ODE is undefined for $y>14$, so the solution can't continue to increase beyond 14. The conclusion is that the only possible continuation is $y(x)=14$ for all $x>-2$. Hence, the solution is:

$$y(x)=\frac{28-(x-2)^2}{2} = -\frac{x^2}{2} + 2x + 12, \quad -4 \le x \le -2,$$

$$y(x)=14, x>-2.$$

-
Very good, thank you for the in depth explanation. – Radu Sep 20 '10 at 12:36

Your second line should be $$\int {1 \over \sqrt{28-2y} }\hspace{2 pt}\text{d}y = \int \text{d}x.$$

-
Fixed, thanks Derek. Unfortunately I did have that on paper and just made a mistake in typing it up here.. – Radu Sep 19 '10 at 19:11

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.

-