# Trignometric shifting in ODE. Wolframalpha gives different answer?

The ODE looks very identical ( kinda of)

The ODE I have is

$$y'' - y' + y = 0$$ $$y(0) = 5$$ $$y(1) = y(-1)$$

The solution (nontrivial) I got is

$$y = 5e^{t/2}[\cos(\sqrt{3}x/2) + \left ( \frac{1-e}{1+e} \right )\cot(\sqrt{3}/2)\sin(\sqrt{3}x/2)]$$

Wolframalpha

http://www.wolframalpha.com/input/?i=y%27%27+-+y%27+%2B+y+%3D+0+%2Cy%280%29+%3D+5+%2Cy%281%29+%3D+y%28-1%29

Could someone explain to me how do I get from my solution to do that weird shifting with the x - 1 part inside the sine functions? Wolframalpha doesn't show the "simplification"

Thanks

-
The other direction (from theirs to yours) is a computation. Reverse it! I suspect you want your cot in front. –  André Nicolas Jun 19 '12 at 2:08
Your $t$ and $x$ should be the same variable. I don't know why @AndréNicolas wants the cot in front. –  Robert Israel Jun 19 '12 at 2:20
@Robert Israel: The reason is simple: quick scribbling on paper already fairly dense with scribbles, mistake in cancelling. –  André Nicolas Jun 19 '12 at 2:59
The "from Wolfram's to yours" part is easy. Let $k=\sqrt{3}/2$. Then $$\sin(kx+k)=\sin kx \cos k+\cos kx \sin k, \quad\text{and}$$ $$e\sin(kx-k)=e\sin kx \cos k-e\cos kx \sin k.$$ Thus $$\sin(kx+k)-e\sin(kx-k)=(1+e)\cos kx \sin k +(1-e)\sin kx \cos k.\tag{1}$$ Divide, as in Wolfram's formula, by $1+e$, and multiply by Wolfram's $\csc k$. We get your $\cos kx +\frac{1-e}{1+e}\cot k \sin kx$.
For going from yours to Wolfram's, admittedly, reverse the above calculations. It not completely unnatural. Expressing your $\cot k$ in terms of sines and cosines is reasonably natural, as is bringing to a common denominator $1+e$. So we rapidly end looking at something like the right-hand side of $(1)$. It seems then almost reasonable to separate out the "$e$" part, and the rest is clear.