Capacitors behave opposite

Why do capacitors behave opposite of inductors and resistors? (Can you figure it out mathematically?)