Question: Using C language to code Overview In mathematics, the Mittag-Leffler function Eas is a special function used in adaptive control of nonlinear systems (autonomous robotic

Using C language to code
Overview In mathematics, the Mittag-Leffler function Eas is a special function used in adaptive control of nonlinear systems (autonomous robotic systems), in parameter identification for dynamic systems, and in solving fractional-order differential equations. The Mittag-Leffler function Ef depends on two parameters ? and ?. It may be defined by the following series when the real part of ? is strictly positive: where T is the Gamma function; the Gamma function is an extension of the factorial function with its argument shifted down by 1. The Gamma function is given by: r(n)(n 1)! For non-integer arguments of the Gamma function, i.e. r 1.2), the factorial function is not defined, and the value of the Gamma function is obtained by interpolation. Example: For a 2.B1, we have the Mittag-Leffler functions given by: ZT2 k+1 where z is a positive real number to be passed to the Mittag-Leffler function. The infinite sum is approximated as the sum of the first n iterations where En is very small Write a program that implements the Mittag-Leffler function for a user given positive value z: 1) Implement the Gamma function as a user-defined function You may use linear interpolation to approximate the value of this function for any given number, when necessary You may elect to write more than one function to evaluate the Gamma function . . 2) Implement the Mittag-Leffler function as a user-defined function . * * This function returns the value of the Mittag-Leffler function for a given argument The values of ? and ? are user defined inputs to the Mittag-Leffler function Compute ML"?(2) where your loop of choice truncates the sum when step n satisfies the condition En0.0001. Hint: You can use the built-in fabs) here to calculate the absolute value. 3) In the main program: a) Ask the user to enter a value for z The value of z should be positive Display an error if z is not positive Prompt the user to reenter a positive value for z. . b) Calculate and store in an array ML2 for a range of numbers for z. The user picks the starting value, the terminating value, and the increment. z = 2.5 ? 5.5 with an increment of 0.1 will give z 25,26,-, 5.5 c) The output should be printed in the following format: The value of the Mittag-Leffler function for the input 2.5000 is 2.5331 The value of the Mittag-Leffler function for the input 2.6000 is 2.6072 Overview In mathematics, the Mittag-Leffler function Eas is a special function used in adaptive control of nonlinear systems (autonomous robotic systems), in parameter identification for dynamic systems, and in solving fractional-order differential equations. The Mittag-Leffler function Ef depends on two parameters ? and ?. It may be defined by the following series when the real part of ? is strictly positive: where T is the Gamma function; the Gamma function is an extension of the factorial function with its argument shifted down by 1. The Gamma function is given by: r(n)(n 1)! For non-integer arguments of the Gamma function, i.e. r 1.2), the factorial function is not defined, and the value of the Gamma function is obtained by interpolation. Example: For a 2.B1, we have the Mittag-Leffler functions given by: ZT2 k+1 where z is a positive real number to be passed to the Mittag-Leffler function. The infinite sum is approximated as the sum of the first n iterations where En is very small Write a program that implements the Mittag-Leffler function for a user given positive value z: 1) Implement the Gamma function as a user-defined function You may use linear interpolation to approximate the value of this function for any given number, when necessary You may elect to write more than one function to evaluate the Gamma function . . 2) Implement the Mittag-Leffler function as a user-defined function . * * This function returns the value of the Mittag-Leffler function for a given argument The values of ? and ? are user defined inputs to the Mittag-Leffler function Compute ML"?(2) where your loop of choice truncates the sum when step n satisfies the condition En0.0001. Hint: You can use the built-in fabs) here to calculate the absolute value. 3) In the main program: a) Ask the user to enter a value for z The value of z should be positive Display an error if z is not positive Prompt the user to reenter a positive value for z. . b) Calculate and store in an array ML2 for a range of numbers for z. The user picks the starting value, the terminating value, and the increment. z = 2.5 ? 5.5 with an increment of 0.1 will give z 25,26,-, 5.5 c) The output should be printed in the following format: The value of the Mittag-Leffler function for the input 2.5000 is 2.5331 The value of the Mittag-Leffler function for the input 2.6000 is 2.6072
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
