Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 . Iterations and Convergence ( a ) Padovan Sequence Like the Fibonacci sequence we learned in the class, the Padovan sequence is a

Problem 3. Iterations and Convergence
(a) Padovan Sequence
Like the Fibonacci sequence we learned in the class, the Padovan sequence is a sequence of integers P(n) defined by the initial values
P(1)=P(2)=P(3)=1,
and the recurrence relation
P(j)=P(j-2)+P(j-3).
We are to calculate the first 100 Padovan numbers. To do so, initialize a 1001 column vector p using matrix. The first three entities are the initial values defined above. Use a for loop to run j from 4 to 100, calculate P(j) and store them in p[j].
Save p in A15. dat using R's command
write.table(..., col.names=FALSE, row.names=FALSE).
(b) Iterative solution for 22
In Classwork 5, we discussed the Newton-Raphson method for finding the numerical value of 22. The Newton-Raphson method converges very quickly (known as 2nd order convergence). Below we try a (much) slower method (1st order convergence).
The iterative equation to be used in this problem is given by
xn=0.1xn-1+2xn-1+0.1
xn will approach 22 when n approaches .
Start from x1=1. Write an R program that finds 22, with a tolerance of 10-6.
Keep track of how many iterations, n_iter, that is needed to achieve the required tolerance. Save ni ter and the corresponding estimated value of 22 as a 12 row vector in A16. dat using the R's command write.table(..., col.names=FALSE, row.names=FALSE).
image text in transcribed

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 And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago