Elementary Initial value problem ODE

52 Views Asked by At

So, I recently started working with differential equations. I've encountered a problem when it comes to initial value problems. For example this:

$$ y''(t) + y(t) = \sin(t)$$

$$ y(0) = 0 $$

$$ y'(0) = 0 $$

How do I do this? I suppose the homogenous solution is $ c_1 \cos(t) + c_2 \sin(t) $ but I'm unsure what to do after that. Mainly because the initial function isn't $ = 0 $

2

There are 2 best solutions below

0
On BEST ANSWER

Find a particular solution, let $$y_p(t)=A t \sin (t) + Bt \cos(t)$$

$$y_p'(t)=(A-Bt)\sin(t)+(At+B)\cos(t)$$

\begin{align}y_p''(t)&=-B\sin(t)+(A-Bt)\cos(t)+A\cos(t)-(At+B)\sin(t) \\ &=(-At-2B)\sin(t)+(2A-Bt)\cos(t)\end{align}

Since $$y_p''(t)+y_p(t)=\sin(t)$$

We have $$(-At-2B)\sin(t)+(2A-Bt)\cos(t)+At\sin(t)+Bt\cos(t)=\sin(t)$$

$$-2B\sin(t)+2A\cos(t)=\sin(t)$$

Hence $$-2B=1, 2A=0$$

$$B=-\frac12, A=0$$

Hence a particular solution $y_p(t)=-\frac12 t\cos(t)$

and the general solution is $$y(t)=-\frac12t\cos(t)+c_1\cos(t)+c_2\sin(t).$$

Now use the initial condition to solve for $c_1$ and $c_2$.

0
On

you will Need a Special solution of the inhomogeneous equation, make the Ansatz $$y_p=A\cos(t)$$