4

I have to solve this integral: $$\int_{-\pi}^\pi{x^2\sin\frac{x}{2}\mathrm dx}$$

I'm thinking about integration by parts, but I'm not sure how to either derivate or integrate the $\sin\frac{x}{2}$ part. These are solutions to that part: $$\int{\sin\frac{x}{2}\mathrm dx} = -2\cos\frac{x}{2} + C$$ $$\frac{\mathrm d}{\mathrm dx}\left(\sin\frac{x}{2}\right)=\frac12\cos\frac{x}{2}$$

How do I get to these solutions? By introducing a new variable? Or are these one of those "well known" ones that I can simply memorise?

Thomas Andrews
  • 177,126
peroxy
  • 499
  • Whenever you have in the integrand a polynomial multiplied by a trigonometric function, try first to derive the polynomial and integrate the trigonometric function – marwalix Jan 20 '15 at 21:36
  • By doing what I am suggesting, for each integration by parts you reduce the degree of the polynomial by one and flip from sine to cosine. So in your case after two integration by parts you are left to integrate a sine – marwalix Jan 20 '15 at 21:43
  • The function is odd. But I showed the integration by parts approach to compute a primitive or a definite integral in the general case – marwalix Jan 20 '15 at 21:44

4 Answers4

16

Hint:

$$\int_{-a}^a f(x)\mathrm d x=0 \qquad \text{ where } f \,\text{ is an odd function}$$

  • That helps a lot, but how can I spot an odd function fast? Any tricks? I only know $f(x) + f(-x) = 0$. Should I just check with this formula every time? – peroxy Jan 20 '15 at 22:53
  • 2
    Yes, a function $f:\mathbb{R}\to \mathbb{R}$ is odd if $f(-x)=-f(x)$ for all $x\in\mathbb{R}$. Also $\sin (\cdot)$ is a typical example of odd function. There are some properties of even and odd functions, one of them is $$f ,\text{ odd and }g ,\text{even }\quad \implies \quad fg ,\text{ is odd}$$ – Ángel Mario Gallegos Jan 20 '15 at 23:49
1

By parts is a great way to go with the extra information $$ \int \sin (\alpha x) dx = \frac{1}{\alpha}\int \sin(u)du $$ Where the later expression you should know :).

A more complicated (but simpler further along your mathematical journey) is $$ \frac{d}{d\alpha^2}\sin(\alpha x) = -x^2\sin(\alpha x) $$ Thus you can have an integral $$ -\frac{d}{d\alpha^2}\int_{-\pi}^{\pi}\sin(\alpha x)dx $$ This should be easier to compute.

Chinny84
  • 14,186
  • 2
  • 22
  • 31
1

$\int{\sin\frac{x}{2}\mathrm dx}$

$u = \frac{x}{2}$ therefore $du = \frac{1}{2} dx$ and $dx = 2 du$

Therefore;

$\int{2\sin{u}\ du}$

1

$$\int_{-\pi}^\pi{x^2\sin\frac{x}{2}\mathrm dx}$$ Using integration by part for $\int{x^2\sin\frac{x}{2}\mathrm dx}$ $$\int{udv}=uv-\int{vdu}$$ Where $u=x^2$ and $dv=\sin{\frac{x}{2}}$ $$\int{x^2\sin\frac{x}{2}\mathrm dx}=-2x^2\cos{\frac{x}{2}}+4\int{x\cos\frac{x}{2}\mathrm dx}$$ Using the formula again: $$\int{x^2\sin\frac{x}{2}\mathrm dx}=-2x^2\cos{\frac{x}{2}}+8x\sin{\frac{x}{2}}-8\int{\sin\frac{x}{2}\mathrm dx}$$