Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SOLVE A public member function that displays the array working Array to a stream

ID: 3346194 • Letter: S

Question


SOLVE

A public member function that displays the array working Array to a stream that it takes as input. Note that working Array does not change! Two public accessory functions that returns the number of swaps and comparisons when a sorting happens. The main () function should create an object of type Array Sorter, and then present the user with a menu from which the user can select both which sort to do. After inputting that choice, your program will invoke the matador function to populate working Array.. sort that array using the user's choice, and then display the sorted values and the number of comparisons and swaps were needed to accomplish the sort. The program then repeats prompting the user for which sort algorithm and direction to use to sort the numbers again, with the option to quit when he she wants to do so. Here are some sample input files. The first one is sufficiently small, so would be appropriate for testing. We don't recommend using the other files until you know your program is fully functional-they are appropriate for thinking about how the efficiency of the algorithms changes on different input files: sortfilel, txt sortfile2.txt Include comments for any parts of the code that is non-intuitive to let us know what that portion does. Make sure that each member function has parameters that make sense. If a function does not need a parameter, do not include one. Use meaningful variable names of the appropriate types. i,e. thing is not a good name, but array Size is.

Explanation / Answer

Compute the 9th derivative of:
arctan((x^3)/2) at x=0
f^9(0)=?

As I describe this, keep the formula for a Maclaurin series handy. You wrote

arctan(x) =x-x^3/3 + x^5/5 +........

If you compare this with the formula for Maclaurin series, you'll see that this tells you that, at x = 0,

first derivative of arctan(x) = 1 ,
second derivative = 0 ,
third derivative = -1/3 ,
fourth derivative = 0 ,
fifth derivative = +1/5 , etc.

What you have is f(x) = arctan[ (x^3)/2 ] = arctan [ u(x) ] , which is a composite function. So we use the Chain Rule to find

f'(x) = [ d (arctan u) / du ]