Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That's just the mathematical subject of <em>numerical analysis</em> for you. The MacLaurin series for <code>e^x</code> converges for all <code>x</code>, but let's see why it isn't useful for <code>e^(-10)</code>.</p> <pre><code>e^x = 1 + x + x^2/2 + x^3/6 + x^4/24 + x^5/120 + x^6/720 + x^7/5040 + ... +x^n/n! + ... e^(-10) = 1 - 10 + 100/2 - 1000/6 + 10000/24 -100000/120 + ... </code></pre> <p>What is the largest term in the series? <code>10^10/10!</code>, which is approximately <code>2755.7319224</code>. What is the true value of <code>e^(-10)</code> Approximately <code>0.00004539992</code>. Adding up the series loses 9 digits of precision along the way, which you simply do not have.</p> <p>Had you found <code>e^(10)</code> and taken the reciprocal, you would have been fairly safe. Had you computed e^(-10) directly by multiplying (1/e) 10 times, you would also be safe. But any series with alternating terms that can be far greater in magnitude than the true answer will cause these problems.</p> <p>Even for functions with limited ranges, MacLaurin series are not used in practice. For example, one first takes the argument of a trig function and uses periodicity and trig identities to reduce the argument to the interval <code>0 &lt; θ &lt; π/4</code>. Then, one often applies Chebychev approximation to reduce the error evenly. In other situations, continued fractions and Pade approximants are better than Trigonometric series. Bessel functions are best done by backwards recursion.</p> <p>Look at a good numerical analysis book. Forman Acton's <em>Numerical Methods that Usually Work</em> is old-fashioned, but good.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload