Solve $y'+4y+5\int_0^xydx=e^{-x}$, $y(0)=0$
I am asked to solve the following problem using Laplace transforms. I know how to solve this using the regular method but unsure as to how to solve it via the Laplace method and would really appreciate some help.
If we derive the expression then we will obtain
$y''+4y'=-e^{-x}-5x$
Now we can apply the laplace transform.
$L[y'']+L[4y']=L[-e^{-x}]+L[-5x]$
We know that
$L[y']=pL[y]-y(0)$ and $L[y'']=p^2L[y]-py(0)-y'0$
$L[e^{-x}]=-\frac{1}{p+a}$ and $L[-5x]=-5L[x]=\frac{-5}{p^2}$
Combining all the above yields
$p^2L[y]-py(0)-y'0+4(pL[y]-y(0)=-\frac{1}{p+a}-\frac{5}{p^2}$
From here I don't really know how to simplify and also what is $y'(0)=0$
Define $Y(s)=\mathcal{L}_x\{y\}(s)$ to be the Laplace transform of $y$. Taking the Laplace transform of the DE gives, $$sY(s) - y(0) + 4Y(s) + \frac{5}{s}Y(s) = \frac{1}{s+1}\;.\tag{1}$$ After algebraic gymnastics we can obtain an expression for $Y$, $$Y(s)=\frac{s}{s^3+5s^2+9s+5}\;.\tag{2}$$ Taking inverse Laplace transform gives the not so pretty result (used Mathematica for this): $$y(x)=-\frac{e^{-x}}{2} - \left(\frac{1}{4} + \frac{i}{4}\right) e^{(-2 - i)x} \left((-2 - i) + (1 + 2 i) e^{2 i x}\right)\tag{3}$$ This may seem frightening at first, but if you are clever enough, then you will see that you can rewrite this in terms of sine and cosine using $\sin(x)=\frac{i}{2}(e^{-ix}-e^{ix})$ and $\cos(x)=\frac{1}{2}(e^{-ix}+e^{ix})$ to get, $$y(x)=\frac{1}{2} e^{-2x}\left(3\sin(x)+\cos(x)-e^x\right)\;.\tag{4}$$ Plugging this into the original DE verifies it is the solution. In hindsight, you can probably use partial fractions on equation $(2)$ to avoid my Mathematica route for finding the inverse Laplace transform.
Note taking your method by first evaluating the derivative of the differential equation to obtain the new second order equation $$y''+4y'+5y=-e^{-x},\quad y(0)=0,\quad y'(0)=1$$ where $y'(0)$ is found by plugging in $x=0$ into the original equation (see comments on post above) and then taking the Laplace transform of this second order DE ends up yielding the same answer.