0
$\begingroup$

I'm looking to obtain order-$k$ approximation of $\exp(-z)$ for real-valued $z$. $$R_k(z)\approx \exp(-z)$$

The constraint is that I need the result in partial fraction form, ie:

$$ \begin{equation} R_k(z)=\alpha_0 + \sum_{i=1}^k \frac{\alpha_i}{z-\lambda_i} \label{1} \tag{1} \end{equation} $$

Where $\{\alpha_i\}$ and $\{\lambda_i\}$ are either complex-valued or real-valued. Restricting to real-valued allows doubling $k$ without increasing computational cost.

There's this answer for Chebychev approximation and PadeApproximant, but how do I turn those rational functions into partial fraction form $\ref{1}$?

All of the examples I tried have imaginary roots, so Apart fails to factor some terms.

Appendix B of this paper gives one such set of coefficients, but that's not easy to experiment with in Mathematica.

Here's a naive attempt at order=4 approximation with Taylor series.

enter image description here

Clear[x, t, i];
k = 4;

poly = Normal@Series[Exp[t], {t, 0, k}];
dpoly = Function @@ {{t}, D[poly, t]};

roots = t /. {ToRules@Roots[poly == 0, t]};
alpha[0] = 0;
alpha[i_] := dpoly[roots[[i]]]^-1;
lambda[i_] := roots[[i]];
nexp[z_] := alpha[0] + Sum[alpha[i]/(z - lambda[i]), {i, 1, k}];

LogPlot @@ {{Exp[-z], nexp[z]}, {z, 1, 10}, 
  PlotLegends -> {"exp[-z]", "approx"}, AxesLabel -> {"z"}, 
  PlotLabel -> StringForm["Order `` approximation", k]}
Table[{alpha[i], lambda[i]} // N, {i, 0, k}] // 
 TableForm[#, TableHeadings -> {None, {"alpha", "lambda"}}] &
$\endgroup$
12
  • $\begingroup$ The linked paper considers only real lambdas, but I see complex lambdas in the table from your question. Is it OK? $\endgroup$
    – user64494
    Mar 23 at 20:12
  • $\begingroup$ Here's Table 5 in that paper, it uses complex numbers. Real-valued would work too, didn't know that was possible $\endgroup$ Mar 23 at 20:14
  • $\begingroup$ Thank you. I got it. $\endgroup$
    – user64494
    Mar 23 at 20:24
  • $\begingroup$ If $z=10$ how do you get the "value" being -10? $e^{-10}\approx 0.0000453999$. $\endgroup$
    – JimB
    Mar 23 at 21:32
  • $\begingroup$ value in the graph is the logarithm of the function in question $\endgroup$ Mar 23 at 21:37

0