I am unable to find maximum value of function

Seems you have overseen t.

You need either to provide a value inside With[{t=, …}, … or add it to the list of variables {t, t1, t2, …

Robert