Skip to content
ihateDesmos

Integral of x sin(x²)

Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The integral of x sin(x²)
∫
xsin(x2)
dx =
−cos(x2)2+C

The integral of x sin(x²) is −cos(x²)/2 + C. The x out front is almost the derivative of x², so substitution works.

−3−2−1123−220
Open in calculator
y=xsin(x2)
in blue and its integral
y=−cos(x2)2
(with C = 0) in red.

How to integrate x sin(x²)

Method: u-substitution.

  1. 1
    Let u = x², so du = 2x dx, which means x dx = du/2.
  2. 2
    The integral becomes (1/2) ∫sin u du = −cos u/2.
  3. 3
    Substitute back: −cos(x²)/2 + C.

What it means

Without the x in front, the integral of sin(x²) has no elementary formula. That single factor of x makes all the difference.

The integral from 0 to √π

Using the antiderivative: F(√π) − F(0) = 1, which is about 1. A direct numerical integration of x sin(x²) gives 1, which agrees.

−3−2−1123−3−2−1123

Check by differentiating

The derivative of the answer should give back the original function. The last column measures that slope directly from the answer, and it matches.

Checking the integral
xx sin(x²)Slope of the answer
−21.51361.5136
−1−0.841471−0.841471
000
10.8414710.841471
2−1.5136−1.5136

Common mistakes

  • Forgetting to divide by 2.

Frequently asked questions

What is the integral of x sin(x²)?
The integral of x sin(x²) is −cos(x²)/2 + C.
What is the integral of x sin(x²) from 0 to √π?
1, which is about 1.

Keep going

Integrate any function

Type your own function into the integral calculator for the steps, the answer and a graph.

Open the integral calculator