so I'm trying to find the gibbs free energy for an ideal gas
$$g = u -Ts + pv $$
Hence,
$$dg = du -Tds -sdT +pdv +vdp = -sdt + vdp$$
The entropy is $$s = c_{p} \ln T -R \ln P + s_{o}$$
Which leads to
$$dg = \int{ dt (-c_{p} \ln T + R \ln P -s_{po})} + \int{vdp}$$
$$ = c_{p}T - c_{p}T \ln T + RT \ln P -s_{o}T + RT \ln P$$
Would anyone know why is there an extra $RT \ln P$ at the end, where did I go wrong?