# Simplify $y = \frac{1-2\exp(-x)\cos(x)+\exp(-2x)}{1+2\exp(-x)\sin(x)-\exp(-2x)}$

I'm trying to simplify the following equation:

$$y = \dfrac{1-2\exp(-x)\cos(x)+\exp(-2x)}{1+2\exp(-x)\sin(x)-\exp(-2x)}$$

I suspect that a simpler form using complex exponents exists, but I can't find it.

For context, this equation describes the effective conductivity due to the skin effect of a flat conductor as a function of its thickness. I just removed some scale factors for simplicity. The underlying differential equation gives rise to expressions of the form $$\exp(\pm(1+i)x)$$, which is where the $$\sin(x)$$ and $$\cos(x)$$ came from.

$$y=\frac{1-2e^{-x}\cos(x)+e^{-2x}}{1+2e^{-x}\sin(x)-e^{-2x}}\cdot\frac{e^x}{e^x}=\frac{e^x-2\cos(x)+e^{-x}}{e^x+2\sin(x)-e^{-x}}\cdot\frac{\frac{1}{2}}{\frac{1}{2}}$$ $$=\frac{\frac{e^x+e^{-x}}{2}-\cos(x)}{\frac{e^x-e^{-x}}{2}+\sin(x)}=\frac{\cosh(x)-\cos(x)}{\sinh(x)+\sin(x)}$$
• Nice! Would it be possible to rewrite this using $\tan$ or $\tanh$? Unfortunately $\sinh(x)$ and $\cosh(x)$ cause numerical issues (overflow) for large values of $x$. – Maarten Baert Mar 31 at 3:21
• If you want you can divide the top and bottom by $\cosh(x)$ to get a $\tanh(x)$ but this makes both the numerator and denominator more complicated. – coreyman317 Mar 31 at 3:25
After coreyman317's answer and your comment about large values of $$x$$, you could notice that for $$x >24$$ $$\frac{\cosh(x)-\cos(x)}{\sinh(x)+\sin(x)} \sim \coth(x)$$ for an error $$< 10^{-10}$$.
Moreover, for large $$x$$, $$\coth(x)\sim 1+2e^{-2x}$$.