Given that the minimum value of the function f (x) = x ^ 2-4x + 2 in the interval [T, T-2] is g (T), find the expression of G (T)

Given that the minimum value of the function f (x) = x ^ 2-4x + 2 in the interval [T, T-2] is g (T), find the expression of G (T)

The interval should be [T-2, t] - the small one is ahead
F (x) = (X-2) ^ 2-2, decreasing from negative infinity to 2, increasing from 2 to positive infinity
So when t ≤ 2, G (T) = t,
When T-2 ≥ 2, i.e. t ≥ 4, G (T) = T-2
When 2