[SOLVED] EE25745-1 Exercise 1

39.99 $

Category: Tags: , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Numeral-Computation-Part1-uwi0hm.zip (538.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Computer Exercise 1

Compute and plot the values of this polynomial, using each of the two forms, for 101 equally spaced points in the interval[0.995,1.005], i.e., with a spacing of 0.0001.
Your plot should be scaled so that the values for x and for the polynomial use the full ranges of their respective axes. Can you explain this behavior?

2- Write a program to solve the quadratic equation π‘Žπ‘₯2 + 𝑏π‘₯ + 𝑐 = 0 using the standard quadratic formula
βˆ’π‘ Β± βˆšπ‘2 βˆ’ 4π‘Žπ‘
π‘₯ =
2π‘Ž
Or the alternative formula
2𝑐
π‘₯ =
βˆ’π‘ βˆ“ βˆšπ‘2 βˆ’ 4π‘Žπ‘
Your program should accept values for the coefficients a, b, and c as input and produce the two roots of the equation as output. Your program should detect when the roots are imaginary, but need not use complex arithmetic explicitly. You should guard against unnecessary overflow, underflow, and cancellation. When should you use each of the two formulas?
Try to make your program robust when given unusual input values. Any root that is within the range of the floating-point system should be computed accurately, even if the other is out of the range.

1

Test your program using the following values for the coefficients:

6 5 -4
6 Γ— 1030 5 Γ— 1030 βˆ’4 Γ— 1030
0 1 1
1 βˆ’105 1
1 -4 3.999999
a b c
10βˆ’30 βˆ’1030 1030

3- Implement the bisection, Newton, and secant methods for solving nonlinear equations in one dimension, and test your implementations by finding at least one root for each of the following equations. What termination criterion should you use? What convergence rate is achieved in each case?
a) π‘₯3 βˆ’ 2π‘₯ βˆ’ 5 = 0
b) π‘’βˆ’π‘₯ = π‘₯
c) π‘₯𝑠𝑖𝑛(π‘₯) = 1
d) π‘₯3 βˆ’ 3π‘₯2 + 3π‘₯ βˆ’ 1 = 0

2

  • Numeral-Computation-Part1-uwi0hm.zip