Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this question is to calculate the three cubic roots of a complex number. A complex number is of the form a +

image text in transcribed
image text in transcribed
The purpose of this question is to calculate the three cubic roots of a complex number. A complex number is of the form a + ib where i is v-1. The magnitude r of a complex number is Vab. The complex number a + ib can be written as r(cos + i sin ). Therefore a -r cose and b rsin0 and b/a (r sin0)/(r cos0) - tane e- arctan(b/a). The 3 cubic roots of a complex number are computed using the following expression: + i sin There is one root for k 0, a second root for k 1 and a third root for k 2. In addition to finding the cubic roots of a complex number the program must calculate and display the value of the cube of each of the roots to verify that each root is correct. Use input to read in the values for a, b. The type of a and b must be float. The value entered for a must not be zero as that will cause a divide by zero error. When displaying the output be sure to use the correct format codes. See the next page for sample input to and output from the program. Your input and output should match the sample as closely as possible Enter the real part of the complex number: 5. Enter the imaginary part of the complex number: 2. The complex number is (5+2j) rooti (1.7387225818854102+0.221721918013488561) root143 (5+2j) root2 (-1.0613781045181963+1.3949169670396901j) root243 (5.eeeee8e00000001+1.999999999999995j) root3 (-0.6773444773672143-1.616638885053178j) root343 (5.000000000080003+1.9999999999999933j) Programmed by Stew Dent. Date: Sat Jan 12 22:05:11 2019 End of processing. If a-6.75, and b-4.37, then the output from the program should be Enter the real part of the complex number: 6.75 Enter the imaginary part of the complex number: 4.37 The complex number is (6.75+4.37j) rooti (1.9667904755636736+0.38134736621512261) root143(6.750000000080001+4.37j) root2 (-1.3136517445984201+1.5126168326518574j) root243-(6.7580000000000036+4.369999999999995j) root3 (-0.6531387309732538-1.8939641988669795j) root3"3 (6.75000000000000744. 369999999999992j)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions