Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 0 7 2 U ASSIGNMENT 2 , 2 0 2 4 Iteration and recursion Due: February 2 nd , 1 7 : 0 0

2072U
ASSIGNMENT 2,2024
Iteration and recursion
Due: February 2nd,17:00. Push the function for Steffenson's iteration for 2(a) and a script for 2(b) to your assignmment repository. Make sure to use the input/output specified in the templates and check the result of the autograder. Typset your solution for question 1 in LaTeX and push botht the .tex and the .pdf file to your repository.
Make sure all files submitted include a comment line with your name and student number, e.g.
# Peter Peterson 100456789
and list the names and student numbers of class mates you collaborated with, if any.
Also, be a good programmer and include comments with a brief description of the functionality, input and output arguments and usage of each function or script. Also, add some comments that explain what steps are taken. Marks will be awarded or subtracted based on the readability and transparency of your code.
A discussion thread for this assignment is available on Slack. Pose your questions there before approaching the lecturer or TA.
Question 1
50 marks
You wish you use bisection for finding a root of the continuous functions below. For each function, use tools from calculus to find a domain (a, b) that contains precisely one root (so that you satisfy the sufficient condition for bisection to converge). if the function has more than one root, select the one closest the to origin.
Note that, while looking at a graph is a good starting point, it is not sufficient.
(a) f(x)=(x 1) cos(x)+1/2
(b) f(x)=x2+1 x3
(c) f(x)= xln(x)2x + x2+1
(d) f(x)=1/(x+1)2+4/(x+2)2-1
(e) f(x)= exp(x3+ x 2)1/10
Question 2
(a) Write a function that implements the following pseudo-code: Input: f, f', x,, N.
Output: x*.
1. Repeat N times:
(a) Set y1= x.
(b) Take one Newton step, starting from y1. Call the result y2.(c) Take one Newton step, starting from y2. Call the result y.(d) Set
50 marks
x = y
(231) Y3-2y2+ Y1
(e) Display |f(x)|.

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

What is meant by dilution of EPS?

Answered: 1 week ago