Write a cosine function that has a midline of y=3, an amplitude of 2 and a period of 1/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 determines the period (period = 2π/B), C is the phase shift, and D is the vertical shift.

Given the information, we have:
Amplitude (A) = 2
Midline (D) = 3

To find B, we use the formula:
period = 2π/B
1/7 = 2π/B
B = 7*2π

Phase shift (C) is not given, so we assume no phase shift. Therefore, C = 0.

Putting everything into the cosine function, we have:
f(x) = 2*cos(7*2π*x - 0) + 3

Simplifying:
f(x) = 2*cos(14π*x) + 3

Therefore, the cosine function is:
f(x) = 2*cos(14π*x) + 3