What are the conditions under which the formula I've given below for an inhomogeneous reducible 2nd‐order ODE is valid?
I have the second‐order inhomogeneous ODE $$ y''(t) \;+\; h(t)\,y'(t)\;+\;q(t)\,y(t)\;=\;f(t), $$ together with one known solution $\phi_{1}(t)\\$ of its corresponding homogeneous equation $$ \phi_{1}''(t) \;+\; h(t)\,\phi_{1}'(t)\;+\; q(t)\,\phi_{1}(t)\;=\;0. $$ From this, I derived the following “general” solution by just doubly integrating the reduced inhomogeneous ODE: $$ y(t) \;=\;\phi_{1}(t)\;\int^{\,t} \exp\!\biggl(-\int^{\,\sigma}\Bigl[\tfrac{2\,\phi_{1}'(s)}{\phi_{1}(s)} \;+\;h(s)\Bigr]\,ds\biggr) \,\Biggl(\,\int^{\,\sigma} \frac{f(\theta)}{\phi_{1}(\theta)}\,\exp\!\Bigl(\,\int^{\,\theta}\bigl[\tfrac{2\,\phi_{1}'(u)}{\phi_{1}(u)} + h(u)\bigr]\,du\Bigr)d\theta\Biggr)\,d\sigma. $$
When I apply this formula to the specific example $y''(t)\;-\;\frac{t+2}{t}\,y'(t)\;+\;\frac{t+2}{t^{2}}\,y(t)\;=\;t,\quad t>0,\\$
where a known homogeneous solution is $\phi_{1}(t)=t\\$, I obtained the general solution (matching the solution from the standard method of reduction of order + variation of parameters).
However, my professor said that this integral formula is not universally valid and that it works here only because certain “required conditions” happen to be satisfied (I'm assuming in addition to the usual conditions of the functions being well behaved(continuous, integrable, etc.) that we use for the standard method as well)
Question: What exactly are the conditions under which the above double‐integral expression yields the full general solution? and why does one usually revert to the “standard” method of reduction of order followed by variation of parameters?