Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Ch 1 Python Exercises: Approximations

Below, you’ll find the basic code used for Figure 1.9 in the text. Using this code and either the basic approximations found in Appendix A or the Taylor Series approximation formula found in Appendix C, try the following approximations (consider x as close to 0 unless otherwise specified):

  1. f(x) = e−x2e^{-x^2}

  2. f(x) = 2ex22e^{x^2}

  3. f(x) = 2e2x32e^{2x^3}

  4. f(x) = tan⁡x\tan{x}

  5. f(x) = ln⁡(1+x)\ln{(1 + x)}

  6. f(x) = exe^x for x close to 2

Try with both 2- and 3-term Taylor approximations. Note that there is also code for a more complicated example available in the text’s Python library.

<Figure size 900x720 with 1 Axes>