首页 > > 详细

讲解R、R语言讲解留学生、辅导Maclaurin series expansion

We can evaluate ln 2 by
using the Maclaurin series expansion (i.e., neighborhood of x = 0) of ln (1 + x) and setting the
step size to 1, or
using the Maclaurin series expansion of ln (1 + x1 x), and setting the step size to 13.
Give the Maclaurin series expansions of both these formulas. You will nd a pattern emerging once
evaluate the rst 2-3 terms.
Which approximation would you use? Why?
Write an Octave program to approximate ln 2 using the rst six terms of the series expansion of
each formula. List your code in the submission. You do not need to write a general function that
takes the number of terms as an argument. Instead, just use the rst six terms in each formula as
they appear. What is the relative error in each case, considering the Octave-generated value of ln 2
as the true value.
Chapter 1, problem 4 (page 15) from the text book.
Chapter 2, problem 4 (pages 32 and 33) from the text book.
Chapter 2, problem 5 (page 33) from the text book.
Write a program to compute the mathematical constant e, the base of natural logarithms, from the
de nition
e = limn 1(1 + 1n)n
for n = 10k, k = 1;2;3;:::;20. Determine the error in your successive approximations by comparing
them with the value of exp(1). Does the error always decrease as n increases? Explain your results,
plotting the absolute and relative error.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!