Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. [Sequence] Consider a sequence {an}nez+ satisfying the following conditions: a = 1 an = 1+ + for n > 2 and n e Z+

image text in transcribed
image text in transcribed
image text in transcribed
2. [Sequence] Consider a sequence {an}nez+ satisfying the following conditions: a = 1 an = 1+ + for n > 2 and n e Z+ An-1 2.1. [Golden ratio) The above sequence converges to a, how do you derive the value of a using the sequence? (@3%) 2.2. [Python] Write a Python code using for loop to print an given the input n. (@4%) 2.3. [Python] Write a Python function called seq1) that outputs an given the input n. (@4%) 2.4. [Mathematics] In mathematics, we define a sequence {an} converges to a as follows: For all e > 0, there exists a positive integer N such that for all n > N,lan - al <. consider the following python code: k="1" epsilon="0.0001" while absolute a>= epsilon: #a is the value from 2.1. print (seq1(k), k) #segi() is the function from 2.3. k += 1 print (k) Please write down the output. (Up to 6 decimal points) (@6%) 2.5. [Mathematics] The following is the plot of two functions, f (x) = 1+ and g(x) = x, can you illustrate the sequence {an} using the plot below? Please draw your illustration in answer book. (@3%) f(x)=1+1/x e(x). 2.6. (Python] Consider the following sequence: a >0 1 an = 1+ for n 2 and n e Z+ An-1 By convergent sequence definition in 2.4., we define a function iteration_fn(an, n, epsilon) where an, n corresponds to the values of an, n respectively, epsilon corresponds a value . Please complete the function below and write the output. (Up to 6 decimal points) (@8%) def iteration_fn (an, n, epsilon) : conv = a #conv equals the convergence value a if return an, n, absolute (an - conv) else: print (an, n, absolute (an - conv)) n += 1 return print (iteration_fn (0.5, 1, 0.001)) #a is the value from 2.1. 2.7. According to 2.5. and 2.6., explain your observation of the sequence: (@2%) a> 0 an = 1 + forn 2 2 and n Z+ an-1 2. [Sequence] Consider a sequence {an}nez+ satisfying the following conditions: a = 1 an = 1+ + for n > 2 and n e Z+ An-1 2.1. [Golden ratio) The above sequence converges to a, how do you derive the value of a using the sequence? (@3%) 2.2. [Python] Write a Python code using for loop to print an given the input n. (@4%) 2.3. [Python] Write a Python function called seq1) that outputs an given the input n. (@4%) 2.4. [Mathematics] In mathematics, we define a sequence {an} converges to a as follows: For all e > 0, there exists a positive integer N such that for all n > N,lan - al <. consider the following python code: k="1" epsilon="0.0001" while absolute a>= epsilon: #a is the value from 2.1. print (seq1(k), k) #segi() is the function from 2.3. k += 1 print (k) Please write down the output. (Up to 6 decimal points) (@6%) 2.5. [Mathematics] The following is the plot of two functions, f (x) = 1+ and g(x) = x, can you illustrate the sequence {an} using the plot below? Please draw your illustration in answer book. (@3%) f(x)=1+1/x e(x). 2.6. (Python] Consider the following sequence: a >0 1 an = 1+ for n 2 and n e Z+ An-1 By convergent sequence definition in 2.4., we define a function iteration_fn(an, n, epsilon) where an, n corresponds to the values of an, n respectively, epsilon corresponds a value . Please complete the function below and write the output. (Up to 6 decimal points) (@8%) def iteration_fn (an, n, epsilon) : conv = a #conv equals the convergence value a if return an, n, absolute (an - conv) else: print (an, n, absolute (an - conv)) n += 1 return print (iteration_fn (0.5, 1, 0.001)) #a is the value from 2.1. 2.7. According to 2.5. and 2.6., explain your observation of the sequence: (@2%) a> 0 an = 1 + forn 2 2 and n Z+ an-1

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions