SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
AMTH250                                                 Assignment 5
                          Due: 10th September



Question 1 [2 marks]
   Find all the zeros of the function

                            f (x) = sin(10x) − x

Question 2 [2 marks]
   Let 0 < x1 < x2 < x3 < . . . denote the positive solutions of

                                x = tan(x)

Find x1000000 . Explain the method you used.
Question 3 [4 marks]
  For the equation
                         f (x) = x2 − 3x + 2 = 0,
each of the following functions yields an equivalent fixed point problem:

                        g1 (x) = (x2 + 2)/3
                                 √
                        g2 (x) = 3x − 2
                        g3 (x) = 3 − 2/x
                        g4 (x) = (x2 − 2)/(2x − 3).

   (a) Analyze the convergence properties of each of the corresponding fixed
point iteration schemes for the root x = 2 by considering |gi (2)|.
    (b) Confirm your analysis by implementing each of the schemes and veri-
fying its convergence (or lack thereof) and approximate rate of convergence.




                                        1
Question 4 [3 marks]
   On a computer with no functional unit for floating point division, one
might instead use multiplication by the reciprocal of the divisor.
   (a) Apply Newton’s method to produce an iterative scheme for approx-
imating the reciprocal of a number y > 0 (i.e., to solve the equation
                                                1
                                  f (x) = x −     = 0,
                                                y

given y). Considering the intended application your formula should not
contain any divisions!
   (b) Apply your method with y = 2, i.e. to compute 1/2.

  (i) Can you find an initial guess for which your method diverges?

 (ii) Can you find an initial guess for which your method converges to a
      point other than 1/2?

(iii) For what range of initial guesses does your method converge to 1/2?

Question 5 [3 marks]
   (a) Let
                                   1                 1
                 f (x) =                    +
                           (x − 0.3)2 + 0.01 (x − 0.9)2 + 0.04
Find the (global) maximum of f (x) using

  (i) Golden section search.

 (ii) Successive parabolic interpolation.

(iii) fminbnd.

   (b) Estimate the accuracy of the maximum x∗ for your best estimate
from part (a). Explain your reasoning.
Question 6 [2 marks]
    A water hose with initial water velocity v is aimed at an angle α with
respect to the ground to hit a target of height h at distance x. The angle α
and distance x are related by
                              g
                                       x2 − tan(α)x + h = 0
                       2v 2 cos2 (α)

where g = 9.80665 m/sec2 is the acceleration due to gravity.
   If v = 20 m/sec and h = 13 m find the maximum distance x at which
the target can be reached.


                                           2
Notes on the Assignment


Question 1
First plot the function!

Question 3
It is helpful to write a function to perform the iterations:

function x = iterate (g, x0, n)
  x = zeros(1,n+1);
  x(1) = x0;
  for i = 1:n
    x(i+1) = g(x(i));
  end
endfunction

    Convergence can then be analysed by examining the error and the ratio
of the errors of successive terms using something like:

octave:> x2 = iterate(g2, 1.1, 100)
octave:> err2 = abs(x2-2)
octave:> ratio2 = err2(2:101)./err2(1:100)

Questions 4
You may need to try a couple of ways of rewriting the equation until you
find one in which Newton’s method does not use division.

Questions 5
Remember that finding the maximum of f (x) is the same as finding the
minimum of −f (x).

Question 6
The problem is to find the maximum of x as a function of α. Note that x is
given implicitly as the root (we want the larger one) of a quadratic whose
coefficients depend on α. To construct the function x(α) in Octave you may
find it easier to use roots rather than the quadratic formula to solve the
quadratic for x.




                                      3

Weitere ähnliche Inhalte

Was ist angesagt?

Bwm21403 mathematics iv assignments
Bwm21403 mathematics iv assignmentsBwm21403 mathematics iv assignments
Bwm21403 mathematics iv assignmentsAzalina Harun
 
Lesson 8 the definite integrals
Lesson 8 the definite integralsLesson 8 the definite integrals
Lesson 8 the definite integralsLawrence De Vera
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite IntegralMatthew Leingang
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Matthew Leingang
 
The Definite Integral
The Definite IntegralThe Definite Integral
The Definite IntegralSilvius
 
Applications of maxima and minima
Applications of maxima and minimaApplications of maxima and minima
Applications of maxima and minimarouwejan
 
LApreC2010-106matrixaprtakehome_4r
LApreC2010-106matrixaprtakehome_4rLApreC2010-106matrixaprtakehome_4r
LApreC2010-106matrixaprtakehome_4rA Jorge Garcia
 
Application of derivatives 2 maxima and minima
Application of derivatives 2  maxima and minimaApplication of derivatives 2  maxima and minima
Application of derivatives 2 maxima and minimasudersana viswanathan
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivativesdivaprincess09
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsemGopi Saiteja
 
Lesson 27: Evaluating Definite Integrals
Lesson 27: Evaluating Definite IntegralsLesson 27: Evaluating Definite Integrals
Lesson 27: Evaluating Definite IntegralsMatthew Leingang
 
Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)Osama Zahid
 
Midterm 1
Midterm 1Midterm 1
Midterm 1IIUM
 
Exponential and logarithmic functions
Exponential and logarithmic functionsExponential and logarithmic functions
Exponential and logarithmic functionsNjabulo Nkabinde
 
Application of differentiation
Application of differentiationApplication of differentiation
Application of differentiationLily Maryati
 
Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment HelpEdu Assignment Help
 
application of partial differentiation
application of partial differentiationapplication of partial differentiation
application of partial differentiationeteaching
 

Was ist angesagt? (20)

Bwm21403 mathematics iv assignments
Bwm21403 mathematics iv assignmentsBwm21403 mathematics iv assignments
Bwm21403 mathematics iv assignments
 
Lesson 8 the definite integrals
Lesson 8 the definite integralsLesson 8 the definite integrals
Lesson 8 the definite integrals
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite Integral
 
Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)Lesson 25: Evaluating Definite Integrals (slides)
Lesson 25: Evaluating Definite Integrals (slides)
 
The Definite Integral
The Definite IntegralThe Definite Integral
The Definite Integral
 
Applications of maxima and minima
Applications of maxima and minimaApplications of maxima and minima
Applications of maxima and minima
 
LApreC2010-106matrixaprtakehome_4r
LApreC2010-106matrixaprtakehome_4rLApreC2010-106matrixaprtakehome_4r
LApreC2010-106matrixaprtakehome_4r
 
Application of derivatives 2 maxima and minima
Application of derivatives 2  maxima and minimaApplication of derivatives 2  maxima and minima
Application of derivatives 2 maxima and minima
 
Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuity
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivatives
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Integration
IntegrationIntegration
Integration
 
Lesson 27: Evaluating Definite Integrals
Lesson 27: Evaluating Definite IntegralsLesson 27: Evaluating Definite Integrals
Lesson 27: Evaluating Definite Integrals
 
Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)Math lecture 10 (Introduction to Integration)
Math lecture 10 (Introduction to Integration)
 
Midterm 1
Midterm 1Midterm 1
Midterm 1
 
Exponential and logarithmic functions
Exponential and logarithmic functionsExponential and logarithmic functions
Exponential and logarithmic functions
 
Application of differentiation
Application of differentiationApplication of differentiation
Application of differentiation
 
Physical Chemistry Assignment Help
Physical Chemistry Assignment HelpPhysical Chemistry Assignment Help
Physical Chemistry Assignment Help
 
application of partial differentiation
application of partial differentiationapplication of partial differentiation
application of partial differentiation
 
Application of derivative
Application of derivativeApplication of derivative
Application of derivative
 

Ähnlich wie Assignment5

Algebra lesson 4.2 zeroes of quadratic functions
Algebra lesson 4.2 zeroes of quadratic functionsAlgebra lesson 4.2 zeroes of quadratic functions
Algebra lesson 4.2 zeroes of quadratic functionspipamutuc
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)asghar123456
 
Review for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docxReview for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docxjoellemurphey
 
Module 3 quadratic functions
Module 3   quadratic functionsModule 3   quadratic functions
Module 3 quadratic functionsdionesioable
 
Developing Expert Voices
Developing Expert VoicesDeveloping Expert Voices
Developing Expert Voicessuzanne
 
Solving quadratic equations[1]
Solving quadratic equations[1]Solving quadratic equations[1]
Solving quadratic equations[1]RobinFilter
 
Solving quadratic equations
Solving quadratic equationsSolving quadratic equations
Solving quadratic equationssrobbins4
 
Chapter 1 (math 1)
Chapter 1 (math 1)Chapter 1 (math 1)
Chapter 1 (math 1)Amr Mohamed
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Matthew Leingang
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Mel Anthony Pepito
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxgilpinleeanna
 

Ähnlich wie Assignment5 (20)

Algebra lesson 4.2 zeroes of quadratic functions
Algebra lesson 4.2 zeroes of quadratic functionsAlgebra lesson 4.2 zeroes of quadratic functions
Algebra lesson 4.2 zeroes of quadratic functions
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
 
Final exam mariluz 1
Final exam mariluz 1Final exam mariluz 1
Final exam mariluz 1
 
Assignment6
Assignment6Assignment6
Assignment6
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
C3 January 2012 QP
C3 January 2012 QPC3 January 2012 QP
C3 January 2012 QP
 
Review for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docxReview for the Third Midterm of Math 150 B 11242014Probl.docx
Review for the Third Midterm of Math 150 B 11242014Probl.docx
 
2 5 zeros of poly fn
2 5 zeros of poly fn2 5 zeros of poly fn
2 5 zeros of poly fn
 
Module 3 quadratic functions
Module 3   quadratic functionsModule 3   quadratic functions
Module 3 quadratic functions
 
Developing Expert Voices
Developing Expert VoicesDeveloping Expert Voices
Developing Expert Voices
 
Solving quadratic equations[1]
Solving quadratic equations[1]Solving quadratic equations[1]
Solving quadratic equations[1]
 
Solving quadratic equations
Solving quadratic equationsSolving quadratic equations
Solving quadratic equations
 
10.4
10.410.4
10.4
 
Chapter 1 (math 1)
Chapter 1 (math 1)Chapter 1 (math 1)
Chapter 1 (math 1)
 
Numerical method
Numerical methodNumerical method
Numerical method
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)
 
Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)Lesson 1: Functions and their representations (slides)
Lesson 1: Functions and their representations (slides)
 
Statistical Physics Assignment Help
Statistical Physics Assignment HelpStatistical Physics Assignment Help
Statistical Physics Assignment Help
 
MTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docxMTH 2001 Project 2Instructions• Each group must choos.docx
MTH 2001 Project 2Instructions• Each group must choos.docx
 
Function
FunctionFunction
Function
 

Mehr von asghar123456

Answers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsAnswers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsasghar123456
 
Answers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsAnswers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsasghar123456
 
Answers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsAnswers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsasghar123456
 
Answers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsAnswers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsasghar123456
 
assignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsassignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsasghar123456
 
Buckling test engt110
Buckling test engt110Buckling test engt110
Buckling test engt110asghar123456
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)asghar123456
 
Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)asghar123456
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)asghar123456
 

Mehr von asghar123456 (9)

Answers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanicsAnswers assignment 5 open channel hydraulics-fluid mechanics
Answers assignment 5 open channel hydraulics-fluid mechanics
 
Answers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanicsAnswers assignment 4 real fluids-fluid mechanics
Answers assignment 4 real fluids-fluid mechanics
 
Answers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanicsAnswers assignment 3 integral methods-fluid mechanics
Answers assignment 3 integral methods-fluid mechanics
 
Answers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanicsAnswers assignment 2 fluid statics-fluid mechanics
Answers assignment 2 fluid statics-fluid mechanics
 
assignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanicsassignment 1 properties of fluids-Fluid mechanics
assignment 1 properties of fluids-Fluid mechanics
 
Buckling test engt110
Buckling test engt110Buckling test engt110
Buckling test engt110
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)
 
Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 

Kürzlich hochgeladen

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Kürzlich hochgeladen (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Assignment5

  • 1. AMTH250 Assignment 5 Due: 10th September Question 1 [2 marks] Find all the zeros of the function f (x) = sin(10x) − x Question 2 [2 marks] Let 0 < x1 < x2 < x3 < . . . denote the positive solutions of x = tan(x) Find x1000000 . Explain the method you used. Question 3 [4 marks] For the equation f (x) = x2 − 3x + 2 = 0, each of the following functions yields an equivalent fixed point problem: g1 (x) = (x2 + 2)/3 √ g2 (x) = 3x − 2 g3 (x) = 3 − 2/x g4 (x) = (x2 − 2)/(2x − 3). (a) Analyze the convergence properties of each of the corresponding fixed point iteration schemes for the root x = 2 by considering |gi (2)|. (b) Confirm your analysis by implementing each of the schemes and veri- fying its convergence (or lack thereof) and approximate rate of convergence. 1
  • 2. Question 4 [3 marks] On a computer with no functional unit for floating point division, one might instead use multiplication by the reciprocal of the divisor. (a) Apply Newton’s method to produce an iterative scheme for approx- imating the reciprocal of a number y > 0 (i.e., to solve the equation 1 f (x) = x − = 0, y given y). Considering the intended application your formula should not contain any divisions! (b) Apply your method with y = 2, i.e. to compute 1/2. (i) Can you find an initial guess for which your method diverges? (ii) Can you find an initial guess for which your method converges to a point other than 1/2? (iii) For what range of initial guesses does your method converge to 1/2? Question 5 [3 marks] (a) Let 1 1 f (x) = + (x − 0.3)2 + 0.01 (x − 0.9)2 + 0.04 Find the (global) maximum of f (x) using (i) Golden section search. (ii) Successive parabolic interpolation. (iii) fminbnd. (b) Estimate the accuracy of the maximum x∗ for your best estimate from part (a). Explain your reasoning. Question 6 [2 marks] A water hose with initial water velocity v is aimed at an angle α with respect to the ground to hit a target of height h at distance x. The angle α and distance x are related by g x2 − tan(α)x + h = 0 2v 2 cos2 (α) where g = 9.80665 m/sec2 is the acceleration due to gravity. If v = 20 m/sec and h = 13 m find the maximum distance x at which the target can be reached. 2
  • 3. Notes on the Assignment Question 1 First plot the function! Question 3 It is helpful to write a function to perform the iterations: function x = iterate (g, x0, n) x = zeros(1,n+1); x(1) = x0; for i = 1:n x(i+1) = g(x(i)); end endfunction Convergence can then be analysed by examining the error and the ratio of the errors of successive terms using something like: octave:> x2 = iterate(g2, 1.1, 100) octave:> err2 = abs(x2-2) octave:> ratio2 = err2(2:101)./err2(1:100) Questions 4 You may need to try a couple of ways of rewriting the equation until you find one in which Newton’s method does not use division. Questions 5 Remember that finding the maximum of f (x) is the same as finding the minimum of −f (x). Question 6 The problem is to find the maximum of x as a function of α. Note that x is given implicitly as the root (we want the larger one) of a quadratic whose coefficients depend on α. To construct the function x(α) in Octave you may find it easier to use roots rather than the quadratic formula to solve the quadratic for x. 3