### mengke li (view profile)

on 1 Feb 2019
Latest activity Commented on by James Tursa

### James Tursa (view profile)

on 1 Feb 2019
A) Create a program that uses Taylor series approximation of 𝑦=sin⁡(𝑥), between −2𝜋 and 2𝜋 with 𝑥𝑖=0 and ℎ=0.5,0.25,0.1 radians. Plot the errors, using 𝜖=𝑦−⁡𝑦̂, for second and third order approximations. What difference do you notice between the errors? What is the average error? [25 Marks]
B) Change the program so that 𝑥𝑖 is updated with each new estimate for 𝑥𝑖+1 (recursively estimated) with ℎ=0.1. You will need to use the relationship cos(𝑥)=√(1−sin2(𝑥)). Plot the errors for the first and second order approximations. How do they compare the Part A? What are the sources of error?
I've done part A, bur for part B, I'm confused and dont know how to let xi updated with each new estimate for xi+1.
please give me some clues, thank you !

James Tursa

### James Tursa (view profile)

on 1 Feb 2019
What code have you written so far? What specific problems are you having with it?