Question: using python 3 notebook only 4.2 An ellipse is defined by the equation which is solved for y to give a function yx) for the

using python 3 notebook

only 4.2

using python 3 notebook only 4.2 An ellipse is defined by the

An ellipse is defined by the equation which is solved for y to give a function yx) for the ellipse. 4.1 " Define a function that takes x, a, b as input and returns y Make a plot of the full ellipse including all four quadrants using a-2 and b-1. Use a blue, dashed line. 4.2 Calculate the area under a quarter of the ellipse, use the top-right quadrant by approximating the quarter ellipse with vertical rectangles. The side length of each rectangle is Ax, while Ay follows from the formula for the circumference. Make sure that you calculate y for each rectangle for the X value centered in the x direction in each . 1. Make a bar plot of the rectangles and overplot the line of the ellipse to show this situation exactly. Hint: part of each rectangle should be outside the ellipse, and small areas inside the ellipse are not covered 2. Now calculate the area. Do not use a for loop but instead use only vector operations. Verify that you have the right answer by comparing it with the value computed from the formula for the area of the lipse Aellipexab 3. Calculate the difference between the sum of the rectangles and the value from the formula for 10 and 30 rectangles and save these differences in the variables dA10 and dA38. 4. Open a file called ellipse.dat and write two rows with two columns. The columns are the number of rectangles and the differences dA calculated in 3. Use formatted output: 2 digits for the integer, one space. 7 digits for the float with 5 after the decimal point. Close the file check the output and add it to your assignment commit. 5. Comment on the values dA18 and da3e. Why are they different

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!