# Differential Equation y'=sin(y-t) y(0)=0

• Sep 9th 2011, 08:26 AM
beanus
Differential Equation y'=sin(y-t) y(0)=0
I got y=2arctan(t/(t-2))+t but the program I'm using for school says I'm wrong. I looked it up on wolfram and it gave me something completely different but that was wrong too. I did the work myself twice and got y=2arctan(t/(t-2))+t. What do you guys get? Thanks.
• Sep 9th 2011, 08:48 AM
alexmahone
Re: Differential Equation y'=sin(y-t) y(0)=0
Quote:

Originally Posted by beanus
I got y=2arctan(t/(t-2))+t but the program I'm using for school says I'm wrong. I looked it up on wolfram and it gave me something completely different but that was wrong too. I did the work myself twice and got y=2arctan(t/(t-2))+t. What do you guys get? Thanks.

If $\displaystyle y=2tan^{-1}\left(\frac{t}{t-2}\right)+t$,

$\displaystyle y'=2*\frac{1}{1+\left(\frac{t}{t-2}\right)^2}*\frac{(t-2)*1-t*1}{(t-2)^2}+1$

$\displaystyle =\frac{2}{1+\left(\frac{t}{t-2}\right)^2}*\frac{-2}{(t-2)^2}+1$

$\displaystyle =\frac{-4}{(t-2)^2+t^2}+1$

$\displaystyle =\frac{2t^2-4t}{(t-2)^2+t^2}$

$\displaystyle =\frac{2t(t-2)}{(t-2)^2+t^2}$

$\displaystyle sin\ (y-t)=sin\left[2tan^{-1}\left(\frac{t}{t-2}\right)\right]$

$\displaystyle =\frac{2(\frac{t}{t-2})}{1+\left(\frac{t}{t-2}\right)^2}$

$\displaystyle =\frac{2t(t-2)}{(t-2)^2+t^2}$

So, $\displaystyle y'=sin\ (y-t)$

Also, $\displaystyle y(0)=0$

So I guess you're right.
• Sep 9th 2011, 10:01 AM
Prove It
Re: Differential Equation y'=sin(y-t) y(0)=0
Quote:

Originally Posted by alexmahone
If $\displaystyle y=2tan^{-1}\left(\frac{t}{t-2}\right)+t$,

$\displaystyle y'=2*\frac{1}{1+\left(\frac{t}{t-2}\right)^2}*\frac{(t-2)*1-t*1}{(t-2)^2}+1$

which is certainly not equal to $\displaystyle sin\ (y-t)$.

Maybe make the substitution $\displaystyle \displaystyle v = y - t \implies y = v + t \implies \frac{dy}{dt} = \frac{dv}{dt} + 1$, and the DE becomes

\displaystyle \displaystyle \begin{align*}\frac{dy}{dt} &= \sin{(y - t)} \\ \frac{dv}{dt} + 1 &= \sin{(v)} \\ \frac{dv}{dt} &= \sin{(v)} - 1 \\ \left[\frac{1}{\sin{(v)} - 1}\right]\,\frac{dv}{dt} &= 1 \\ \int{\left[\frac{1}{\sin{(v)} - 1}\right]\,\frac{dv}{dt}\,dt} &= \int{1\,dt} \\ \int{\frac{1}{\sin{(v)} - 1}\,dv} &= t + C_1\end{align*}

Now applying the Weierstrass Substitution:

Let $\displaystyle \displaystyle u = \tan{\left(\frac{v}{2}\right)} \implies v = 2\arctan{(u)} \implies dv = \frac{2}{1 + u^2}\,du$ and we can see that

\displaystyle \displaystyle \begin{align*} \sin{(v)} &= \sin{\left[2\arctan{(u)}\right]} \\ &= 2\sin{\left[\arctan{(u)}\right]}\cos{\left[\arctan{(u)}\right]} \\ &= 2\left\{\frac{\tan{\left[\arctan{(u)}\right]}}{\sqrt{1 + \tan^2{\left[\arctan{(u)}\right]}}}\right\}\left\{\frac{1}{\sqrt{1 + \tan^2{\left[\arctan{(u)}\right]}}}\right\} \\ &= 2\left[\frac{u}{\sqrt{1 + u^2}}\right]\left[\frac{1}{\sqrt{1 + u^2}}\right] \\ &= \frac{2u}{1 + u^2} \end{align*}

And finally substituting into the DE gives

\displaystyle \displaystyle \begin{align*} \int{\frac{1}{\sin{(v)} - 1}\,dv} &= t + C_1 \\ \int{\left(\frac{1}{\frac{2u}{1 + u^2} - 1}\right)\frac{2}{1 + u^2}\,du} &= t + C_1 \\ \int{\left(\frac{1}{\frac{2u - 1 - u^2}{1 + u^2}}\right)\frac{2}{1 + u^2}\,du} &= t + C_1 \\ \int{\left(\frac{1 + u^2}{2u - 1 - u^2}\right)\frac{2}{1 + u^2}\,du} &= t + C_1 \\ \int{\frac{2}{2u - 1 - u^2}\,du} &= t + C_1 \\ -2\int{\frac{1}{u^2 - 2u + 1}\,du} &= t + C_1 \\ -2\int{\frac{1}{(u-1)^2}\,du} &= t + C_1 \\ -2\int{(u - 1)^{-2}\,du} &= t + C_1 \\ -2\left[\frac{(u - 1)^{-1}}{-1}\right] + C_2 &= t + C_1 \\ -2\left(\frac{1}{1-u}\right) &= t + C\textrm{ where }C = C_1 - C_2 \\ \frac{2}{ \tan{\left(\frac{v}{2}\right)} - 1} &= t + C \\ \frac{\tan{\left(\frac{v}{2}\right)}-1}{2} &= \frac{1}{t + C} \\ \tan{\left(\frac{y-t}{2}\right)} - 1 &= \frac{2}{t + C}\end{align*}

\displaystyle \begin{align*} \tan{\left(\frac{y-t}{2}\right)} &= \frac{2}{t + C} + 1 \\ \tan{\left(\frac{y-t}{2}\right)} &= \frac{2 + t + C}{t + C} \\ \frac{y-t}{2} &= \arctan{ \left( \frac{ 2 + t + C }{ t + C } \right) } \\ y - t &= 2\arctan{ \left( \frac{ 2 + t + C }{ t + C } \right) } \\ y &= t + 2\arctan{ \left( \frac{ 2 + t + C }{ t + C } \right) }\end{align*}

Since $\displaystyle \displaystyle y(0) = 0$ we have

\displaystyle \displaystyle \begin{align*} 0 &= 0 + 2\arctan{ \left( \frac{2 + 0 + C}{0 + C} \right) } \\ 0 &= 2\arctan{ \left( \frac{2 + C}{ C} \right) } \\ 0 &= \arctan{ \left( \frac{2 + C}{C} \right) } \\ \tan{(0)} &= \frac{2 + C}{C} \\ 0 &= \frac{2 + C}{C} \\ 0 &= 2 + C \\ C &= -2\end{align*}

So finally

\displaystyle \displaystyle \begin{align*} y &= t + 2\arctan{ \left[ \frac{ 2 + t + (-2) }{ t + (-2) } \right] } \\ y &= t + 2\arctan{ \left( \frac{ t }{ t - 2 } \right) } \end{align*}
• Sep 9th 2011, 10:16 AM
beanus
Re: Differential Equation y'=sin(y-t) y(0)=0
And so that becomes y=2arctan(t/(t+1))+t

well thanks for the help guys. I ended up getting the question wrong, but I think it's a problem with the program.
• Sep 9th 2011, 10:18 AM
alexmahone
Re: Differential Equation y'=sin(y-t) y(0)=0
But what was wrong with my post (#2)?

Edit: Never mind, figured it out.
• Sep 9th 2011, 10:25 AM
Prove It
Re: Differential Equation y'=sin(y-t) y(0)=0
Quote:

Originally Posted by beanus
And so that becomes y=2arctan(t/(t+1))+t

well thanks for the help guys. I ended up getting the question wrong, but I think it's a problem with the program.

See the edits to my post...