Attempting to use the Laplace transform to solve a second order ordinary differential equation with a piece wise forcing function.

129 Views Asked by At

Thanks to everyone who will bare with me and read this attempt and further validate it correct and improve upon it or otherwise correct its wrong.

The question: $$ y''(t)+2y'(t)+y(t)=u\left( t-\frac { \pi }{ 3 } \right) sin(t) $$

While y(0)=0 and y'(0)=1

Some notation:

$$ u\left( t-\frac { \pi }{ 3 } \right) \left\{ 0\quad ,\quad t\quad <\frac {\pi }{3}; 1\quad,\quad t\quad>\frac { \pi }{ 3 } \right\} $$

Attempt:

Using trigonometry:

sin(t-pi/3)=sin(t)cos(pi/3)-cos(t)sin(pi/3)

therefore:

2sin(t-pi/3)=sqrt(3)sin(t)-cos(t) eqn. 1

also since:

cos(t-pi/3)=cos(t)cos(pi/3)-sin(t)sin(pi/3)

then:

2cos(t-pi/3)=sqrt(3)cos(t)-sin(t) eqn. 2

now we calculate eqn. 2 +sqrt(3)*eqn. 1

2sqrt(3)sin(t-pi/3)+2cos(t-pi/3)=3sin(t)+sin(t)

Finally we arrive at the conclusion that:

sin(t)=(sqrt(3)/2)sin(t-pi/3)+0.5cos(t-pi/3)..... p=sqrt(3)/2

so

$$ y''(t)+2y'(t)+y(t)=u\left( t-\frac { \pi }{ 3 } \right) \left( \frac { \sqrt { 3 } }{ 2 } \sin { \left( t-\frac { \pi }{ 3 } \right) } +\frac { 1 }{ 2 } \cos { \left( t-\frac { \pi }{ 3 } \right) } \right) $$ $$ L \left( y''(t)+2y'(t)+y(t)=u\left( t-\frac { \pi }{ 3 } \right) \left( \frac { \sqrt { 3 } }{ 2 } \sin { \left( t-\frac { \pi }{ 3 } \right) } +\frac { 1 }{ 2 } \cos { \left( t-\frac { \pi }{ 3 } \right) } \right) \right) $$

$$ s^{ 2 }Y-sy(0)-y'(0)+2sY-2y(0)+Y={ e }^{ -\frac { \pi }{ 3 } s }\left( \frac { \sqrt { 3 } }{ 2 } \left( \frac { 1 }{ { s }^{ 2 }+1 } \right) +\frac { 1 }{ 2 } \left( \frac { s }{ { s }^{ 2 }+1 } \right) \right) $$

We can simplify: $$ Y={ e }^{ -\frac { \pi }{ 3 } s }\left( \frac { \sqrt { 3 } }{ 2 } \left( \frac { 1 }{ \left( { s }^{ 2 }+1 \right) { \left( s+1 \right) }^{ 2 } } \right) +\frac { 1 }{ 2 } \left( \frac { s }{ \left( { s }^{ 2 }+1 \right) { \left( s+1 \right) }^{ 2 } } \right) \right) +\frac { 1 }{ { \left( s+1 \right) }^{ 2 } } $$

Using partial fractions methods we can derive that: $$ Y={ e }^{ -\frac { \pi }{ 3 } s }\left( \frac { \sqrt { 3 } }{ 2 } \left( \frac { 1 }{ 2 } \left( \frac { 1 }{ { \left( s+1 \right) }^{ 2 } } \right) +\frac { 1 }{ 2 } \left( \frac { 1 }{ s+1 } \right) -\frac { 1 }{ 2 } \left( \frac { s }{ { s }^{ 2 }+1 } \right) \right) +\frac { 1 }{ 2 } \left( \frac { 1 }{ 2 } \left( \frac { 1 }{ { s }^{ 2 }+1 } \right) -\frac { 1 }{ 2 } \left( \frac { 1 }{ { \left( s+1 \right) }^{ 2 } } \right) \right) \right) +\frac { 1 }{ { \left( s+1 \right) }^{ 2 } } $$

Finally (unnnnnnnhhhhh) we can inverse Laplace to get:

$$ y(t)={ e }^{ -t }t+u\left( t-\frac { \pi }{ 3 } \right) \left( \frac { \sqrt { 3 } }{ 4 } \left( { e }^{ -\left( t-\frac { \pi }{ 3 } \right) }+{ e }^{ -\left( t-\frac { \pi }{ 3 } \right) }\left( t-\frac { \pi }{ 3 } \right) +\cos { \left( t-\frac { \pi }{ 3 } \right) } \right) +\frac { 1 }{ 4 } \left( \sin { \left( t-\frac { \pi }{ 3 } \right) -{ e }^{ -\left( t-\frac { \pi }{ 3 } \right) }\left( t-\frac { \pi }{ 3 } \right) } \right) \right) $$

Alright, I couldn't find anything to check my work so could someone help me please? thanks in advance again your help is appreciated.

P.S.:(1)This material is new to me and I am no expert, hence why I am asking. (2!)I apologise in advance for my lack of skill in using this site's math-typing function and formats. (3)I apologise for all the grammer and spelling mistakes above.

1

There are 1 best solutions below

1
On BEST ANSWER

First, \begin{align} \mathscr{L}\{y'\} & = \int_{0}^{\infty}e^{-st}y'(t)dt \\ & = e^{-st}y(t)|_{t=0}^{\infty}+s\int_{0}^{\infty}e^{-st}y(t)dt \\ & = -y(0)+s\mathscr{L}\{y\} = s\mathscr{L}\{y\} \end{align} Then, using the above, the transform of the second derivative is \begin{align} \mathscr{L}\{y''\} & =\int_{0}^{\infty}e^{-st}y''(t)dt \\ & = e^{-st}y'(t)|_{t=0}^{\infty}+s\int_{0}^{\infty}e^{-st}y'(t)dt \\ & = -y'(0)+s\mathscr{L}\{y'\} \\ & = -1 + s^{2}\mathscr{L}\{y\} \end{align} Therefore, \begin{align} \mathscr{L}\{y''+2y'+y\} & =s^{2}\mathscr{L}\{y\}+2s\mathscr{L}\{y\})+\mathscr{L}\{y\}-1 \\ & = (s+1)^{2}\mathscr{L}\{y\}-1. \end{align} And this must equal \begin{align} \mathscr{L}\left\{u(t-\frac{\pi}{3})\sin(t)\right\} & = \int_{\pi/3}^{\infty}e^{-st}\sin(t)dt \\ & = \int_{\pi/3}^{\infty}\frac{e^{-st+it}-e^{-st-it}}{2i}dt \\ & = \frac{1}{2i}\left[\frac{1}{i-s}e^{-st+it}-\frac{1}{i+s}e^{-st-it}\right]_{t=\pi/3}^{\infty} \\ & = \frac{e^{-s\pi/3}}{2i}\left[\frac{e^{i\pi/3}}{s-i}+\frac{e^{-i\pi/3}}{s+i}\right] \\ & = \frac{e^{-s\pi/3}}{2i}\left[\frac{\frac{1}{2}+i\frac{\sqrt{3}}{2}}{s-i}+\frac{\frac{1}{2}-i\frac{\sqrt{3}}{2}}{s+i}\right] \\ & = \frac{e^{-s\pi/3}}{2i}\left[\frac{s-\sqrt{3}}{(s-i)(s+i)}\right] \end{align} Therefore, $$ \mathscr{L}\{y\}=\frac{1}{(s+1)^{2}}+\frac{e^{-s\pi/3}}{2i(s+1)^{2}}\left[\frac{s-\sqrt{3}}{(s-i)(s+i)}\right]. $$ We have slightly different Laplace transforms.