Question

Looking for help on both please Problem 4 (6 points, CCO #1) a) Why does the absolute of the true relative error no longer decrease for N>35 in problem 2? b) Is the dominant (=largest) error when evaluating tan^-1(x) at x=0.9999 using myAtan with N=50 due to round-off error or truncation error (see results of problem 3)? Required submission: handwritten (or printed) answers. Problem 5 (9 points, CCO #1) What is the smallest possible value for N so that y=tan^-1(0.9999) evaluated using myAtan is exact when written as a half precision binary floating point number in engineering notation? Use decimal2binary developed in Module 1 to answer this question. Required submission: handwritten (or printed) answer. printout of any results generated by a script; printout of script (and any potential additional functions not submitted on Matlab Grader) used to solve this problem in the Gradescope submission.

          Looking for help on both please Problem 4 (6 points, CCO #1) a) Why does the absolute of the true relative error no longer decrease for N>35 in problem 2? b) Is the dominant (=largest) error when evaluating tan^-1(x) at x=0.9999 using myAtan with N=50 due to round-off error or truncation error (see results of problem 3)? Required submission: handwritten (or printed) answers. Problem 5 (9 points, CCO #1) What is the smallest possible value for N so that y=tan^-1(0.9999) evaluated using myAtan is exact when written as a half precision binary floating point number in engineering notation? Use decimal2binary developed in Module 1 to answer this question. Required submission: handwritten (or printed) answer. printout of any results generated by a script; printout of script (and any potential additional functions not submitted on Matlab Grader) used to solve this problem in the Gradescope submission.
        
Show more…

Added by Angela G.

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Looking for help on both please Problem 4 (6 points, CCO #1) a) Why does the absolute of the true relative error no longer decrease for N>35 in problem 2? b) Is the dominant (=largest) error when evaluating tan^-1(x) at x=0.9999 using myAtan with N=50 due to round-off error or truncation error (see results of problem 3)? Required submission: handwritten (or printed) answers. Problem 5 (9 points, CCO #1) What is the smallest possible value for N so that y=tan^-1(0.9999) evaluated using myAtan is exact when written as a half precision binary floating point number in engineering notation? Use decimal2binary developed in Module 1 to answer this question. Required submission: handwritten (or printed) answer. printout of any results generated by a script; printout of script (and any potential additional functions not submitted on Matlab Grader) used to solve this problem in the Gradescope submission.
Close icon
Play audio
Feedback
Powered by NumerAI
Ivan Kochetkov Danielle Fairburn
Kathleen Carty verified

Sri K and 66 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
question-2-6-pts-the-initial-value-problem-y-2-cos-ry-y1-2-is-to-be-solved-on-the-interval-13-using-the-forward-euler-method-with-step-h-005-how-many-steps-of-the-method-must-be-taken-to-obt-35819

The initial value problem y' = dy/dx = x^2 cos(xy), y(1) = 2 is to be solved on the interval x ∈ [1, 3] using the forward Euler method with step h = 0.05 How many steps of the method must be taken to obtain the solution at x = 3? Determine the value of the approximate solution at x = 3. Round correct to the fourth decimal place y(3) = (Hint: By default Matlab rounds the answer to the fourth decimal place). The initial value problem [dx/dt; dy/dt] = [0, 1; -1, -2][x; y], x(0) = 1, y(0) = 2 is to be solved on the interval t ∈ [0, 5] using the backward Euler method with step h = 0.1 The iteration update rule for the method is [x_{n+1}; y_{n+1}] = (I - hA)^{-1} [x_n; y_n], where I is a 2 x 2 identity matrix. Determine the approximate values of x(5) = (round to the fourth decimal place) and y(5) = (round to the fourth decimal place). Now use the Matlab solver ode45 to obtain the solution at t = 5: x(5) = (round to the fourth decimal place) and y(5) = (round to the fourth decimal place).

Sri K.

problem-4-25-points-the-hyperbolic-cosine-of-the-argument-given-in-radians-can-be-calculated-by-the-scries-cosh-1-ni-1-2-7-a-write-matlab-finction-mycosh-that-takes-as-input-and-the-number-o-07746

Problem 4 (25 points) The hyperbolic cosine of the argument x given in radians can be calculated by the series cosh(x) = 1 + sum_{n=1}^{inf} x^{2n} / (2n)! = 1 + x^2/2! + x^4/4! + x^6/6! + .... a) Write a Matlab function myCosh that takes as input x and the number of terms N to use to estimate cosh(x), i.e., cosh(x) approx 1 + sum_{n=1}^{N} x^{2n} / (2n)!, and returns the estimate for cosh(x) together with the corresponding true relative error. You may use the Matlab function factorial() to calculate the factorial in the formula. For the true value of cosh(x) use Matlab's build-in function cosh(x). Do not print out any results to screen or do any plotting within the function. b) Use the function to calculate the estimate for cosh(20) and the true relative error for i) N = 5, ii) N = 20, iii) N = 30. c) In a semilogarithmic plot (use semilogy()), plot the absolute of the relative error vs. N for N = 1 ... 40. d) Explain why the absolute of the relative error does not decrease for N > 32. Problem 4 required submission: - Softcopy printout of well commented function you coded included in your Gradescope submission - Softcopy printout of the results of calling your function for b) i)- iii) using format long - Annotated semilogarithmic plot of absolute relative error vs. N for N = 1 ... 40. - Explanation why the absolute of the relative error does not decrease for N > 32. - Upload of your Matlab functions and scripts to the Homework 1 link on Canvas

Sri K.

for-the-function-xexsx-05-ix-x-a-use-matlab-to-plot-the-function-for-values-of-x-in-the-range-2-2-important-notes-include-copy-of-your-matlab-code-in-your-solution-include-the-plot-of-the-fu-91754

Sri K.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,209 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,796 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,112 solutions

*

Transcript

-
00:01 The initial value problem is d .f.
00:10 D .f.
00:11 Equal to xx2...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever