Mister Exam

Integral of sinxsinnx dx

Limits of integration:

from to
v

The graph:

from to

Piecewise:

The solution

You have entered [src]
 pi                   
  /                   
 |                    
 |  sin(x)*sin(n*x) dx
 |                    
/                     
0                     
$$\int\limits_{0}^{\pi} \sin{\left(x \right)} \sin{\left(n x \right)}\, dx$$
Integral(sin(x)*sin(n*x), (x, 0, pi))
The answer (Indefinite) [src]
                            //                     2           2               \
                            ||cos(x)*sin(x)   x*cos (x)   x*sin (x)            |
                            ||------------- - --------- - ---------  for n = -1|
                            ||      2             2           2                |
                            ||                                                 |
  /                         ||     2           2                               |
 |                          ||x*cos (x)   x*sin (x)   cos(x)*sin(x)            |
 | sin(x)*sin(n*x) dx = C + |<--------- + --------- - -------------  for n = 1 |
 |                          ||    2           2             2                  |
/                           ||                                                 |
                            || cos(x)*sin(n*x)   n*cos(n*x)*sin(x)             |
                            || --------------- - -----------------   otherwise |
                            ||           2                  2                  |
                            ||     -1 + n             -1 + n                   |
                            \\                                                 /
$$\int \sin{\left(x \right)} \sin{\left(n x \right)}\, dx = C + \begin{cases} - \frac{x \sin^{2}{\left(x \right)}}{2} - \frac{x \cos^{2}{\left(x \right)}}{2} + \frac{\sin{\left(x \right)} \cos{\left(x \right)}}{2} & \text{for}\: n = -1 \\\frac{x \sin^{2}{\left(x \right)}}{2} + \frac{x \cos^{2}{\left(x \right)}}{2} - \frac{\sin{\left(x \right)} \cos{\left(x \right)}}{2} & \text{for}\: n = 1 \\- \frac{n \sin{\left(x \right)} \cos{\left(n x \right)}}{n^{2} - 1} + \frac{\sin{\left(n x \right)} \cos{\left(x \right)}}{n^{2} - 1} & \text{otherwise} \end{cases}$$
The answer [src]
/   -pi                 
|   ----      for n = -1
|    2                  
|                       
|    pi                 
|    --       for n = 1 
<    2                  
|                       
|-sin(pi*n)             
|-----------  otherwise 
|        2              
|  -1 + n               
\                       
$$\begin{cases} - \frac{\pi}{2} & \text{for}\: n = -1 \\\frac{\pi}{2} & \text{for}\: n = 1 \\- \frac{\sin{\left(\pi n \right)}}{n^{2} - 1} & \text{otherwise} \end{cases}$$
=
=
/   -pi                 
|   ----      for n = -1
|    2                  
|                       
|    pi                 
|    --       for n = 1 
<    2                  
|                       
|-sin(pi*n)             
|-----------  otherwise 
|        2              
|  -1 + n               
\                       
$$\begin{cases} - \frac{\pi}{2} & \text{for}\: n = -1 \\\frac{\pi}{2} & \text{for}\: n = 1 \\- \frac{\sin{\left(\pi n \right)}}{n^{2} - 1} & \text{otherwise} \end{cases}$$
Piecewise((-pi/2, n = -1), (pi/2, n = 1), (-sin(pi*n)/(-1 + n^2), True))

    Use the examples entering the upper and lower limits of integration.