There are several methods to discuss a second-order linear partial differential equation. Among them we mention the simplest one, the method of separation of variables, and the method of integral transforms, particularly the Laplace transform, which is in many cases most convenient [1].

On the other hand, after the method of separation of variables, we get the following general second-order linear ordinary differential equation:

${a}_{1}(x)\frac{{\mathrm{d}}^{2}}{\mathrm{d}{x}^{2}}y(x)+{a}_{2}(x)\frac{\mathrm{d}}{\mathrm{d}x}y(x)+{a}_{3}(x)y(x)=0$

on the interval

$a<x<b$, whose corresponding nonhomogeneous one is given by

${a}_{1}(x)\frac{{\mathrm{d}}^{2}}{\mathrm{d}{x}^{2}}y(x)+{a}_{2}(x)\frac{\mathrm{d}}{\mathrm{d}x}y(x)+{a}_{3}(x)y(x)=F(x),$

where

$F(x)$ is a forcing term. Assuming that

${a}_{1}(x)$ is a continuously differentiable positive function on this interval and that

${a}_{2}(x)$ and

${a}_{3}(x)$ are continuous functions, we can write the above ordinary differential equation as follows:

$\frac{\mathrm{d}}{\mathrm{d}x}[p(x)\frac{\mathrm{d}}{\mathrm{d}x}y(x)]+q(x)y(x)=f(x),$

(1)

the so-called self-adjoint form known also as an ordinary differential equation in the Sturm-Liouville form. In this equation, $p(x)$ and $q(x)$ are continuous functions that are related to the coefficients ${a}_{1}(x)$, ${a}_{2}(x)$ and ${a}_{3}(x)$. The nonhomogeneous term, $f(x)$, is also related to $F(x)$ [1].

The methodology of the Laplace integral transform is adequate to discuss the one-sided Green’s function^{a} because the initial conditions, in general, are given in terms of the own function and the first derivative. A simple question arises when we discuss the two-sided Green’s function associated with a problem involving boundary conditions, *i.e.*, is the Laplace transform methodology convenient to discuss this problem? The answer depends on the sort of problem we are studying, as we will see in the following sections.

On the other hand, the fractional harmonic oscillator was discussed in a series of papers by Narahari *et al.* [2–5] where they presented the dynamic of the fractional harmonic oscillator, including also the damping, and by Tofighi [6] who discusses the intrinsic damping.

In this paper we discuss Eq. (1) associated with an initial value problem and a boundary value problem. In both cases, we present two methodologies, the Laplace integral transform and the Green’s function methodology. After that we conclude which methodology is the most convenient one. We sum the paper up presenting the corresponding fractional case where we discuss the Green’s function associated with the fractional harmonic oscillator. Finally, we present our concluding remarks.