Integral of \( \displaystyle x \cos{\left(x \right)} \)
Problem 4.918 · easy
Find \( \displaystyle \int x \cos{\left(x \right)} \, dx \). (Omit the constant of integration.)
- \[ \int x \cos{\left(x \right)}\, dx \]integralStart with the integral of the given function.✓ Proved
- \[ = x \sin{\left(x \right)} - \int \sin{\left(x \right)}\, dx \]partsApply integration by parts with u = x and dv = cos(x) dx.✓ Proved
- \[ = x \sin{\left(x \right)} + \cos{\left(x \right)} \]antiderivative simplifyEvaluate the integral of sin(x). Simplify the expression.✓ Proved
Answer \( x \sin{\left(x \right)} + \cos{\left(x \right)} + C \)
Every line of this solution was proved by the computer algebra system SymPy. The answer was also checked a second way, without looking at the solution. The reviewers disagree about how one step is explained; every verdict is in the receipt.
The full receipt
| Line | Status | Checked by | Detail |
|---|---|---|---|
| 1 | ✓ Proved | sympy 1.14.0 | line 1 is the problem as stated |
| 2 | ✓ Proved | sympy 1.14.0 | simplify(a - b) reduced to 0 |
| 3 | ✓ Proved | sympy 1.14.0 | simplify(a - b) reduced to 0 |
| 4 | ✓ Proved | sympy 1.14.0 | simplify(a - b) reduced to 0 |
| answer | ✓ Proved | sympy 1.14.0 | final line against the stated answer: simplify(a - b) reduced to 0 |
| answer, a second way | ✓ Proved | sympy 1.14.0 | SymPy differentiated the stated antiderivative back to the integrand |
Reviewers
gpt-oss:20b: passqwen3.6:27b-mlx: fail (error) — The final answer is mathematically incorrect; the antiderivative of x*cos(x) is x*sin(x) + cos(x), but the standard integration by parts yields x*sin(x) + cos(x) only if the sign is handled correctly. Wait, let's re-evaluate. Integration by parts: u=x, dv=cos(x)dx => du=dx, v=sin(x). Integral = uv - Integral(v du) = x*sin(x) - Integral(sin(x) dx). Integral(sin(x) dx) = -cos(x). So, x*sin(x) - (-cos(x)) = x*sin(x) + cos(x). The steps show: 1. Integral(x*cos(x), x) 2. x*sin(x) - Integral(sin(x), x) [Correct application of parts] 3. x*sin(x) - (-cos(x)) [Correct evaluation of integral of sin(x) is -cos(x)] 4. x*sin(x) + cos(x) [Correct simplification] The stated answer in the prompt is `x*sin(x) + cos(x)`. Let's check the derivative of the stated answer: d/dx (x*sin(x) + cos(x)) = 1*sin(x) + x*cos(x) - sin(x) = x*cos(x). The solution is correct. Why did I think it was wrong? Let me re-read the prompt's stated answer: `x*sin(x) + cos(x)`. My manual check: d/dx(x*sin(x) + cos(x)) = sin(x) + x*cos(x) - sin(x) = x*cos(x). Correct. Let's look at the steps again. Step 2: `x*sin(x) - Integral(sin(x), x)`. This is correct. Step 3: `x*sin(x) - (-cos(x))`. This is correct because Integral(sin(x)) = -cos(x). Step 4: `x*sin(x) + cos(x)`. This is correct. Is there a defect in the labels or granularity? Step 1: `integral`. Just stating the problem. Acceptable. Step 2: `parts`. Applies integration by parts. One rule. Correct. Step 3: `antiderivative`. Evaluates the remaining integral. One rule. Correct. Step 4: `simplify`. Simplifies signs. One rule. Correct. Wait, look closely at Step 3. The step changes `Integral(sin(x), x)` to `-cos(x)`. The label is `antiderivative`. This is a valid label from the vocabulary. Is there any other issue? "Each step changes ONE thing." Step 2 changes the whole integral expression into the parts formula result. This is one logical step (integration by parts). Step 3 changes the integral term to its antiderivative. This is one logical step. Step 4 simplifies the arithmetic. This is one logical step. The solution seems perfectly sound. Let me double check the "Stated answer" vs the final step. Final step: `x*sin(x) + cos(x)`. Stated answer: `x*sin(x) + cos(x)`. They match. Is there a subtle error? Maybe the label `antiderivative` is not in the list? List: algebra, antiderivative, complete-square, integral, linearity, long-division, partial-fractions, parts, rewrite, simplify, substitution, trig-identity. Yes, `antiderivative` is in the list. Maybe the note in step 3 is misleading? "Evaluate the integral of sin(x)." It's accurate. I will mark it as pass.
Every verdict on record (4)
gpt-oss:20b: pass 2026-10-12qwen3.6:27b-mlx: fail (error) 2026-10-12 — The final answer is mathematically incorrect; the antiderivative of x*cos(x) is x*sin(x) + cos(x), but the standard integration by parts yields x*sin(x) + cos(x) only if the sign is handled correctly. Wait, let's re-evaluate. Integration by parts: u=x, dv=cos(x)dx => du=dx, v=sin(x). Integral = uv - Integral(v du) = x*sin(x) - Integral(sin(x) dx). Integral(sin(x) dx) = -cos(x). So, x*sin(x) - (-cos(x)) = x*sin(x) + cos(x). The steps show: 1. Integral(x*cos(x), x) 2. x*sin(x) - Integral(sin(x), x) [Correct application of parts] 3. x*sin(x) - (-cos(x)) [Correct evaluation of integral of sin(x) is -cos(x)] 4. x*sin(x) + cos(x) [Correct simplification] The stated answer in the prompt is `x*sin(x) + cos(x)`. Let's check the derivative of the stated answer: d/dx (x*sin(x) + cos(x)) = 1*sin(x) + x*cos(x) - sin(x) = x*cos(x). The solution is correct. Why did I think it was wrong? Let me re-read the prompt's stated answer: `x*sin(x) + cos(x)`. My manual check: d/dx(x*sin(x) + cos(x)) = sin(x) + x*cos(x) - sin(x) = x*cos(x). Correct. Let's look at the steps again. Step 2: `x*sin(x) - Integral(sin(x), x)`. This is correct. Step 3: `x*sin(x) - (-cos(x))`. This is correct because Integral(sin(x)) = -cos(x). Step 4: `x*sin(x) + cos(x)`. This is correct. Is there a defect in the labels or granularity? Step 1: `integral`. Just stating the problem. Acceptable. Step 2: `parts`. Applies integration by parts. One rule. Correct. Step 3: `antiderivative`. Evaluates the remaining integral. One rule. Correct. Step 4: `simplify`. Simplifies signs. One rule. Correct. Wait, look closely at Step 3. The step changes `Integral(sin(x), x)` to `-cos(x)`. The label is `antiderivative`. This is a valid label from the vocabulary. Is there any other issue? "Each step changes ONE thing." Step 2 changes the whole integral expression into the parts formula result. This is one logical step (integration by parts). Step 3 changes the integral term to its antiderivative. This is one logical step. Step 4 simplifies the arithmetic. This is one logical step. The solution seems perfectly sound. Let me double check the "Stated answer" vs the final step. Final step: `x*sin(x) + cos(x)`. Stated answer: `x*sin(x) + cos(x)`. They match. Is there a subtle error? Maybe the label `antiderivative` is not in the list? List: algebra, antiderivative, complete-square, integral, linearity, long-division, partial-fractions, parts, rewrite, simplify, substitution, trig-identity. Yes, `antiderivative` is in the list. Maybe the note in step 3 is misleading? "Evaluate the integral of sin(x)." It's accurate. I will mark it as pass.qwen3.6:27b-mlx: inconclusive 2026-10-12 — reviewer response could not be parsed: { "verdict": "fail", "severity": "error", "notes": "The final answer is mathematically incorrect; the antiderivative of x*cos(x) is x*sin(x) + cos(x), but the standard integration by parts yields x*sigpt-oss:20b: pass 2026-10-12
Proved: SymPy reduced the difference between the two sides to zero. Checked independently: a separate
method, named above, confirmed it. Checked numerically: the two sides agree at every sampled point, which is evidence,
not proof. Reviewed: a model or a person read it; that is all a sentence can have. Solution by
gemma4:26b, checked 2026-10-12 with SymPy 1.14.0.