Second Linear ODE Confused on how I can approach this ODE, and I just need some help on figuring out what to do
$y''-4y'-21=5e ^{-t}$ with initial conditions $y(0)=0$ and  $y'(0)=4$
After Laplace transforming, I got:
$(\frac{(5)}{(s+1)}{+ 4+\frac{(21)}{(s+1)}}) /( s^2-4s) $
And now I am stuck on what to do here
 A: I don't know about Laplace transformation but I would solve it a little differently. Look at it the following way:
$$y''-4y' = 5e^{-t} + 21$$
Now solving the homogenous equation $y''-4y'=0$ is not too complicated. It has the characteristic polynomial $t^2-4t$ with zeros at $t=0$ and $t=4$. Therefore the solution to the homogenous part equation is $c_1 e^{4t} + c_2e^{0t} = c_1e^{4t} + c_2$.
Now we need to find a special solution to the inhomogenous problem. To be honest I don't know how to do that systematically, but a little "good guessing" can get us there: How do we get the $+21$? Let us put a $\frac{21}{4} t$ in the solution, so that the $4y'$ produces our $21$. How do we get $5e^{-t}$? Because of the fact that the second derivative of $e^{-t}$ is $e^{-t}$ and the first derivative is $-e^{-t}$ we can find the special solution
$$u_{sp} = e^{-t} - \frac{21}{4} t$$
Then the whole solution to this equation is:
$$u= c_1e^{4t}+c_2 + e^{-t} - \frac{21}{4} t$$
Now we try to find $c_1, c_2$ via the initial conditions. Note $0=u(0) = c_1 + c_2+1$ and $4=u'(0) = 4c_1 -1- \frac{21}{4}$ Solving this we get $c_1 = \frac{41}{16}$ and $c_2 = \frac{-57}{16}$.
If anybody knows how we could have gotten the special solution in a more systematic way feel free to let me know. If the Laplace transform method would be easier than my approach to solving linear ODEs with constant coefficients I am also happy if you let me know because I don't know how to do Laplace transformation.
A: Because you didn't write down your process i'll solve the whole thing here.
Let $y''-4y'-21=5e^{-t}:=f(y(t))=f(y)$

*

*Take the Laplace Transform of each term.

*Plug in initial value(s) of $y^{(i)}(t_0)$ into the equation.

*Solve for $Y(s)$.

*Take the Inverse Laplace Transform.



*

*$$\mathscr{L}\{f(y)\}=\mathscr{L}\{y''-4y'-21=5e^{-t}\}=[s^2Y(s)-sy(0)-y'(0)]-4[sY(s)-y(0)]-\dfrac{21}{s}=5\dfrac{1}{s+1}$$
You can only arrive to $\frac{1}{s-a}$ if you have a $e^{at}$ function.


*$$\mathscr{L}\{f(y,y(0),y'(0))\}=[s^2Y(s)-0-4]-4[sY(s)-0]-\dfrac{21}{s}=\dfrac{5}{s+1}$$
$$s^2Y(s)-4-4sY(s)-\dfrac{21}{s}=\dfrac{5}{s+1}$$


*$$s^2Y(s)-4sY(s)=\dfrac{5}{s+1}+\dfrac{21}{s}+4$$
$$Y(s)(s^2-4s)=\dfrac{5}{s+1}+\dfrac{21}{s}+4$$
$$Y(s)=\dfrac{5}{(s+1)(s^2-4s)}+\dfrac{21}{s(s^2-4s)}+\dfrac{4}{(s^2-4s)}$$


*$$Y(s)=\dfrac{5}{s(s+1)(s-4)}+\dfrac{21}{s^2(s-4)}+\dfrac{4}{s(s-4)}$$
$$\mathscr{L}^{-1}\{Y(s)\}=y(t)=-\dfrac{5}{4}e^{0t} + e^{-t} + \dfrac{1}{4}e^{4t} - e^{0t} + e^{4t} -\dfrac{21}{16}-\dfrac{21}{4}t+\dfrac{21}{16}e^{4t}$$
$$y(t)=-\dfrac{5}{4} + e^{-t} + \dfrac{1}{4}e^{4t} - 1 + e^{4t} -\dfrac{21}{16}-\dfrac{21}{4}t+\dfrac{21}{16}e^{4t}$$
$$y(t)=-\dfrac{20}{16} + e^{-t} + \dfrac{4}{16}e^{4t} - \dfrac{16}{16} + \dfrac{16}{16}e^{4t} -\dfrac{21}{16}-\dfrac{21}{4}t+\dfrac{21}{16}e^{4t}$$
$$\boxed{y(t)=\dfrac{41}{16}e^{4t}-\dfrac{57}{16}+e^{-t}-\dfrac{21}{4}t}$$
Which checks out by @Lukas' answer.
A: @LordCommander did it the way that was asked, but it is actually a really simple variable substitution problem.  Original problem:
$$ y'' - 4y' = 5e^{-t} + 21 $$
Substitute $w = y'$:
$$ w' - 4w = 5e^{-t} + 21 \\ 
dw - 4w\, dt = 5e^{-t}\,dt + 21\,dt $$
Multiply by an integrating factor of $e^{-4t}$:
$$ e^{-4t}\, dw - 4 e^{-4t}\, dt = 5e^{-5t}\, dt + 21e^{-4t}\, dt \\ 
\int e^{-4t}\, dw - 4 e^{-4t}\, dt = \int 5e^{-5t}\, dt + 21e^{-4t}\, dt 
 \\
w\,e^{-4t} = e^{-5t} - (1/4) 21 e^{-4t} + C \\
w = e^{-t} - (21/4) + Ce^4t $$
Now we can substitute $y' = w$ back in and solve again.
$$ 
y' = e^{-t} - (21/4) + Ce^4t \\
dy = e^{-t}\,dt - (21/4)\,dt + Ce^4t\,dt \\
\int dy = \int e^{-t}\,dt - (21/4)\,dt + Ce^4t\,dt \\
y = e^{-t} - (21/4)t + Ce^4t + D
$$
