Why should I only pick the positive number for $C$ in this IVP (separable differential equation)?

48 Views Asked by At

I'm practicing some problems for an upcoming DEs test. I tried the following initial value problem:

$\displaystyle\frac{1}{2}\displaystyle\frac{dy}{dx}=\sqrt{y+1}\cos x,y(\pi)=0$

Here's my work:

$\begin{align} \displaystyle\frac{1}{2}\displaystyle\frac{dy}{dx}&=\sqrt{y+1}\cos x \\ \int\displaystyle\frac{dy}{\sqrt{y+1}}&=\int 2\cos x\,dx \\ 2\sqrt{y+1}&=2\sin x+c_1 \\ \sqrt{y+1}&=\sin x + C \\ y+1&=(\sin x + C)^2 \end{align}$

Plugging in the initial value I get:

$\begin{align} 0+1&=(\sin\pi+C)^2\\ C^2&=1 \\ C&=\pm 1 \end{align}$

So the final answer I got was $y=(\sin x \pm 1)^2-1$, but the solution in the textbook was $y=(\sin x +1)^2-1$. Why did they only pick $+1$ as an answer for $C$?

1

There are 1 best solutions below

6
On BEST ANSWER

First, note that since $\dfrac{dy}{dx}=2\sqrt{y+1}\cos(x)$ is a function which is continuous on an open subset of the domain of $f(x)=2\sqrt{y+1}\cos(x)$ containing the point $(\pi,0)$ and so is $\partial f/\partial y$, we are guaranteed that there exists a unique solution containing the point $(\pi,0)$. So it cannot be the case that both $y=(\sin(x)+1)^2+1$ and $y=(\sin(x)-1)^2+1$ are solutions. Both functions satisfy the initial condition in that the point $(\pi,0)$ lies on the graphs of both.

Consider the choice C=1.

Let $y=(\sin(x)+1)^2-1=\sin^2(x)+2\sin(x)$ \begin{eqnarray}\frac{dy}{dx}&=&2\sin(x)\cos(x)+2\cos(x)\\ \frac{1}{2}\frac{dy}{dx}&=&(\sin(x)+1)\cos(x)\\ &=& |\sin(x)+1|\cos(x)\\ &=&\sqrt{\sin^2(x)-2\sin(x)+1}\cos(x)\\ &=&\sqrt{y+1}\cos(x)\end{eqnarray}

Now, consider the choice $C=-1$.

Let $y=(\sin(x)-1)^2-1$

Then \begin{eqnarray}\frac{dy}{dx}&=&2\sin(x)\cos(x)-2\cos(x)\\ \frac{1}{2}\frac{dy}{dx}&=&(\sin(x)-1)\cos(x)\\ &=& -|\sin(x)-1|\cos(x)\\ &=&-\sqrt{\sin^2(x)-2\sin(x)+1}\cos(x)\\ &=&-\sqrt{y+1}\cos(x)\end{eqnarray}

Which does not satisfy the differential equation.