Verifying solution second order differential equation I had a question of $$y''-6y'+25y=5e^{3x}(\cos5x)$$ I just wanted to verify if I'm doing it write first off I set up a Aux equation and got a complementary function of $$Y_c=e^{3x}(A\cos4x+ B\sin4x)$$ I then set up a particular solution of $$Y_p=e^{3x}(\cos5x+\sin5x)$$ I then wrote out the general solution as $y(x)=Y_c+Y_p$  $$y(x)=e^{3x}(A\cos4x+ B\sin4x)+e^{3x}(\cos5x+\sin5x)$$ I just wanted to know if that's correct and if it is correct, how to check so in the future by myself, I assume you'd have to differentiate twice and sub back in but that seems tedious. I have some initial conditions as well of $y(0)=-1$
Thanks for the help
 A: To solve:
$$y''(x)-6y'(x)+25y(x)=5\cos\left(5x\right)e^{3x}$$
Use Laplace transform:
$$\mathcal{L}_x\left[y''(x)\right]_{(\text{s})}-6\mathcal{L}_x\left[y'(x)\right]_{(\text{s})}+25\mathcal{L}_x\left[y(x)\right]_{(\text{s})}=\mathcal{L}_x\left[5\cos\left(5x\right)e^{3x}\right]_{(\text{s})}$$
Use:


*

*$$\mathcal{L}_x\left[y''(x)\right]_{(\text{s})}=\text{s}^2\text{Y}(\text{s})-\text{s}y(0)-y'(0)$$

*$$\mathcal{L}_x\left[y'(x)\right]_{(\text{s})}=\text{s}\text{Y}(\text{s})-y(0)$$

*$$\mathcal{L}_x\left[y(x)\right]_{(\text{s})}=\text{Y}(\text{s})$$

*$$\mathcal{L}_x\left[5\cos\left(5x\right)e^{3x}\right]_{(\text{s})}=\frac{5(\text{s}-3)}{25+(\text{s}-3)^2}$$


Now we that $y(0)=-1$ so we get:
$$\text{s}^2\text{Y}(\text{s})+\text{s}+1-6\left(\text{s}\text{Y}(\text{s})+1\right)+25\text{Y}(\text{s})=\frac{5(\text{s}-3)}{25+(\text{s}-3)^2}$$
Solving $\text{Y}(s)$:
$$\text{Y}(\text{s})=\frac{155-\text{s}\left(59+\text{s}(\text{s}-11)\right)}{\left(25+\text{s}(\text{s}-6)\right)\left(34+\text{s}(\text{s}-6)\right)}$$
With inverse Laplace transform, we find:
$$y(x)=-\frac{e^{3x}\left(8\cos(4x)+10\cos(5x)-9\sin(4x)\right)}{18}$$
