integral from -pi to pi of x*sin(x/2)
1) Let's integrate: ∫-ππx·sin(x2)dx
⇥For x·sin(x2), we use integration by parts: ∫u1·v2'dx = u1·v2 -∫u1'·v2dx, with u1 = x and v2' = sin(x2)
⇥Thus, u1' is 1
⇥1.1) Let's integrate v2': ∫sin(x2)dx
⇥For the math expression: sin(x2), since (cos(a))' = -a'*sin(a), we try differentiating cos(x2)
⇥1.2) Let's perform the differentiation: ddx(cos(x2))
⇥Apply the differentiation rule: ddx(cos(f)) = -ddx(f)·sin(f) with f = x2
⇥ⓘ The derivative of cos(x) is -sin(x): ddx(cos(x2)) = -ddx(x2)·sin(x2)
⇥ -ddx(x2)·sin(x2)
⇥ⓘ A constant factor stays in front of the derivative, (k*u)' = k*u'. The derivative of x is 1: ddx(x2) = 12
⇥ -12·sin(x2)
⇥ⓘ Multiplying a fraction by a term multiplies its numerator: -12·sin(x2) = -1·sin(x2)2 = -sin(x2)2
⇥ -sin(x2)2
⇥You observe that the computed derivative and the original math expression are the same, except for a coefficient. So the integral is:
⇥ⓘ The derivative of -2·cos(x2) is sin(x2), so -2·cos(x2) is an antiderivative of sin(x2): ∫sin(x2)dx = -2·cos(x2)
⇥ -2·cos(x2)
⇥So, v2 corresponds to -2·cos(x2)
⇥1.3) Let's calculate u1·v2 -∫u1'·v2dx: x·(-2·cos(x2)) -∫(-2·cos(x2))dx
⇥For the math expression: 2·cos(x2), since (sin(a))' = a'*cos(a), we try differentiating sin(x2)
⇥1.4) Let's differentiate: ddx(sin(x2))
⇥Apply the differentiation rule: ddx(sin(f)) = ddx(f)·cos(f) with f = x2
⇥ⓘ The derivative of sin(x) is cos(x): ddx(sin(x2)) = ddx(x2)·cos(x2)
⇥ ddx(x2)·cos(x2)
⇥ⓘ A constant factor stays in front of the derivative, (k*u)' = k*u'. The derivative of x is 1: ddx(x2) = 12
⇥ 12·cos(x2)
⇥ⓘ Multiplying a fraction by a term multiplies its numerator: 12·cos(x2) = 1·cos(x2)2 = cos(x2)2
⇥ cos(x2)2
⇥You observe that the computed derivative and the original math expression are the same, except for a coefficient. So the integral is:
⇥ⓘ The derivative of 4·sin(x2) is 2·cos(x2), so 4·sin(x2) is an antiderivative of 2·cos(x2): -∫(-2·cos(x2))dx = 4·sin(x2)
⇥ -2x·cos(x2) + 4·sin(x2)
Then you can resume the integration:
ⅰ ∫x·sin(x2)dx = -2x·cos(x2) + 4·sin(x2)
▷ -2x·cos(x2) + 4·sin(x2)
2) Let's evaluate for the interval [-π, π]: (4·sin(π2) -2π·cos(π2)) -(4·sin(-π2) -2·(-π)·cos(-π2))
ⓘ The sine is the y-coordinate (vertical axis) of the point reached on the unit circle after a rotation of π2 radians from the horizontal axis pointing to the right, this is a remarkable value: sin(π2) = 1■Multiplying by 1 changes nothing: 4·1 = 4■The cosine is the x-coordinate (horizontal axis) of the point reached on the unit circle after a rotation of π2 radians from the horizontal axis pointing to the right, this is a remarkable value: cos(π2) = 0■A minus sign before a parenthesis changes the sign of each of its terms: -(4·sin(-π2) -2·(-π)·cos(-π2)) = -4·sin(-π2) + 2·(-π)·cos(-π2)
4 -2π·0 -4·sin(-π2) + 2·(-π)·cos(-π2)
ⓘ A product with a zero factor is zero: 2π·0 = 0■sin is odd, sin(-x) = -sin(x): sin(-π2) = -sin(π2)■cos is even, cos(-x) = cos(x): cos(-π2) = cos(π2)■The minus sign is placed in front of the product: 2·(-π) = -2π
4 + 0 -4·(-sin(π2)) -2π·cos(π2)
ⓘ Adding 0 changes nothing: 0 -4·(-sin(π2)) = -4·(-sin(π2))■The sine is the y-coordinate (vertical axis) of the point reached on the unit circle after a rotation of π2 radians from the horizontal axis pointing to the right, this is a remarkable value: -sin(π2) = -1■Multiplying by -1 gives the opposite: -4·(-1) = 4■The cosine is the x-coordinate (horizontal axis) of the point reached on the unit circle after a rotation of π2 radians from the horizontal axis pointing to the right, this is a remarkable value: cos(π2) = 0
4 + 4 -2π·0
ⓘ Start from 4 and move forward 4 on the number line: 4 + 4 = 8■A product with a zero factor is zero: 2π·0 = 0
8 + 0
ⓘ Adding 0 changes nothing: 8 + 0 = 8
▶Integral:   8