Question: Python script please Please use exp(ix) function with complex value. and the script has to be the simplest Compute the value of eix using Python's

Python script please Python script please Please use exp(ix) function with complex value. and thePlease use exp(ix) function with complex value. and the script has to be the simplest

Compute the value of eix using Python's exp function and display the value to 14 decimal places using exponential format. Using the exp function and the value that your code has estimated for eix and calculate the actual tolerance by subtracting the estimated and actual values of both real and imaginary parts. If the tolerance is less than or equal to the acceptable input tolerance for both real and imaginary parts, stop the code and print the result and tolerance in the output. Also, you have to mention how many terms it needs for both real and imaginary part to obtain the entered tolerance. Be careful that you have to use exp function from cmath library for this question because your numbers are complex numbers. Following you can see the output of the proper answer for desired 10-7 tolerance and 10 degrees as x. ------------------------------------------------------------- Enter the acceptable tolerance: 1e-7 Enter an angle in degrees: 10 Angle in radians = 0.174533, angle in degrees = 10.00 Python's value of e^ix(10.00) = 0.984807753012208 + 0.173648177666930 i Approximate value of e^ix(10.00) = 0.984807792249180 + 0.173648178645355 i Number of terms 4 for real part and 4 for imaginary part Tolerance= -0.000000039236972 + -0.000000000978424 i Programmed by Stew Dent. Date: Sun Jan 24 21:03:47 2021 End of processing. Test your program using different values of x including 1and tolerance. Make sure that your code is working properly and there is not any syntax error in it.

The purpose of this question is to write a program that computes the approximate value of ex, where x > 0 and i=v-1. It is obvious that ei* may have real and imaginary parts. ein = 1 + ir + (ix) (ix)" + 2! 3! 4! 5! Your program must get the maximum acceptable tolerance for both real and imaginary part of result in the input and the value of x. Hint: Based on the Euler equation: eit = cos +isin r . Therefore, if you write code for estimating cos (x) and sin (x) separately, it can be easier to estimate eix Compute the value of eix using Python's exp function and display the value to 14 decimal places using exponential format. Using the exp function and the value that your code has estimated for eix and calculate the actual tolerance by subtracting the estimated and actual values of both real and imaginary parts. If the tolerance is less than or equal to the acceptable input tolerance for both real and imaginary parts, stop the code and print the result and tolerance in the output. Also, you have to mention how many terms it needs for both real and imaginary part to obtain the entered tolerance. Be careful that you have to use exp function from cmath library for this question because your numbers are complex numbers. Following you can see the output of the proper answer for desired 10-7 tolerance and 10 degrees as x. Enter the acceptable tolerance: le-7 Enter an angle in degrees: 10 Angle in radians = 0.174533, angle in degrees = 10.00 Python's value of enix(10.00) = 0.984807753012208 + 0.173648177666930 i Approximate value of enix(10.00) = 0.984807792249180 + 0.173648178645355 i Number of terms 4 for real part and 4 for imaginary part Tolerance= -0.000000039236972 + - 0.000000000978424 i Programmed by Stew Dent. Date: Sun Jan 24 21:03:47 2021 End of processing. Test your program using different values of x including land tolerance. Make sure that your code is working properly and there is not any syntax error in it. The purpose of this question is to write a program that computes the approximate value of ex, where x > 0 and i=v-1. It is obvious that ei* may have real and imaginary parts. ein = 1 + ir + (ix) (ix)" + 2! 3! 4! 5! Your program must get the maximum acceptable tolerance for both real and imaginary part of result in the input and the value of x. Hint: Based on the Euler equation: eit = cos +isin r . Therefore, if you write code for estimating cos (x) and sin (x) separately, it can be easier to estimate eix Compute the value of eix using Python's exp function and display the value to 14 decimal places using exponential format. Using the exp function and the value that your code has estimated for eix and calculate the actual tolerance by subtracting the estimated and actual values of both real and imaginary parts. If the tolerance is less than or equal to the acceptable input tolerance for both real and imaginary parts, stop the code and print the result and tolerance in the output. Also, you have to mention how many terms it needs for both real and imaginary part to obtain the entered tolerance. Be careful that you have to use exp function from cmath library for this question because your numbers are complex numbers. Following you can see the output of the proper answer for desired 10-7 tolerance and 10 degrees as x. Enter the acceptable tolerance: le-7 Enter an angle in degrees: 10 Angle in radians = 0.174533, angle in degrees = 10.00 Python's value of enix(10.00) = 0.984807753012208 + 0.173648177666930 i Approximate value of enix(10.00) = 0.984807792249180 + 0.173648178645355 i Number of terms 4 for real part and 4 for imaginary part Tolerance= -0.000000039236972 + - 0.000000000978424 i Programmed by Stew Dent. Date: Sun Jan 24 21:03:47 2021 End of processing. Test your program using different values of x including land tolerance. Make sure that your code is working properly and there is not any syntax error in it

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!