Graph of x cos x
The graph of y = x cos x is an oscillation whose amplitude grows with distance from the origin, trapped between the lines y = x and y = −x. Unlike x sin x, it is odd, so it passes through the origin with slope 1.
Key features
- Domain
- All real numbers
- Range
- All real numbers
- Zeros
- x = 0 and x = π/2 + nπ
- Envelope
- −|x| ≤ y ≤ |x|
- Symmetry
- Odd
- Slope at the origin
- 1
- y-intercept
- None
- Derivative
- cos(x)−xsin(x)
- Antiderivative
- xsin(x)+cos(x)+C
Derivative and antiderivative from the calculator’s algebra system. Domain, range and asymptotes are stated for real x.
What the graph of x cos x looks like
cos x is even and x is odd, so x cos x is odd: the graph has rotational symmetry about the origin. It starts out like y = x, since cos x ≈ 1 near 0.
It touches the upper envelope y = x where cos x = 1 (x = 2nπ) and the lower one where cos x = −1, with zeros halfway between.
The area under x cos x has the closed form x sin x + cos x, found by integration by parts.
Points of interest
Found numerically to about twelve digits in the window −15 ≤ x ≤ 15, then shown in exact form where one exists.
- x-intercepts (roots)
- x = −14.1372, x = −10.9956, x = −7.854, x = −4.7124, x = −1.5708, x = 0 … (11 in view)
- Local maxima
- (−3.4256, 3.2884), (0.8603, 0.5611), (6.4373, 6.361)
- Local minima
- (−6.4373, −6.361), (−0.8603, −0.5611), (3.4256, −3.2884)
- Inflection points
- (−14.2764, 1.98066), (−11.1727, −1.96871), (−8.09616, 1.94163), (−5.08699, −1.86131), (−2.28893, 1.50607), (0, 0) … (11 in view)
Table of values
A few points to plot, with exact values where they are simple.
| x | y = x cos x |
|---|---|
| 0 | 0 |
| π/2 | 0 |
| π | −π |
| 3π/2 | 0 |
| 2π | 2π |
| 5π/2 | 0 |
| 3π | −3π |
How to graph x cos x by hand
- 1Draw the envelope lines y = ±x.
- 2Mark the zeros at 0 and odd multiples of π/2.
- 3Draw waves touching y = x at 2π, 4π, … and y = −x at π, 3π, …
- 4Rotate the right half about the origin to get the left half.
Transformations
How the graph moves when you change the formula. The original is x cos x in blue.
y = xThe upper envelope.y = -xThe lower envelope.y = x sin(x)The even counterpart.
Frequently asked questions
Is x cos x odd or even?
What is the integral of x cos x?
Related graphs
Oscillations that grow, trapped between y = ±x.
The sine wave shifted left by π/2; starts at its peak.
Period 2π, amplitude 1, zeros at every multiple of π.
A decaying wave with limit 1 at the origin.
A straight line: slope m, y-intercept b.
Period π, asymptotes at π/2 + nπ, always increasing.
Change the window, add sliders for a, b, h and k, trace the curve with your keyboard, or overlay its derivative.