If the sum of the maximum and minimum values of the function f (x) = a ^ x (a > 0, a ≠ 1) on [0,1] is 3, then a is equal to

If the sum of the maximum and minimum values of the function f (x) = a ^ x (a > 0, a ≠ 1) on [0,1] is 3, then a is equal to

Exponential function is monotone function
So the maximum and minimum are on the boundary
So a ^ 0 + A ^ 1 = 3
1+a=3
a=2