Daniel B. answered 11/13/20
A retired computer professional to teach math, physics
Whether g(x) = A sin(x) + k or g(x) = B cos(x) + k,
just the two given values g(0) and g(π/2) are sufficient to determine the unknown coefficients.
Then we can use the given g(π) for a check.
Case 1: g(x) = A sin(x) + k
Determine k:
g(0) = A sin(0) + k
3.5 = k
Determine A:
g(π/2) = A sin(π/2) + k
0.8 = A + 3.5
A = -2.7
Check:
g(π) = A sin(π) + k
-1.9 = + 3.5
Therefore Case 1 does not work.
Case 2: g(x) = B sin(x) + k
Determine k:
g(π/2) = B cos(π/2) + k
0.8 = k
Determine B:
g(0) = B cos(0) + k
3.5 = B + 0.8
B = 2.7
Check:
g(π) = B cos(π) + k
-1.9 = 2.7 x (-1) + 0.8
-1.9 = -1.9
Therefore g(x) = 2.7 cos(x) + 0.8 fits the data.