So if the following function is evaluated with the floating-point arithmetic, we get poor results for certain range of values of $x$. Therefore, I need to provide an alternate function that can be used for those values of $x$. The function is: $f(x)=e^x-1$ So how would I make an alternate expression or function for this. The range of this function is $y\gt -1$, $y\in\mathbb{R}$. So would I use the Taylor series for this....?
Alternate expression for $e^x-1$
2
$\begingroup$
calculus
computer-science
-
1Yes, I read the post, and I also read your comment: "...and Conjugate would not work for this..." so, yes, you sure as heck did mention "Conjugate" here. – 2012-02-14
1 Answers
3
$\begin{align*} \exp\,x-1&=\left(\exp\frac{x}{2}\right)^2-1\\ &=\left(\exp\frac{x}{2}\right)\left(\exp\frac{x}{2}-\exp\left(-\frac{x}{2}\right)\right)\\ &=2\left(\exp\frac{x}{2}\right)\left(\frac12\left(\exp\frac{x}{2}-\exp\left(-\frac{x}{2}\right)\right)\right)\\ &=2\left(\exp\frac{x}{2}\right)\left(\sinh\frac{x}{2}\right) \end{align*}$
If your computing environment supports the hyperbolic sine, the expression derived here should be sufficiently stable for numerical evaluation...
-
0@A_1_615: if as you claim you know how to find the series expansion of $\exp\,x$, then it's just as simple as subtracting $1$ from your series... – 2012-02-14