# How do you find an expression for sin(x) in terms of e^(ix) and e^(ix)?

Jun 4, 2018

$\sin x = \frac{{e}^{i x} - {e}^{- i x}}{2 i}$

#### Explanation:

Start from the MacLaurin series of the exponential function:

e^x = sum_(n=0)^oo x^n/(n!)

so:

e^(ix) = sum_(n=0)^oo (ix)^n/(n!) = sum_(n=0)^oo i^nx^n/(n!)

Separate now the terms for $n$ even and $n$ odd, and let $n = 2 k$ in the first case, $n = 2 k + 1$ in the second:

e^(ix) = sum_(k=0)^oo i^(2k) x^(2k)/((2k)!) + sum_(k=0)^oo i^(2k+1)x^(2k+1)/((2k+1)!)

Note now that:

${i}^{2 k} = {\left({i}^{2}\right)}^{k} = {\left(- 1\right)}^{k}$

${i}^{2 k + 1} = i \cdot {i}^{2 k} = i \cdot {\left(- 1\right)}^{k}$

so:

e^(ix) = sum_(k=0)^oo (-1)^k x^(2k)/((2k)!) + isum_(k=0)^oo (-1)^k x^(2k+1)/((2k+1)!)

and we can recognize the MacLaurin expansions of $\cos x$ and $\sin x$:

${e}^{i x} = \cos x + i \sin x$

which is Euler's formula.

Considering that $\cos x$ is an even function and $\sin x$ and odd function then we have:

${e}^{- i x} = \cos \left(- x\right) + i \sin \left(- x\right) = \cos x - i \sin x$

then:

${e}^{i x} - {e}^{- i x} = 2 i \sin x$

and finally:

$\sin x = \frac{{e}^{i x} - {e}^{- i x}}{2 i}$

Jun 4, 2018

Other approach to problem. See below

#### Explanation:

We know that ${e}^{i x} = \cos x + i \sin x$ (Euler)

Similarly, ${e}^{- i x} = \cos \left(- x\right) + i \sin \left(- x\right)$

But we know that $\cos \left(- x\right) = \cos x$ and $\sin \left(- x\right) = - \sin x$

Then we have

${e}^{i x} = \cos x + i \sin x$
${e}^{- i x} = \cos x - i \sin x$

${e}^{i x} + {e}^{- i x} = 2 \cos x$ and finally $\cos x = \frac{{e}^{i x} + {e}^{- i x}}{2}$

Subtarcting both, we have

${e}^{i x} - {e}^{- i x} = 2 i \sin x$ and then $\sin x = \frac{{e}^{i x} - {e}^{- i x}}{2 i}$

Jun 4, 2018

Compare the Maclaurin series of $\sin x$ and ${e}^{x}$ and construct the relation from that:
$\sin x = \frac{1}{2 i} \left({e}^{i x} - {e}^{- i x}\right)$

#### Explanation:

I assume the final formula in the question should read ${e}^{- i x}$?

Compare the Maclaurin series of $\sin x$ and ${e}^{x}$ and construct the relation from that. We'll take as given the series for these functions. Deriving these is a pleasure in itself, one easily found elsewhere on the web, e.g.
http://blogs.ubc.ca/infiniteseriesmodule/units/unit-3-power-series/taylor-series/maclaurin-expansion-of-sinx/
http://www.songho.ca/math/taylor/taylor_exp.html
Note that both of these series are convergent over the whole range of $x$.

sinx=x-(x^3)/(3!)+(x^5)/(5!)-...+(-1)^nx^(2n+1)/((2n+1)!)+...
e^x=1+x+x^2/(2!)+x^3/(3!)+...+x^n/(n!)+...

We can immediately see that the terms in the sine series are very similar to those in the exponential series - they're the same size where they exist, but often have the opposite sign, and half of them are missing.

Recalling that the powers of $i$ change in a periodic four-step pattern that has two successive plus signs and two successive minus signs, we wonder if changing $x$ to $i x$ in the exponential series might help our sign problem. We substitute:

e^(ix)=1+ix+(ix)^2/(2!)+(ix)^3/(3!)+...+(ix)^n/(n!)+...
which becomes
e^(ix)=1+ix-x^2/(2!)-ix^3/(3!)+x^4/(4!)+...+(ix)^n/(n!)+...

To remove every second term, we combine it with the series for ${e}^{- i x}$:
e^(-ix)=1+(-ix)+(-ix)^2/(2!)+(-ix)^3/(3!)+...+(-ix)^n/(n!)+...
which becomes (be careful combining minus signs and ${i}^{2}$s!)
e^(-ix)=1-ix-x^2/(2!)-ix^3/(3!)+x^4/(2!)-...+(-ix)^n/(n!)+...

When we take the difference of these series term by term, we get closer to what we want (NB taking the sum of them gives us a relation for $\cos x$ instead - give it a try). Note that the terms of even powers of $x$ are identical in the two series, so their difference is 0.

e^(ix)-e^(-ix)=2ix-2ix^3/(3!)+2ix^5/(5!)-...+2i(-1)^nx^(2n+1)/((2n+1)!)+...

which is just the series above for $\sin x$ multiplied by $2 i$. So we have our desired relation:

$\sin x = \frac{1}{2 i} \left({e}^{i x} - {e}^{- i x}\right)$

Compare at this point the hyperbolic functions, which you may have been introduced to already. In particular, note the definition of $\sinh x$ ("hyperbolic sine"; "sinh" is pronounced in one of several ways - "shine", "sinch", etc.):

$\sinh x = \frac{1}{2} \left({e}^{x} - {e}^{- x}\right)$

The hyperbolic functions are a set of functions closely related to the trig functions via these formulae. As you progress with differential equations, you'll encounter situations where a simple change of sign to a coefficient makes the difference between finding trig function and hyperbolic function solutions. The relation between the two sets of functions is an important one.