The "function"), is a special function that often occurs The definition of art can be found here, but for Suppose we want The Newton-Raphoon Method does not behave well with functions nerfer, 8.3, -5., 5., 1-4 i abans (4.1 print"Correct ele nerf -2.3, 4.77, 5.4, 54, le frue umber You can import with the

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
The "enor function"), is a special function that often occurs in the fields of probability and statistics, looks
10
55
3 **
-0.3
-10
art
The definition of erfix) can be found here, but for now that is unimportant. There is a function in the Python matherary that directly evaluates the error function for any single, real-valued number. You can import it with the
Ine
from math inport erf
Suppose we want to find the root of the function
fo))+J
The Newton-Raphson Method does not behave well with functions of this sort (see the lecture notes), so we will need to use the section Method
You are to unite a function
relatina, eta, left, right, taterace which computes and returns that root aahe (n) and bets (3) are the constants defining the function for) above,left and right
define a range known to contain the root, and tolerance is the maxim error that can be tolerated for the root, defined as in the previous questions
Notes:
You should use your bisection retider function from the previous question
You might find a labda expression useful
For example
ans erf zero2, 8.3, -5.0, 5.0, 16-9)
if abscans
(-0.13172922)11-1
elser
Correct!
print("Correct
print("wrong answer")
printour answer vast (ans)")
ans erf zerel-2.3, 8.77, -5.0, 5.0, 1e-9) True
Answer (penalty regi 10, 20
Transcribed Image Text:The "enor function"), is a special function that often occurs in the fields of probability and statistics, looks 10 55 3 ** -0.3 -10 art The definition of erfix) can be found here, but for now that is unimportant. There is a function in the Python matherary that directly evaluates the error function for any single, real-valued number. You can import it with the Ine from math inport erf Suppose we want to find the root of the function fo))+J The Newton-Raphson Method does not behave well with functions of this sort (see the lecture notes), so we will need to use the section Method You are to unite a function relatina, eta, left, right, taterace which computes and returns that root aahe (n) and bets (3) are the constants defining the function for) above,left and right define a range known to contain the root, and tolerance is the maxim error that can be tolerated for the root, defined as in the previous questions Notes: You should use your bisection retider function from the previous question You might find a labda expression useful For example ans erf zero2, 8.3, -5.0, 5.0, 16-9) if abscans (-0.13172922)11-1 elser Correct! print("Correct print("wrong answer") printour answer vast (ans)") ans erf zerel-2.3, 8.77, -5.0, 5.0, 1e-9) True Answer (penalty regi 10, 20
Expert Solution
steps

Step by step

Solved in 6 steps with 3 images

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education