Figures
Abstract
Context: Many models based on S-shaped functions demonstrate their advantages in non-homogeneous Poisson process software reliability modeling. However, three well-known types have been used without deep mathematical evaluation. Furthermore, some other promising S-shaped functions should be aimed at.
Objectives: (1) Transform the sine function to change the domain and co-domain without losing the S-shaped pattern, and (2) Evaluate four types of S-shaped functions mathematically, including three well-known types and this newly considered type of transformation form of the trigonometric function.
Methods: The transformation is taken by a four-step process, including horizontal and vertical shift, horizontal and vertical scale, to maintain the S-shaped form. The mathematical evaluation is performed using numerical analysis techniques in four aspects of function: special cases, domain, range, and limitations.
Results: The first contribution is a deep mathematical appreciation of three well-known S-shaped functions. The second is the mathematical transformation of the trigonometric function to meet the real assumption. The last are the advantages and the applicability of this transformation in software reliability modeling.
Conclusion: Besides three well-used S-shaped functions, the transformation of the trigonometric function has a new advantage. Most importantly, there is a possibility of using the trigonometric function to introduce a new software reliability model.
Citation: Vy D-N, Nguyen V-T, Huynh Q-T, Phung T-N, Nguyen H-C (2025) Trigonometric function transformation and its application in software reliability modeling. PLoS One 20(12): e0339286. https://doi.org/10.1371/journal.pone.0339286
Editor: Mallikarjuna Reddy Kesama, Purdue University, UNITED STATES OF AMERICA
Received: October 2, 2025; Accepted: December 3, 2025; Published: December 31, 2025
Copyright: © 2025 Vy et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All relevant data are within the paper.
Funding: This research is supported by Hung Vuong University under grant number HV33.2024. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
1 Introduction
Over seven decades of affecting all the areas of human life [1], the number of developed software has exceeded 10 million. Software engineering [2], including methodology, programming language, framework, and tool, becomes increasingly complex to meet real-life requirements. Those complicated problems led to the insistence on maintaining the software quality. In the scope of this paper, the regarded topic is non-homogeneous Poisson process (NHPP) software reliability modeling (SRM), that is, the application of probability technique in evaluating one of software quality characteristics [3,4].
Among models belonging to the NHPP SRMs group [5], the S-shaped curves have been widely studied. This term S-shaped is based on the pattern of the letter S, the nineteenth letter of the Latin alphabet. The S-shaped curve increases continuously over time when the growth rate is time-dependent. Geometrically, an S-shaped curve is a merging of convex and concave parts. Some studied S-shaped functions [6–13] verify the usability of this shape. However, previous publications have not thoroughly reviewed those functions analytically. In addition, some well-known trigonometric functions contain some parts that are S-shaped. Notwithstanding, the domain and codomain of trigonometric functions are bounded, so it does not reflect real-life quantities. So this paper (1) deeply analyzes some used S-shaped functions to summarize the advantages and the flaws, and subsequently (2) discusses a new type of S-shaped function, the transformation of the trigonometric function.
The rest of this article is organized into the following sections. The second section discusses the literature on the S-shaped functions in NHPP SRM. The next section introduces the transformation of the trigonometric function. The third section analyses those four S-shaped functions mathematically. Section 3 evaluates the applicability of the transformation in NHPP SRM. The last section summarizes all works and proposes some promising works to extend.
2 Software reliability modelling
2.1 NHPP SRM
The software testing timeline is modeled using the Poisson process. The terminology non-homogeneous is reflected by the parameter of the Poisson distribution, which is a time-dependent function. By time t, the software system has a(t) faults while testers detected and removed m(t) of them. So there are still a(t)–m(t) faults. Consider a short period from t to t +
, the number of detected faults is m(t) and
+
, respectively. Therefore, this period detects
faults. As
is a short time, assuming that the number of remaining faults, i.e., a(t)–m(t), and the fault detection rate, i.e., b(t), are constant. With notation of
which
, there is a relationship between those quantities:
Let , the differential equation is:
The general solution [10] of Eq (2) is given by:
where
In most cases, researchers focus on and t0 = 0, so (3) can be shortened to:
where
The main obstacle to proposing NHPP SRM is the integral calculation in Eq (5) when specific functions a(t) and b(t) are applied.
2.2 S-shaped functions in SRM
The term S-shaped reflects the growth of the function and can be partitioned into 5 phases:
- Phase 1. Firstly, the function increases from a lower bound with a small growth rate.
- Phase 2. Next, it increases the growth rate; therefore, the function increases more quickly.
- Phase 3. The function goes through inflection point, which is the point that the first derivation of the function changes from positive to negative quantities.
- Phase 4. The growth rate decreases, so the function increases more slowly.
- Phase 5. Lastly, the function converges to the upper bound.
Generally, the 2nd and 4th phases are the main parts of the S-shaped function, which are the convex and concave functions, respectively. There are some types of S-shaped functions in NHPP SRM that have been used as fault detection rates. First form [6,7] is Eq (7):
Substitute into Eq (5):
Inflection form [8–11] is in Eq (11):
Substitute into Eq (5):
And extended inflection form [12–14] is in Eq (11):
Substitute into Eq (5):
There are some studied models which use S-shaped functions in Table 1.
3 Trigonometric function transformation
3.1 Trigonometric function
Originally, trigonometric functions were the ratios between angles of the right triangle. The first analysis consideration [15] of a trigonometric function is in 1669 by the derivation of the power series for the sine function of Isaac Newton. There are three famous trigonometric functions sine , cosine
, and tangent
. Their reciprocals are the cosecant, the secant, and the cotangent, respectively. Each of those six functions has a corresponding inverse function (e.g.
or
or
) and hyperbolic functions (
,
,
,
,
, and
). The angle, i.e., the unit of the input of a trigonometric function, can be measured by degrees in geometry and radians in calculus, in which the value milestones are 360∘ and
and their multiples, respectively. Trigonometric functions are periodic functions which period is
or
, i.e.
+
+
and
+
+
. The periodical of
is illustrated at the top of Fig 1.
The rest of this manuscript studies the most well-known trigonometric function . As shown at the bottom of Fig 1, a part of the
function in
has an S-shaped pattern.
increase in all of
while growth rate in
and
are positive and negative, respectively.
3.2 Trigonometric function transformation
has an S-shaped form, but the lower bound, upper bound, and growth rate are fixed [16]. In the period
of length
, the range of codomain is 2 when
and
and the inflection point is
. To apply this trigonometric function, we need to transform it. Aspects that need to be transformed include (1) the domain range in which
remains an S-shaped pattern, (2) the codomain as a couple of (min, max), and (3) the position of the inflection point as a moment when
changes its behavior. As illustrated in Fig 2, those aspects can be met by the mathematical transformation of
, which includes 4 steps:
- Step 1. From
, it is scaled vertically to change the range of codomain, i.e.,
:
(13)
- Step 2. From Eq (13), it is scaled horizontally to change the length of the period in which
remains in an S-shaped pattern:
(14)
- Step 3. From Eq (14), it is shifted horizontally to change the bounds of the function domain:
(15)
- Step 4. From Eq (15), it is shifted vertically to change the bounds of the function codomain:
(16)
Table 2 shows the function b4(t) when some of variables vanishes. Because of their appearance in multiplication, b and vanish when they take a value of 1. On the other hand,
and k appear in addition, so they vanish when taking a value of 0. For example, when
and
, b4(t) becomes
.
3.3 Applying trigonometric function transformation in NHPP SRM
Substitute Eq (16) into (6), we have:
Eq (5) becomes:
To get a solution of Eq (18), we should choose one of the following ways:
- A suitable function
.
- Considering the vanishment of some parameters of set
.
or apply both on one single use. Substitute each case of b4(t) from Table 2 into Eq (18), m4(t) are in Table 2.
4 Numerical analysis
Let be a sign function of x.
is an AND logic operator.
4.1 First form
Let consider:
If b = 0, b1(t) becomes a constant function of 0. If , we have:
The domain of b1(t), , and
are:
The range of b1(t), , and
are:
Fig 3 illustrates b1(t) in some cases of parameters: green line in case of b = 1.5, light blue line in case of b = 0.5, red line in case of b = 1.0, and orange line in case of b = −1.0. Pure lines are in rational cases and dashed lines in others.
Limitations of b1(t) and are in Table 3. So variation table of b1(t) when b > 0 and b < 0 are in Table 4 and Table 5, respectively. We can see that this form is not fully S-shaped because it only contains the two last phases of the S-shaped curve as described in sub-section 2.2. b1(t) does not have an early, quick growth period and an inflection point. In
, it grows slowlier because the
is negative, then
is decreased. Furthermore,
reflects the convergence of this function to an upper bound as illustrated in Fig 3.
4.2 Second form
Let consider:
We have some special cases:
- If
, b2(t) is indeterminate.
- If b = 0 and
, b2(t) becomes constant function of 0.
- If
, b2(t) becomes constant function of b.
In other cases in next subsub-sections when and
, we have:
The domain of b2(t), , and
are:
The range of b2(t), , and
are:
, then inflection point of b2(t) is
when
. Limitations of b2(t),
, and
are in Table 6.
So variation table of b2(t) are in Tables 7, 8, 9, and 10. Fig 4 illustrates b2(t) in some cases of parameters: blue line in case of , red line in case of
, green line in case of
, orange line in case of
, and purple line in case of
. Pure lines are in rational cases and dashed lines in others. The triangle with the corresponding filled color is the inflection point of each curve.
4.3 Third form
Let consider:
We have some special cases:
- If
, b2(t) is indeterminate.
- If b = 0 and
, b3(t) becomes constant function of 0.
- If
, b3(t) becomes constant function of b.
- If k = 1, b3(t) becomes constant function of b.
- If k = 0, b3(t) becomes b2(t).
In other cases in next subsub-sections when ,
, and
, we have:
The domain of b3(t), , and
are:
The range of b3(t), , and
are:
So , then inflection point of b3(t) is
when
. Table 11 are limitations of b3(t),
, and
. So variation table of b3(t) when b > 0,
, and k>1 are in Tables 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, and 25.
Figs 5, 6, and 7 illustrate b3(t) in cases of parameters. Fig 5 illustrates when b > 0 and which are green line in case of
, blue line in case of
, red line in case of
, and orange line in case of
.
Fig 6 corresponds with b < 0 and . The parameters are similar to Fig 5 except b is negative: green line in case of
, blue line in case of
, red line in case of
, and orange line in case of
.
The last illustration of this third form is Fig 7 when : green line in case of
, blue line in case of
, red line in case of
, orange line in case of
, purple line in case of
, and black line in case of
. The triangle with the corresponding filled color is the inflection point of each curve. Pure lines are in rational cases and dashed lines in others.
4.4 Fourth form
Let consider:
So
And
Special cases of b4(t) are listed in Table 2. Because is a periodic function, it is necessary to evaluate the rational domain and the codomain of this function. Its period is
, so
is considered initially. After it is scaled and shifted horizontally, the domain becomes
. After
is scaled and shifted vertically, the codomain becomes
.
and
are continuous function, so limitations of b4(t),
, and
at any point are those values at this point. Let consider:
Therefore, without loss of generality, let’s focus on the case of instead of cases of
,
, and
. From those analysis, b4(t) will be studied in
when
. Let t* is the solution of
in
, i.e.
. As mentioned before,
, so the range of b4(t),
, and
are:
So , then inflection points of b4(t) are
,
,
. The variation table of b4(t) are in Tables 26, 27, and 28.
Fig 8 illustrates b4(t) in some cases of parameters: red line in case of , blue line in case of
, green line in case of
, and orange line in case of
. The triangle with the corresponding filled color is the inflection point of each curve.
4.5 Rational range of four S-shaped functions
Table 29 summarizes the properties of four S-shaped functions. The first column is the following aspects, which are divided into four groups by thicker lines. 172 Special cases of parameters of a function take on certain values, and the function could become a simpler form. For example, when a = 0, quadratic polynomial + 2x + 3 becomes linear polynomial f1(x) = 2x + 3. 173 Domain is the set of legal inputs of function.
The next aspect to consider is whether the function has an S-shaped pattern or not. As mentioned in Sect 2.2, the 2nd phase, as convex, and the 4th phase, as concave, of the function are often focused on. So 174 Part S-shaped is the case where the function has a later part of an S-shaped curve. It is later instead of the earlier part because this part satisfies the real condition "the ability of the tester has a limitation, so it converges to a specific value after a long time". And then, 175 Fully S-shaped is when the function has the whole form of S-shaped.
Certainly, the fault detection rate, i.e., the ratio of detected errors to total system errors, has to reach a positive value. So it should analyze whether the S-shaped part of the function is positive or not. 176 Positive part S-shaped is in case S-shaped part of 174 is positive. 177 Positive 2 phases S-shaped relates to the newly perspective. As mentioned in Sect 2.2, the 2nd phase of convex and 4th phase of concave are the main parts of an S-shaped curve, so 177 evaluates the positive part of the curve that contains both two phases or just one of them. Similar to 176, 178 Positive fully S-shaped is in case the S-shaped curve of 175 is positive.
The next variable is time t, which should be analyzed in the positive range. 179 Positive part S-shaped when , 180 Positive 2 phases part S-shaped when
, and 181 Positive fully S-shaped when
are corresponded cases of 176, 177, and 178 when
, respectively.
This tabular summary shows the advantages of the transformation of the trigonometric function over the previous S-shaped functions. The first, transformation of a trigonometric function, is the only function that can reach a fully S-shaped form when , which is presented in the last row. The second, this fourth S-shaped form b4(t) can reach all cases from 174 to 180 more easily than other forms. Furthermore, the conditions for achieving them are similar.
4.6 Numerical illustration
Fig 9 illustrates the form of 4 S-shaped functions b1(t) in Eq (7), b2(t) in Eq (9), b3(t) in Eq (11), and b4(t) in Eq (16). The red line is b1(t) when b = 1. The blue line is b2(t) when b = 2 and . With b3(t), the green line is b = 2,
, and k = 0.2 while orange line is b = 2,
, and k = 1.5. The purple line is b4(t) when b = 1.5,
,
, and k = 0.5.
5 Conclusions and future works
This article evaluates the S-shaped characteristic of the most famous trigonometric function . The transformation of this function is studied to verify that it will be suitable for real conditions. The transformation methods include scaling vertically, scaling horizontally, shifting horizontally, and shifting vertically. The transformed function has been proven to have certain advantages and is suitable for NHPP SRM. The remaining work of SRM introduction is proposing a total fault function a(t) to substitute into Eq (18).
Some long-used S-shaped functions in Eqs (7), (9), and (11) and newly considered function in Eq (16) are analyzed mathematically. The considered characteristics are the domain, codomain, pattern, and the increment process of functions. These mathematical analyses support the derivation of the application domain of the functions, which ensures conformity with real-life conditions and maintains the S-shaped property.
In the next works, there are some promising approaches, such as finding a(t) or evaluating some simple forms of b4(t) by vanishing some parameters or both, to propose a new software reliability model.
Acknowledgments
We also thank Associate Professor Bui Thu-Lam for his careful reading of the manuscript and some propositions for publication.
References
- 1.
Jones C. <refbooktitle>The technical and social history of software engineering</refbooktitle>. Addison-Wesley; 2013.
- 2.
Tracy KW. <refbooktitle>Software: a technical history</refbooktitle>. Morgan & Claypool; 2021.
- 3. Desharnais J-M, Abran A, Suryn W. Identification, analysis of attributes and base measures within ISO 9126 . Software Qual J. 2010;19(2):447–60.
- 4. Haoues M, Sellami A, Ben-Abdallah H, Cheikhi L. A guideline for software architecture selection based on ISO 2501 0 quality related characteristics. Int J Syst Assur Eng Manag. 2016;8(S2):886–909.
- 5. Goel AL, Okumoto K. Time-dependent error-detection rate model for software reliability and other performance measures. IEEE Trans Rel. 1979;R-28(3):206–11.
- 6. Pham H. An imperfect-debugging fault-detection dependent-parameter software. Int J Automat Comput. 2007;4(4):325–8.
- 7. Yamada S, Ohba M, Osaki S. S-Shaped reliability growth modeling for software error detection. IEEE Trans Rel. 1983;R-32(5):475–84.
- 8.
Ohba M. Inflection S-shaped software reliability growth model. <refbooktitle>Stochastic Models in Reliability Theory</refbooktitle>. Springer; 1984. p. 144–62.
- 9. Hoang P, Nordmann L, Zuemei Z. A general imperfect-software-debugging model with S-shaped fault-detection rate. IEEE Trans Rel. 1999;48(2):169–75.
- 10.
Hoang P. <refbooktitle>System software reliability</refbooktitle>. Springer Science & Business Media; 2007.
- 11. Hoang P, Zhang X. An NHPP software reliability model and its comparison. International Journal of Reliability, Quality and Safety Engineering. 1997;4(03):269–82.
- 12. Nguyen H, Huynh Q. New non-homogeneous Poisson process software reliability model based on a 3-parameter S-shaped function. IET Software. 2022;16(2):214–32.
- 13. Hung-Cuong N, Quyet-Thang H. An imperfect debugging non-homogeneous poisson process software reliability model based on a 3-parameter S-shaped function. Int J Soft Eng Knowl Eng. 2024;34(06):869–89.
- 14.
Hung-Cuong N, Quyet-Thang H. New NHPP SRM based on generalized S-shaped fault-detection rate function. In: International Conference on Nature of Computation and Communication. 2014. p. 212–21.
- 15. Katz VJ. The calculus of the trigonometric functions. Historia Mathematica. 1987;14(4):311–24.
- 16.
Hung-Cuong N, Quyet-Thang H, Trung-Nghia P, Dai-Nghia V. Transformating trigonometric function to apply in software reliability modeling. In: International Conference on Advances in Information and Communication Technology. 2024. p. 120–6.