Write a cosine function that has a midline of y=2, an amplitude of 4 and a period of 2/7. f(x)=

The general form of a cosine function is given by f(x) = A*cos(Bx+C) + D, where A is the amplitude, B is the number of periods in the interval [0, 2π/B], C is the phase shift, and D is the midline.

In this case, the midline is y = 2, so D = 2.

The amplitude is 4, so A = 4.

The period is 2/7, so B = 2π/(2/7) = 7π.

Therefore, the cosine function with the given midline, amplitude, and period is:

f(x) = 4*cos(7πx) + 2