1. ## integral

$\int \sin(101x)\sin^{99}(x) dx$

Wolfram Alpha says that the answer is $\frac{\sin(100x)\sin^{100}(x)}{100}+C$, but it does not show steps (unfortunately).

2. ## Re: integral

Originally Posted by AgentSmith
$\int \sin(101x)\sin^{99}(x) dx$

Wolfram Alpha says that the answer is $\frac{\sin(100x)\sin^{100}(x)}{100}+C$, but it does not show steps (unfortunately).
Thinking out loud... Maybe integration by parts?

3. ## Re: integral

Originally Posted by AgentSmith
$\int \sin(101x)\sin^{99}(x) dx$

Wolfram Alpha says that the answer is $\frac{\sin(100x)\sin^{100}(x)}{100}+C$, but it does not show steps (unfortunately).
Would you not try a simple one like $\int sin (2x) sin^2 (x) dx$ to see the steps and then use for your problem?

4. ## Re: integral

Euler said " $e^{ix}=\cos(x)+i\sin(x)$"

We have

$e^{ix}=\cos(x)+i\sin(x) \quad [1]$
$e^{-ix}=\cos(x)-i\sin(x) \quad[2]$

Subtract [2] from [1]

$e^{ix}-e^{-ix}=2i\sin(x)$
$\implies \sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$
$\implies \sin^{99}(x)= \Big( \frac{e^{ix}-e^{-ix}}{2i}\Big)^{99}$

\begin{align*} I= \int \sin(101x)\sin^{99}(x) \ dx &=\text{Im}\Big( \int e^{101ix} \Big( \frac{e^{ix}-e^{-ix}}{2i}\Big)^{99} dx\Big)\\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(2i)^{99}} \Big( e^{ix}-e^{-ix}\Big)^{99} dx\Big) \\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(-i)2^{99}} \Big( \frac{e^{2ix}-1}{e^{ix}}\Big)^{99} dx\Big) \\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(-i)2^{99}e^{99ix}} \Big( {e^{2ix}-1}\Big)^{99} dx\Big) \\ &=\text{Im}\Big( \int \frac{e^{2ix}}{(-i)2^{99}} \Big( {e^{2ix}-1}\Big)^{99} dx\Big) \end{align*}

Substitute $u=e^{2ix}$ and $du=2i e^{2ix} \ dx$.

\begin{align*} I &= \text{Im}\Big( \int \frac{1}{2^{100}} ( {u-1})^{99} dx\Big) \\ &= \text{Im}\Big( \frac{1}{2^{100}} \frac{( {u-1})^{100}}{100} \Big) \\ &= \text{Im}\Big( \frac{1}{2^{100}} \frac{e^{100ix}}{(2i)^{100}}\frac{2^{100}}{e^{100i x}}\frac{( {e^{2ix}-1})^{100}}{100} \Big) \\ &= \text{Im}\Big( \frac{e^{100ix}}{100} \Big(\frac{ {e^{2ix}-1}}{2i e^{ix}}\Big)^{100} \Big) \\ &= \text{Im}\Big( \frac{e^{100ix}}{100} \sin^{100}(x) \Big) \\ &= \text{Im }\Big( \frac{ \cos(100x) \sin^{100}(x)}{100} +i\frac{\sin(100x)\sin^{100}(x)}{100} \Big) \\ &= \frac{\sin(100x)\sin^{100}(x)}{100}+C\end{align*}

5. ## Re: integral

Originally Posted by sbhatnagar
Euler said " $e^{ix}=\cos(x)+i\sin(x)$"

We have

$e^{ix}=\cos(x)+i\sin(x) \quad [1]$
$e^{-ix}=\cos(x)-i\sin(x) \quad[2]$

Subtract [2] from [1]

$e^{ix}-e^{-ix}=2i\sin(x)$
$\implies \sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$
$\implies \sin^{99}(x)= \Big( \frac{e^{ix}-e^{-ix}}{2i}\Big)^{99}$

\begin{align*} I= \int \sin(101x)\sin^{99}(x) \ dx &=\text{Im}\Big( \int e^{101ix} \Big( \frac{e^{ix}-e^{-ix}}{2i}\Big)^{99} dx\Big)\\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(2i)^{99}} \Big( e^{ix}-e^{-ix}\Big)^{99} dx\Big) \\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(-i)2^{99}} \Big( \frac{e^{2ix}-1}{e^{ix}}\Big)^{99} dx\Big) \\ &= \text{Im}\Big( \int \frac{e^{101ix}}{(-i)2^{99}e^{99ix}} \Big( {e^{2ix}-1}\Big)^{99} dx\Big) \\ &=\text{Im}\Big( \int \frac{e^{2ix}}{(-i)2^{99}} \Big( {e^{2ix}-1}\Big)^{99} dx\Big) \end{align*}

Substitute $u=e^{2ix}$ and $du=2i e^{2ix} \ dx$.

\begin{align*} I &= \text{Im}\Big( \int \frac{1}{2^{100}} ( {u-1})^{99} dx\Big) \\ &= \text{Im}\Big( \frac{1}{2^{100}} \frac{( {u-1})^{100}}{100} \Big) \\ &= \text{Im}\Big( \frac{1}{2^{100}} \frac{e^{100ix}}{(2i)^{100}}\frac{2^{100}}{e^{100i x}}\frac{( {e^{2ix}-1})^{100}}{100} \Big) \\ &= \text{Im}\Big( \frac{e^{100ix}}{100} \Big(\frac{ {e^{2ix}-1}}{2i e^{ix}}\Big)^{100} \Big) \\ &= \text{Im}\Big( \frac{e^{100ix}}{100} \sin^{100}(x) \Big) \\ &= \text{Im }\Big( \frac{ \cos(100x) \sin^{100}(x)}{100} +i\frac{\sin(100x)\sin^{100}(x)}{100} \Big) \\ &= \frac{\sin(100x)\sin^{100}(x)}{100}+C\end{align*}
thank you! I never thought of using euler's formula to express sin(x).

6. ## Re: integral

Once you have seen the Wolfram Alpha solution, you can reconstruct it like this. Start with the addition formula $\sin(101x) = \sin(100x)\cos x + \cos(100x)\sin x.$ then

\begin{aligned}\sin(101x)\sin^{99}x &= \sin(100x)\cos x\sin^{99}x + \cos(100x)\sin^{100} x \\ &= \sin(100x)\frac d{dx}\Bigl(\frac{\sin^{100}x}{100}\Bigr) + \frac d{dx}\Bigl(\frac{\sin(100x)}{100}\Bigr)\sin^{100}x \\ &= \frac d{dx}\Bigl(\frac{\sin(100x)\sin^{100}x}{100}\Bigr) \quad\text{by the product rule.} \end{aligned}

Therefore $\int\sin(101x)\sin^{99}x \,dx = \frac{\sin(100x)\sin^{100}x}{100} + C.$

(But I think you would be unlikely to find that method if you had not already seen the answer.)

7. ## Re: integral

How does Wolfram Alpha (Mathematica) even solve integrals like this one?

8. ## Re: integral

Originally Posted by Ridley
How does Wolfram Alpha (Mathematica) even solve integrals like this one?
Mathematica's Integrate function represents the fruits of a huge amount of mathematical and computational research. It doesn't do integrals the way people do. Instead, it uses powerful, general algorithms that often involve very sophisticated math. There are a couple of approaches that it most commonly takes. One involves working out the general form for an integral, then differentiating this form and solving equations to match up undetermined symbolic parameters. Even for quite simple integrands, the equations generated in this way can be highly complex and require Mathematica's strong algebraic computation capabilities to solve. Another approach that Mathematica uses in working out integrals is to convert them to generalized hypergeometric functions, then use collections of relations about these highly general mathematical functions.