We solve the inhomogeneous simple harmonic oscillator equation and apply
this result to obtain a partial solution to the Hyers-Ulam stability problem for the simple harmonic oscillator equation.

1. Introduction

Let X be a normed space over a scalar field 𝕂 and let I be an open interval, where 𝕂 denotes either ℝ or ℂ. Assume that a0,a1,…,an:I→𝕂 are given continuous functions, g:I→X is a given continuous function, and y:I→X is an n times continuously differentiable function satisfying the inequality:‖an(t)y(n)(t)+an-1(t)y(n-1)(t)+⋯+a1(t)y′(t)+a0(t)y(t)+g(t)‖≤ε,

for all t∈I and for a given ɛ>0. If there exists an n times continuously differentiable function y0:I→X satisfyingan(t)y0(n)(t)+an-1(t)y0(n-1)(t)+⋯+a1(t)y0′(t)+a0(t)y0(t)+g(t)=0,

and ∥y(t)-y0(t)∥≤K(ɛ) for any t∈I, where K(ε) is an expression of ɛ with limɛ→0K(ε)=0, then we say that the above differential equation has the Hyers-Ulam stability. For more detailed definitions of the Hyers-Ulam stability, we refer the reader to [1–7].

Obloza seems to be the first author who has investigated the Hyers-Ulam stability of linear differential equations (see [8, 9]). Here, we will introduce a result of Alsina and Ger (see [10]). If a differentiable function f:I→ℝ satisfies the inequality |y′(t)-y(t)|≤ɛ, where I is an open subinterval of ℝ, then there exists a solution f0:I→ℝ of the differential equation y′(t)=y(t) such that |f(t)-f0(t)|≤3ε for any t∈I. This result has been generalized by Takahasi et al. Indeed, it was proved in [11] that the Hyers-Ulam stability holds true for the Banach space valued differential equation y′(t)=λy(t) (see also [12, 13]).

Moreover, Miura et al. [14] investigated the Hyers-Ulam stability of nth order linear differential equation with complex coefficients. They [15] also proved the Hyers-Ulam stability of linear differential equations of first order, y′(t)+g(t)y(t)=0, where g(t) is a continuous function.

Jung also proved the Hyers-Ulam stability of various linear differential equations of first order [16–19]. Moreover, he could successfully apply the power series method to the study of the Hyers-Ulam stability of Legendre differential equation (see [20]). Subsequently, the authors [21] investigated the Hyers-Ulam stability problem for Bessel differential equation by applying the same method.

In Section 2 of this paper, by using the ideas from [20, 21], we investigate the general solution of the inhomogeneous simple harmonic oscillator equation of the form:y′′(x)+ω2y(x)=∑m=0∞amxm,

where ω is a given positive number. Section 3 will be devoted to a partial solution of the Hyers-Ulam stability problem for the simple harmonic oscillator equation (2.1) in a subclass of analytic functions.

A function is called a simple harmonic oscillator function if it satisfies the simple harmonic oscillator equation:y′′(x)+ω2y(x)=0.

The simple harmonic oscillator equation plays a great role in physics and engineering. In particular, it describes quantum particles confined in potential wells in quantum mechanics and the Hyers-Ulam stability of solutions of this equation is very important.

In this section, we define c0=c1=0 and for m≥1,c2m=∑i=0m-1(-1)m-i-1a2i(2i)!(2m)!ω2m-2i-2,c2m+1=∑i=0m-1(-1)m-i-1a2i+1(2i+1)!(2m+1)!ω2m-2i-2,
where we refer to (1.3) for the am. We can easily check that these cm satisfy the followingam=(m+2)(m+1)cm+2+ω2cm,
for any m∈{0,1,2,…}.

Lemma 2.1.

(a) If the power series ∑m=0∞amxm converges for all x∈(-ρ,ρ) with ρ>1, then the power series ∑m=2∞cmxm with cm given in (2.2) satisfies the inequality |∑m=2∞cmxm|≤C1/(1-|x|) for some positive constant C1 and for any x∈(-1,1).

(b) If the power series ∑m=0∞amxm converges for all x∈(-ρ,ρ) with ρ≤1, then for any positive ρ0<ρ, the power series ∑m=2∞cmxm with cm given in (2.2) satisfies the inequality |∑m=2∞cmxm|≤C2 for any x∈[-ρ0,ρ0] and for some positive constant C2 which depends on ρ0. Since ρ0 is arbitrarily close to ρ, this means that ∑m=2∞cmxm is convergent for all x∈(-ρ,ρ).

Proof.

(a) Since the power series ∑m=0∞amxm is absolutely convergent on its interval of convergence, with x=1, ∑m=0∞am converges absolutely, that is, ∑m=0∞|am|<M1 by some number M1.

We know that
|a2i|(2i)!(2m)!ω2m-2i-2=|a2i|2m(2m-1)ω(2m-2)⋯ω(2i+1)≤{|a2i|2m(2m-1)(for0<ω≤1)|a2i|2m(2m-1)ω[ω](forω>1)≤|a2i|2m(2m-1)max{1,ωω},
since for ω>1, each factor of the form ω/ℓ in the summand is either less than 1 if ℓ>[ω], or is bigger than or equal to 1 if ℓ≤[ω], where [ω] denotes the largest integer less than or equal to ω. Thus, we obtain
|c2m|≤∑i=0m-1|a2i|(2i)!(2m)!ω2m-2i-2≤∑i=0m-1|a2i|2m(2m-1)max{1,ωω}≤max{1,ωω}∑i=0∞|ai|≤max{M1,M1ωω}≡C1.

Similarly, we have
|a2i+1|(2i+1)!(2m+1)!ω2m-2i-2≤|a2i+1|2m(2m-1)max{1,ωω},
and |c2m+1|≤C1 for all m≥1.

Therefore, we get
|∑m=2∞cmxm|≤∑m=2∞|cm||xm|≤C1∑m=2∞|xm|≤C11-|x|,
for every x∈(-1,1).

(b) The power series ∑m=0∞amxm is absolutely convergent on its interval of convergence, and, therefore, for any given ρ0<ρ, the series ∑m=0∞|amxm| is convergent on [-ρ0,ρ0] and
∑m=0∞|am||x|m≤∑m=0∞|am|ρ0m≡M2
for any x∈[-ρ0,ρ0]. Now, it follows from (2.2), (2.4), (2.6), and (2.8) that
|∑m=2∞cmxm|≤∑m=1∞|c2m|ρ02m+∑m=1∞|c2m+1|ρ02m+1≤∑m=1∞ρ02m∑i=0m-1|a2i|(2i)!(2m)!ω2m-2i-2+∑m=1∞ρ02m+1∑i=0m-1|a2i+1|(2i+1)!(2m+1)!ω2m-2i-2≤∑m=1∞∑i=0m-1|a2i|ρ02imax{1,ωω}2m(2m-1)+∑m=1∞∑i=0m-1|a2i+1|ρ02i+1max{1,ωω}2m(2m-1)≤∑m=1∞M2max{1,ωω}2m(2m-1)+∑m=1∞M2max{1,ωω}2m(2m-1)≤max{M2,M2ωω}∑m=1∞1m(2m-1)≤32max{M2,M2ωω}≡C2,
for any x∈[-ρ0,ρ0].

Lemma 2.2.

Suppose that the power series ∑m=0∞amxm converges for all x∈(-ρ,ρ) with some positive ρ. Let ρ1=min{1,ρ}. Then, the power series ∑m=2∞cmxm with cm given in (2.2) is convergent for all x∈(-ρ1,ρ1). Further, for any positive ρ0<ρ1, |∑m=2∞cmxm|≤C for any x∈[-ρ0,ρ0] and for some positive constant C which depends on ρ0.

Proof.

The first statement follows from the latter statement. Therefore, let us prove the latter statement. If ρ≤1, then ρ1=ρ. By Lemma 2.1(b), for any positive ρ0<ρ=ρ1, |∑m=2∞cmxm|≤C2 for each x∈[-ρ0,ρ0] and for some positive constant C2 which depends on ρ0.

If ρ>1, then by Lemma 2.1(a), for any positive ρ0<1=ρ1, we get
|∑m=2∞cmxm|≤C11-|x|≤C11-ρ0≤max{C11-ρ0,C2}≡C,
for all x∈[-ρ0,ρ0] and for some positive constant C which depends on ρ0.

Using these definitions and the lemmas above, we will now show that ∑m=2∞cmxm is a particular solution of the inhomogeneous simple harmonic oscillator equation (1.3).

Theorem 2.3.

Assume that ω is a given positive number and the radius of convergence of the power series ∑m=0∞amxm is ρ>0. Let ρ1=min{1,ρ}. Then, every solution y:(-ρ1,ρ1)→ℂ of the simple harmonic oscillator equation (1.3) can be expressed by
y(x)=yh(x)+∑m=2∞cmxm,where yh(x) is a simple harmonic oscillator function and cm are given by (2.2).

Proof.

We show that ∑m=2∞cmxm satisfies (1.3). By Lemma 2.2, the power series ∑m=2∞cmxm is convergent for each x∈(-ρ1,ρ1).

Substituting ∑m=2∞cmxm for y(x) in (1.3) and collecting like powers together, it follows from (2.2) and (2.3) that (with c0=c1=0)
y′′(x)+ω2y(x)=∑m=0∞[(m+2)(m+1)cm+2+ω2cm]xm=∑m=0∞amxm,
for all x∈(-ρ1,ρ1).

Therefore, every solution y:(-ρ1,ρ1)→ℂ of the inhomogeneous simple harmonic oscillator equation (1.3) can be expressed by
y(x)=yh(x)+∑m=2∞cmxm,where yh(x) is a simple harmonic oscillator function.

3. Partial Solution to Hyers-Ulam Stability Problem

In this section, we will investigate a property of the simple harmonic oscillator equation (2.1) concerning the Hyers-Ulam stability problem. That is, we will try to answer the question whether there exists a simple harmonic oscillator function near any approximate simple harmonic oscillator function.

Theorem 3.1.

Let y:(-ρ,ρ)→ℂ be a given analytic function which can be represented by a power series ∑m=0∞bmxm whose radius of convergence is at least ρ>0. Suppose there exists a constant ɛ>0 such that
|y′′(x)+ω2y(x)|≤ɛ,
for all x∈(-ρ,ρ) and for some positive number ω. Let ρ1=min{1,ρ}. Define am=(m+2)(m+1)bm+2+ω2bm for all m∈{0,1,2,…} and suppose further that
∑m=0∞|amxm|≤K|∑m=0∞amxm|,
for all x∈(-ρ,ρ) and for some constant K. Then, there exists a simple harmonic oscillator function yh:(-ρ1,ρ1)→ℂ such that
|y(x)-yh(x)|≤Cε,
for all x∈[-ρ0,ρ0], where ρ0<ρ1 is any positive number and C is some constant which depends on ρ0.

Proof.

We assumed that y(x) can be represented by a power series and
y′′(x)+ω2y(x)=∑m=0∞amxm
also satisfies
∑m=0∞|amxm|≤K|∑m=0∞amxm|≤Kɛ,
for all x∈(-ρ,ρ) from (3.1).

According to Theorem 2.3, y(x) can be written as yh(x)+∑m=2∞cmxm for all x∈(-ρ1,ρ1), where yh is some simple harmonic oscillator function and cm are given by (2.2). Then by Lemmas 2.1 and 2.2 and their proofs (replace M1 and M2 with Kɛ in Lemma 2.1),
|y(x)-yh(x)|=|∑m=2∞cmxm|≤Cɛ
for all x∈[-ρ0,ρ0], where ρ0<ρ1 is any positive number and C is some constant which depends on ρ0.

Actually from the proof of Lemma 2.1, with both M1 and M2 replaced by Kɛ, we find C1=max{Kɛωω,Kɛ} and C2=3/2C1. Further from the proof of Lemma 2.2, we have
Cɛ=max{C11-ρ0,C2}=max{Kɛ1-ρ0ωω,Kɛ1-ρ0,32Kɛωω,32Kɛ},
we find
C=max{K1-ρ0ωω,K1-ρ0,32Kωω,32K},which completes the proof of our theorem.

4. Example

In this section, we show that there certainly exist functions y(x) which satisfy all the conditions given in Theorem 3.1. We introduce an example related to the simple harmonic oscillator equation (1.3) for ω=1/4.

Let yh(x) be a simple harmonic oscillator function for ω=1/4 and let y:(-1,1)→ℝ be an analytic function given byy(x)=yh(x)+ɛ∑m=0∞x2m4m+1,
where ɛ is a positive constant. (We can easily show that the radius of convergence of the power series ∑m=0∞x2m/4m+1 is 2). Then, we havey′′(x)+116y(x)=∑m=0∞amxm,

Furthermore, we get|y″(x)+116y(x)|≤∑m=0∞8ɛ(m+1)(2m+1)4m+3|x|2m+∑m=0∞ɛ4m+3|x|2m≤∑m=0∞15ɛ32|x|2m2m+∑m=0∞ɛ43|x|2m4m≤∑m=0∞15ɛ3212m+∑m=0∞ɛ4314m<ɛ,and it follows from (4.1) that|y(x)-yh(x)|=|ɛ∑m=0∞x2m4m+1|≤ɛ4∑m=0∞14m=Cɛ,

for all x∈(-1,1), where we set C=1/3.

CzerwikS.HyersD. H.On the stability of the linear functional equationHyersD. H.IsacG.RassiasT. M.HyersD. H.RassiasT. M.Approximate homomorphismsJungS.-M.RassiasT. M.On the stability of the linear mapping in Banach spacesUlamS. M.ObłozaM.Hyers stability of the linear differential equationObłozaM.Connections between Hyers and Lyapunov stability of the ordinary differential equationsAlsinaC.GerR.On some inequalities and stability results related to the exponential functionTakahasiS.-E.MiuraT.MiyajimaS.On the Hyers-Ulam stability of the Banach space-valued differential equation y′=λyMiuraT.On the Hyers-Ulam stability of a differentiable mapMiuraT.JungS.-M.TakahasiS.-E.Hyers-Ulam-Rassias stability of the Banach space valued linear differential equations y′=λyMiuraT.MiyajimaS.TakahasiS.-E.Hyers-Ulam stability of linear differential operator with constant coefficientsMiuraT.MiyajimaS.TakahasiS.-E.A characterization of Hyers-Ulam stability of first order linear differential operatorsJungS.-M.Hyers-Ulam stability of linear differential equations of first orderJungS.-M.Hyers-Ulam stability of linear differential equations of first order. IIJungS.-M.Hyers-Ulam stability of linear differential equations of first order. IIIJungS.-M.Hyers-Ulam stability of a system of first order linear differential equations with constant coefficientsJungS.-M.Legendre's differential equation and its Hyers-Ulam stabilityKimB.JungS.-M.Bessel's differential equation and its Hyers-Ulam stability