Question: can you make an electromagnet with ac current

Answer: Yes, The energy loss per cycle of the AC current is constant for each of these processes, so the power loss increases linearly with frequency.