Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the code Below we need to manipulate to taylor formula # Build and plot the Taylor Approximations of log(1+h) import numpy as np

This is the code Below we need to manipulate to taylor formula

# Build and plot the Taylor Approximations of log(1+h) import numpy as np import matplotlib.pyplot as plt import math

h = np.linspace(0, 2, 10) # 100 h points plt.plot(h, np.log(1+h),'k') # plot sin(h) vs. h

Tlog = h # build and plot the 1st term in the Taylor Series plt.plot(h, Tlog, 'r--')

Tlog = Tlog - h**3/math.factorial(3) # add on the next term in the Taylor Series and plot plt.plot(h, Tlog, 'b--')

Tlog = Tlog + h**5/math.factorial(5) # add on the next term in the Taylor Series and plot plt.plot(h, Tlog, 'g--')

Tlog = Tlog - h**7/math.factorial(7) # add on the next term in the Taylor Series and plot plt.plot(h, Tlog, 'c--')

plt.grid('on') plt.legend(['$y=\sin(h)$','$y=h$','$y=h-h^3/3!$','$y=h-h^3/3!+h^5/5!$', '$y=h-h^3/3!+h^5/5!-h^7/7!$'],loc=(1.04,0)) plt.xlabel('h') plt.ylabel('y') plt.ylim([-2,2]) plt.title('Exploring the Tayor Series of sine');

Develop loglog in a Taylor series at =1

log(1+)log(1)+log(1)+log(1)2/2!+log(1)3/3!+log(1)4/4!

by explicitly computing, showing all of your work, each of these numbers, log(1)log(1), log(1)log(1), log(1)log(1), log(1)log(1),

and log(1)log(1). Here is the how you should start

log(1)=0,because integral from 1 to 1 is 0

log()=1/,so, by substitution log(1)=1

log()=???so, by substitutionlog(1)=???

Plot the true function in black and the approximating Taylor polynomials in dashed colors (using our old Taylor cell) and achieve the plot below for log(1+)log(1+) but with a useful legend that identifies each curve.

Develop exp in a Taylor series at =0

exp()exp(0)+exp(0)+exp(0)2/2!+exp(0)3/3!+exp(0)4/4!

by explicitly computing, showing all of your work, each of these numbers, exp(0)exp(0), exp(0)exp(0), exp(0)exp(0), exp(0)exp(0), and exp(0)exp(0). Plot the true function in black and the approximating Taylor polynomials in dashed colors (using our old Taylor cell) and achieve the plot below for exp()exp() but with a useful legend that identifies each curve.

Develop 2^ in a Taylor series at =0

2^20+(2^)(0)+(2^)(0)2/2!+(2^)(0)3/3!+(2^)(0)4/4!

!

by explicitly computing, showing all of your work, each of these numbers, 2^0, (2^)(0), (2^)(0), (2^)(0), and (2^)(0). Plot the true function in black and the approximating Taylor polynomials in dashed colors (using our old Taylor cell) and achieve the plot below for 2 but with a useful legend that identifies each curve.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

Students also viewed these Databases questions

Question

What is the difference between an exempt and a nonexempt employee?

Answered: 1 week ago