1. Introduction
In the real world, a system is commonly disturbed by noise. If the noise is described by stochastic factors, the tool of probability theory is usually used to deal with the system, which requires sufficient data and needs to ensure that the estimated probability distribution is very close to the real frequency. When lacking historical data on research problems, we can use the experience of experts in the relevant field to estimate the brief degree of the event happening. In order to rationally deal with the likelihood that something will happen, Liu [
1] proposed the uncertainty theory in 2007 and perfected this theory in 2010 [
2]. To describe the uncertain system more accurately, Liu [
3,
4] investigated uncertain processes and applied them to uncertain differential equations (UDEs). Then, Chen and Liu [
5] proved the existence and uniqueness theorem of the solutions of UDEs and gave some analytic scheme.
In 1974, Oldham and Spanier [
6] proposed fractional calculus, which received the attention of many scholars [
7,
8,
9,
10,
11]. Since fractional differential equations (FDEs) can well describe a system with memory and heritability, they have been deeply studied in various fields, such as chaos, electrochemistry, rheology, and so on [
12,
13,
14]. At present, the theoretical research on fractional calculus mainly discusses the Riemann–Liouville type and the Caputo type. While for some logarithmic problems, the Hadmard type and Caputo–Hadamard type are more appropriate, which were studied by Hadamard [
15] and Jarad et al. [
16], respectively. Subsequently, Kilbas [
17] studied some basic properties of Hadamard type fractional differentiation and integration. Gohar et al. [
18] studied the existence and uniqueness of the solutions of Caputo–Hadamard FDEs.
In order to make an uncertain system have the memory property, Zhu [
19] incorporated the uncertainty into the FDE and defined the uncertain fractional differential equation (UFDE). Then, the analytic solutions for some special Riemann–Liouville and Caputo UFDEs were given. At the same time, Zhu [
20] proved the existence and uniqueness theorem of solutions of UFDEs under Lipschitz and linear growth conditions. Subsequently, Lu et al. [
21] extended the definitions of Riemann–Liouville and Caputo UFDEs from order 
 to order 
. Mohammed et al. [
22] considered the existence and uniqueness of the solutions of Riemann–Liouville uncertain fractional backward difference equations. Liu et al. [
23] gave the definition of Caputo–Hadamard UFDEs and proved the existence and uniqueness theorem of their solutions.
For many nonlinear differential equations, it is difficult to obtain an analytic solution, while in reality, they are extensively used for describing important physical phenomena. Rashid et al. [
24] studied nonlinear time-fractional partial differential equations arising in physical systems involving the natural decomposition method. Khan et al. [
25] investigated space–time fractional diffusion equations to describing anomalous diffusion. Studying numerical algorithms has become a hot research topic. In 2013, Yao and Chen [
26] proposed the concept of the 
-path, establishing the connection between UDEs and ODEs. Gao [
27] designed a new numerical algorithm for solving UDEs by the Milne method. Wang et al. [
28] presented a numerical algorithm for solving UDEs via the Adams–Simpson method. Diethelm et al. [
29,
30] studied the Adams type predictor–corrector method suitable for solving numerical solutions of FDEs. Lu and Zhu [
31] introduced a numerical method for solving UFDEs based on the predictor–corrector method. Gohar et al. [
32] gave the modified predictor–corrector method applied to the Caputo–Hadamard derivative. However, there is no research on numerical algorithms for Caputo–Hadamard UFDEs.
In this paper, we mainly discuss the numerical algorithm for solving the nonlinear Caputo–Hadamard UFDEs. The rest of this paper is arranged as follows: in 
Section 2, we introduce some basic concepts and conclusions that are used later. In 
Section 3, the concept of the 
-path is proposed, and an important theorem is proved on the basis of the 
-path. In 
Section 4, an expected value formula of the solution with respect to the Caputo–Hadamard UFDE is given. In 
Section 5, numerical algorithms for computing the inverse uncertainty distribution and expected value are presented. In 
Section 6, some numerical examples are given to verify the effectiveness and accuracy of the proposed algorithm. 
Section 7 is the conclusion of this paper.
  2. Preliminary
For preparing the later study about the numerical solutions of Caputo–Hadamard UFDEs, some basic notions and conclusions of the uncertainty theory, such as an uncertain measure, uncertain variable, uncertainty distribution, uncertain differential equation, excepted value, etc., can be seen in [
1,
2,
27,
28]. An uncertain process 
 is said to be a Liu process if (i) 
 and almost all sample paths are Lipschitz continuous, (ii) 
 has stationary and independent increments and (iii) every increment 
 is a normal uncertain variable with expected value zero and variance 
. For an uncertain variable 
 with a regular distribution 
, the expected value of 
 is 
.
In this section, we introduce some concepts and results of Caputo–Hadamard UFDEs.
Definition 1 ([
23])
. Consider  having  with ,  a Liu process and f and g two continuous functions on . The Caputo–Hadamard UFDE with initial conditions is defined asThe solution of (1) is an uncertain process  with the following integral equation  Lemma 1 ([
23])
.  (Existence and uniqueness) 
If functions  and  in (1) satisfying the Lipschitz condition and the linear growth condition where L is a positive constant, then the Caputo–Hadamard UFDE (1) has a unique solution almost surely. Some definitions of fractional calculus and FDEs can be seen in [
7,
8].
Remark 1.(i) For any function , the Hadamard integral of order  is defined by(ii) For  having  with  and , the Caputo–Hadamard derivative of order  for a function  is defined bywhere ,  and  Lemma 2 ([
33])
. For any continuous functions  satisfying and ,  and  are solutions of respectively. If inequality (7) is strict, then . If  and  have a unique solution, respectively, then  ≤ , .   3. The -Path of Caputo–Hadamard UFDEs
In this section, the concept of the -path of Caputo–Hadamard UFDEs is proposed, which is essentially the solution of a Caputo–Hadamard FDE.
Definition 2. For  having  with ,  a Liu process and f and g two continuous functions on , the Caputo–Hadamard UFDE subject to the initial conditionsis said to have an α-path  which is a function of t and solves the corresponding Caputo–Hadamard FDE with initial conditionswhere  and  is the inverse standard normal uncertainty distribution, i.e.,  Here are some examples to illustrate Definition 2.
Example 1. For any 
, the Caputo–Hadamard UFDE subject to the initial condition
        
        has an 
-path which is a solution of the following Caputo–Hadamard FDE with initial condition
        
        that is,
        
 Example 2. For any 
, 
, the Caputo–Hadamard UFDE subject to the initial condition
        
        has an 
-path which is a solution of the following Caputo–Hadamard FDE with initial condition
        
        that is,
        
 Example 3. For any 
, the Caputo–Hadamard UFDE subject to the initial condition
        
        has an 
-path which is a solution of the following Caputo–Hadamard FDE with initial condition
        
        that is,
        
 Next, we introduce an important theorem, which establishes the relation between a Caputo–Hadamard UFDE and a Caputo–Hadamard FDE.
Theorem 1. For  having ,  a Liu process and f and g two continuous functions on , let  and  be the unique solution and α-path of the Caputo–Hadamard UFDE (10), respectively. Then, we have  Proof.  For any 
 and 
, divide the time interval 
 into two disjoint subsets
        
It is easy to get that 
 and 
. Denote
        
        where 
 is the inverse uncertainty distribution of a standard normal uncertain variable. Considering that 
 is a Liu process with independent increments and 
, we get
        
For each 
 and a.e. 
, we have
        
Since 
 and 
 are unique solutions to a Caputo–Hadamard UFDE (
10) and a Caputo–Hadamard FDE (
11), respectively. It follows from Lemma 2 that
        
Then, for all 
, we have
        
Then, for all 
 and 
, we have
        
It follows from Lemma 2 that
        
It follows from the duality axiom in the uncertainty theory that
        
It follows from the monotonicity of the uncertain measure 
 that
        
Combining Equations (
24)–(
26), we have
        
The proof ends.    □
 Theorem 2. For  having ,  a Liu process and f and g two continuous functions on , let  and  be the unique solution and α-path of the Caputo–Hadamard UFDE (10), respectively. Then,  has an inverse uncertainty distribution  Proof.  Since 
 and 
, a.e. 
t. According to Theorem 1 and the monotonicity of the uncertain measure 
, we have
        
        and
        
Since 
 and 
 are opposite, it follows from the duality axiom in the uncertainty theory that
        
Combining Equations (
28)–(
30), we have 
 a.e. 
. Thus, 
 has an inverse uncertainty distribution 
    □
 Next, we use some examples to illustrate the validity of Theorem 2.
Example 4. The Caputo–Hadamard UFDE (
13) has a solution
        
Solution (
31) has an inverse uncertainty distribution
        
        that is also the 
-path of the Caputo–Hadamard UFDE (
13).
 Example 5. The Caputo–Hadamard UFDE (
16) has a solution
        
Solution (
33) has an inverse uncertainty distribution
        
        that is also the 
-path of the Caputo–Hadamard UFDE (
16).
 Example 6. The Caputo–Hadamard UFDE (
19) has a solution
        
Solution (
35) has an inverse uncertainty distribution
        
        that is also the 
-path of the Caputo–Hadamard UFDE (
19).
   5. Numerical Algorithms for Caputo–Hadamard UFDE
For most Caputo–Hadamard UFDEs, it is difficult to obtain analytic solutions. When a Caputo–Hadamard UFDE is nonlinear, there may be no analytic solution. Thus, to propose a corresponding numerical algorithm for finding the numerical solution of a Caputo–Hadamard UFDE is required.
Based on the 
-path and the modified predictor–corrector method [
32], an algorithm for solving the inverse uncertainty distribution of the solutions of Caputo–Hadamard UFDEs (
1) is given in Algorithm 1.
      
| Algorithm 1: Inverse uncertainty distribution of the solutions of Caputo–Hadamard UFDEs. | 
- Step 1.
    For , divide the interval  into N parts. Let  be the step length. Set  and the step length . - Step 2.
    Update , . - Step 3.
    Applying the modified predictor–corrector method [ 32] to the grid  , solve the following Caputo–Hadamard FDE with initial conditions
                      to get . - Step 4.
    Output . - Step 5.
    If  and , go back to Step 2. - Step 6.
    Output . 
  | 
    In particular, when 
, we can get the 99-table as 
Table 1.
According to Theorem 3, the expected value can be calculated by the integral equation
      
When the above integral is an improper integral, we cannot operate the integral at the improper points. Thus, let the small enough positive number 
 such that 
. We apply Simpson’s rule to the above integral and the expected value of the strictly monotonic function 
 is computed by Algorithm 2.
      
| Algorithm 2: Expected value of the solution of a Caputo–Hadamard UFDE. | 
- Step 1.
    For , give a small error . Let , set the step length , where M is an even number. - Step 2.
    For each , we can obtain ,  and  by Algorithm 1. - Step 3.
    Apply Simpson’s rule to calculate the expected value of the strictly monotonic function  . That is,
                   
  | 
  6. Numerical Experiments
In this section, first, we analyze an example when the analytic solution can be obtained and compare the inverse uncertainty distribution of the numerical solution and the analytic solution to illustrate the accuracy of the proposed algorithms.
Example 7. Let 
; the following Caputo–Hadamard UFDE with initial conditions is considered:
        
        where the solution 
 of (
43) has an inverse uncertainty distribution
        
        by Theorem 2. We choose the parameters as 
, 
, 
, 
, 
 and 
. Let the initial conditions 
, 
 and the step length 
, 
 and 
. The inverse uncertainty distributions of the numerical solution and the analytic solution are obtained by Algorithm 1 and Equation (
44), respectively, as shown in 
Figure 1. The absolute error between the inverse uncertainty distribution of the numerical and analytic solutions is less than 
, as shown in 
Figure 2. It follows from 
Figure 1 and 
Figure 2 that the numerical solution calculated by Algorithm 1 is close to the analytic solution.
For different fraction orders 
p, we calculate the maximum absolute errors of the analytic and numerical solutions under the given parameters 
, 
, 
, 
, 
, 
, 
, 
, 
 and 
, as shown in 
Table 2. The maximum absolute error of the analytic and numerical solutions is 
.
For different parameters 
a and 
b, we calculate the maximum absolute errors of the analytic and numerical solutions under the given parameters 
, 
, 
, 
, 
, 
, 
, 
 and 
, as shown in 
Table 3. The maximum absolute error of the analytic and numerical solutions is 
.
For different parameters 
u and 
v, we calculate the maximum absolute errors of the analytic and numerical solutions under the given parameters 
, 
, 
, 
, 
, 
, 
, 
 and 
, as shown in 
Table 4. The maximum absolute error of the analytic and numerical solutions is 
.
It can be seen from the above results that the parameters p, a, b, u and v have little influence on Algorithm 1. Thus, Algorithm 1 has a high conservatism.
Let 
 and 
. The numerical result and the analytic result of the expected value of solution 
 are calculated by Algorithm 2 and Equation (
42), respectively, as shown in 
Table 5 with different orders 
p. The absolute error of the numerical result and the analytical result is less than 
.
For different parameters 
a and 
b, we calculate the absolute error of the analytic and numerical results of the expected value under the given parameters 
, 
, 
, 
, 
, 
, 
, 
 and 
, as shown in 
Table 6. The maximum absolute error of the analytic and numerical solutions is 
.
For different parameters 
u and 
v, we calculate the absolute error of the analytic and numerical results of the expected value under the given parameters 
, 
, 
, 
, 
, 
, 
, 
 and 
, as shown in 
Table 7. The maximum absolute error of the analytic and numerical solutions is 
.
It can be seen from the above results that the parameters p, a, b, u and v have little influence on Algorithm 2. The expected value  has nothing to do with the change in the parameters b and v. Thus, the Algorithm 2 has a high conservatism.
 Next, we give a numerical example when the analytic solution cannot be obtained, and use Algorithms 1 and 2 to calculate the inverse uncertainty distribution and expected value of the solution, respectively.
Example 8. Let 
; the following Caputo–Hadamard UFDE with initial conditions is considered:
        
The 
-path 
 of (
45) satisfies
        
We choose the parameters as 
 and 
. Let the initial conditions be 
, 
 and the step length 
, with 
 and 
. For different 
’s, the distribution of 
 is shown in 
Figure 3. The uncertainty distribution of 
 at time 
 for different orders 
p is shown in 
Figure 4.
Let 
, 
, and 
. For different orders 
p, the expected value of 
 can be computed by Algorithm 2, as shown in 
Table 8. As can be seen from 
Table 8, the larger the parameter p, the smaller the expected values of 
. Thus, when the analytic solution of the Caputo–Hadamard UFDE does not exist, we can obtain the numerical solution by the proposed Algorithm 1. The expected values of 
 can also be obtained by the proposed Algorithm 2.