(Indicated at 29EUR from what I can see).
There's cheaper if you go by regional trains - 29EUR is for the headline IC service, but it can be done for around 10 Euro.
The only caveat: if you have a visa for Poland but not for Germany, ie you are from a country that doesn't have Schengen visa waiver rights: in this case, sticking to just Poland might be worth it or necessary.
Doesn't apply anymore - if you hold a valid long term visa for one Schengen country, then you can transit through other Schengen countries for up to 5 days.