Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ignore question 13 Python questions. ... . 13. (a) Define a vector v whose entries are [1.0.01, 0.02, ..., 5]. Do not print. (b) Define

image text in transcribed

ignore question 13 Python questions.

image text in transcribed

...

.

13. (a) Define a vector v whose entries are [1.0.01, 0.02, ..., 5]. Do not print. (b) Define a 10 x 10 matrix whose entries are the integers 1 to 100 ordered column-wise. Do not print. Hint: look up np.reshape (c) Plot y = cos and y = I on the interval 0.1 in the same graph. 14. Given the equation ?- 100000.1+1 = 0, use formula (1.5) and formula (1.6) to compute two different approximations of 21. Print both values in the exponential notation with 15 digits after the decimal point. Which formula produces a better approximation of x? 15. Given p(x) = -1878 +14427-672- + 2016z" - 40327 +5376x23 - 460822 +2304.- 512. (a) Let n(x) be the nested form of px). Define p(x), n(x), and (2) = (- 2)". All 3 functions need to able to take in arrays. (b) p(a) = (x) = s(x) algebraically, but makes a difference in computers. Plot all three functions on the interval [1.92, 2.08) (with 0.001 increment). You need to place all 3 plots in a 1 x 3 grid. Be sure to give a title to each subplot to indicate which is which (c) Explain the difference in three plots in (b). 1. Bisection and Newton comparison. (a) Use the Bisection method to do Example 2.1, with the stopping criteria Pn+1 - Pul Sle 5, and initial interval a = 0, b) = 1. How many iterations was run? (meaning what is the value when Pn+1-Pal Cle-5 is reached?) How is this compared to the theoretical value in (2.1)? (b) Use the Newton's method to do Example 2.1, with the stopping criteria n+1- Sle 5, and initial value o = 1. How many iterations was run? 2. Newton's method fails for finding a root of y = -2-1 with 20 = 0. Print the first 6 approximations to illustrate this. Other Exercises 13. (a) Define a vector v whose entries are [1.0.01, 0.02, ..., 5]. Do not print. (b) Define a 10 x 10 matrix whose entries are the integers 1 to 100 ordered column-wise. Do not print. Hint: look up np.reshape (c) Plot y = cos and y = I on the interval 0.1 in the same graph. 14. Given the equation ?- 100000.1+1 = 0, use formula (1.5) and formula (1.6) to compute two different approximations of 21. Print both values in the exponential notation with 15 digits after the decimal point. Which formula produces a better approximation of x? 15. Given p(x) = -1878 +14427-672- + 2016z" - 40327 +5376x23 - 460822 +2304.- 512. (a) Let n(x) be the nested form of px). Define p(x), n(x), and (2) = (- 2)". All 3 functions need to able to take in arrays. (b) p(a) = (x) = s(x) algebraically, but makes a difference in computers. Plot all three functions on the interval [1.92, 2.08) (with 0.001 increment). You need to place all 3 plots in a 1 x 3 grid. Be sure to give a title to each subplot to indicate which is which (c) Explain the difference in three plots in (b). 1. Bisection and Newton comparison. (a) Use the Bisection method to do Example 2.1, with the stopping criteria Pn+1 - Pul Sle 5, and initial interval a = 0, b) = 1. How many iterations was run? (meaning what is the value when Pn+1-Pal Cle-5 is reached?) How is this compared to the theoretical value in (2.1)? (b) Use the Newton's method to do Example 2.1, with the stopping criteria n+1- Sle 5, and initial value o = 1. How many iterations was run? 2. Newton's method fails for finding a root of y = -2-1 with 20 = 0. Print the first 6 approximations to illustrate this. Other Exercises

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

Database Systems For Advanced Applications 17th International Conference Dasfaa 2012 Busan South Korea April 2012 Proceedings Part 1 Lncs 7238

Authors: Sang-goo Lee ,Zhiyong Peng ,Xiaofang Zhou ,Yang-Sae Moon ,Rainer Unland ,Jaesoo Yoo

2012 Edition

364229037X, 978-3642290374

More Books

Students also viewed these Databases questions