How to Integrate sin(x^2) and cos(x^2)
The functions f(x) = sin(x^2) and g(x) = cos(x^2) are examples of non-integrable functions, that is, functions whose antiderivatives cannot be expressed in terms of elementary functions. They can be expressed in terms of the error fuction erf(x), which is related to the integral of e^(-x^2). There are also power series expansions of sin(x^2) and cos(x^2) which let you estimate definite integrals.
Related to the functions f(x) = sin(x^2) and g(x) = cos(x^2) are the Fresnel functions, also called the Fresnel integrals, which are defined as
S(x) = ∫ sin(t^2) dt, from t = 0 to t = x
C(x) = ∫ cos(t^2) dt, from t = 0 to t = x
In other words, the Fresnel function S(x) is defined as the area under the curve y = sin(t^2) from between t = 0 and t = x, and similarly for C(x). There is no closed form of the Fresnel integrals for arbitrary values of x, but there are some approximation formulas you can use. There is also a closed form for the improper definite integral from 0 to infinity.
Graphs of y = sin(x^2)
Approximating the Antiderivative of sin(x^2)
The Taylor series expansion for sin(x) is
= x/1! - (x^3)/3! + (x^5)/5! - (x^7)/7! + ...
= x - (x^3)/6 + (x^5)/120 - (x^7)/5040 + ...
If you replace x with x^2, you get a power series expansion for sin(x^2):
= (x^2)/1! - (x^6)/3! + (x^10)/5! - (x^14)/7! + ...
= x^2 - (x^6)/6 + (x^10)/120 - (x^14)/5040 + ...
Integrating each term of the series gives you an power series expansion for the integral of sin(x^2):
∫ sin(x^2) dx
= (x^3)/(3*1!) - (x^7)/(7*3!) + (x^11)/(11*5!) - (x^15)(15*7!) + ...
= (x^3)/3 - (x^7)/42 + (x^11)/1320 - (x^15)/75600 + ... + C
If you evaluate this infinite series at the point x = 0 you get 0. This implies that the Fresnel integral S(x) is also equal to this series. In math notation,
= (x^3)/3 - (x^7)/42 + (x^11)/1320 - (x^15)/75600 + (x^19)/6894720 - ...
Approximating the Antiderivative of cos(x^2)
You can find a series expansion for the antiderivative of cos(x^2) using the Taylor series for cos(x). This gives you
= 1 - (x^2)/2! + (x^4)/4! - (x^6)/6! + ...
= 1 - (x^4)/2! + (x^8)/4! - (x^12)/6! + ...
∫ cos(x^2) dx
= x - (x^5)/(5*2!) + (x^9)/(9*4!) - (x^13)/(13*6!) + ... + C
Since this series equals 0 when evaluated at 0, we also get the power series expansion for the Fresnel integral C(x)
= x - (x^5)/10 + (x^9)/216 - (x^13)/9360 + (x^17)/685440 - ...
Example of Approximate Integration
Related Trig Integrals
Let's estimate the area under the curve y = sin(x^2) from x = 0 to x = sqrt(π), shaded in yellow in the graph above. In other words, we want to evaluate the Fresnel function S(sqrt(π)). To do this, we use a truncation of the infinite series expansion of the formula for S(x). The more terms you use, the more acccurate the estimate is. Four terms is good enough for an estimate accurate to three decimal places. This gives us
[sqrt(π)^3]/3 - [sqrt(π)^7]/42 + [sqrt(π)^11]/1320 - [sqrt(π)^15]/75600
Exact Values of Improper Definite Integrals
The integrals of sin(x^2) and cos(x^2) converge as x goes to infinity. This means that improper integrals S(∞) and C(∞) are finite numbers. Their exact values can be found using the three mathematical relations
sin(x^2) = [e^(ix^2) - e^(-ix^2)]/(2i)
cos(x^2) = [e^(ix^2) + e^(-ix^2)]/2
sqrt(π) = ∫ e^(-x^2) dx, from x = -∞ to x = ∞
where i is the imaginary unit equal to the square root of -1. Applying integration techniques from complex analysis, you get the following exact forms.