Answer:
f(x) = 2*cos(4*x) + 4
Explanation:
This is obviusly a sinusoidal function, which can be written as:
f(x) = A*cos( w*x ) + M
Where:
A = amplitude
w = angular frequency
M = midline.
Remember that the maximum of a cosine
cos(x) = 1, when x = (2*n)*pi (for any integer n)
And the minimum is at:
cos(x) = -1, when x = (2*m + 1)*pi (for any integer m)
Whit this in mind, we know that we have a maximum when:
x = pi
then we want:
w*pi = (2*n)*pi
and a minimum at:
x = -3*pi/4
Then we want
w*(-3*pi/4) = (2*m + 1)*pi
In the minimum case, we have a "4" in the denominator that is kinda unfortunate, so we woud want to take w = 4 in order to remove it, and this will work really well for wath we want, because:
w*pi = 4*pi = (2*2)*pi (here we have n = 2)
w*(-3*pi/4) = 4*(-3*pi/4) = -3*pi = (2*-2 + 1)*pi (here we have m = -2)
Then we can take w = 4.
So the function is something like:
f(x) = A*cos(4*x) + M
The amplitude is equal to half of the difference between the maximum and the minimum values of y.
The maximum is:
y = 6
the minimum is:
y = 2
Half of the difference is:
A = (6 - 2)/2 = 2
A = 2
Then our function is:
f(x) = 2*cos(4*x) + M
The value of the midline is equal to the maximum minus the value of the amplitude (or the minimum plus the value of the amplitude)
M = Maximum - A = 6 - 2 = 4
M = Minimum + A = 2 + 2 = 4
Then the function is:
f(x) = 2*cos(4*x) + 4