Im having trouble with this problem:

The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula is:

arctan(x) = x - x3/3 + x5/5 - x7/7 + x9/9 - x11/11 + . . .

Write a method called calculateArctan in the class Mymath . The method reads in a double x, and a positive integer k, and prints out the partial sum from the first k terms in this series. Write a main method to test the method calculateArctan.

Sample output

Enter x:

0.5

Enter integer k:

3

The partial sum from the first k terms: 0.4645833333333333

The arctan of 0.5 : 0.4636476090008061

Its due on monday so I need help quick!