Is there any mathematical condition or some theorem which can state if a given integral has a closed form or not, given that the integral converges?
Or does it depend entirely on the nature of the integrand whether it will have a closed form or not?
I searched on the net but could not find satisfactory results.
Liouville's theorem states that "elementary antiderivatives, if they exist, must be in the same differential field as the function, plus possibly a finite number of logarithms."
The Risch algorithm is "a method for deciding whether a function has an elementary function as an indefinite integral, and if it does, for determining that indefinite integral."
That said, over the years, people have defined many useful functions that aren't considered elementary, but can be used to solve many other types of integrals. For instance, rational functions of the square root of a cubic or quartic polynomial come up when examining the arc length of ellipses, and in general do not have elementary antiderivatives, but can be solved using Jacobian elliptic functions.