Can capacitor acts like power supply, in which situations? How related are charge/discharge time of battery and capacitor? Why battery has longer discharge time compared to capacitor? Why we cannot for example use big capacitors in our mobile phones instead of batteries?
Capacitors and (rechargeable) batteries can both be used to store and retrieve electrical energy, and both are used for this purpose. But the way they store electrical energy (charge) is different, which leads to different characteristics and hence different use cases.
A capacitor directly stores charge on what is essentially two plates of conductors. The fact that the charge is stored in conductors makes it readily accessible (low impedance, quick to react to changes), but the fact that its storage is essentially a 2-dimensional pair of plates severely limits the amount of energy that can be stored. (Higher-capacity capacitors use a 2.5-D storage at the expense of much less conducting plates). A capacitor stores charge, which means that when the capacitors discharges (delivers current), its voltage drops (linearly when the current is constant).
A battery stores energy in chemical reactions. This means that energy is stored in a 3D volume, so much more energy can be stored, but as ions don't change their speed as quickly as electrons, a battery can't respond as fast to changes of current as a capacitor. Chemical reactions are never perfectly reversible, so a battery wears out, much quicker than a capacitor. But a chemical reaction has a fixed 'activation voltage', so the voltage of a battery stays (more or less) the same while it is discharged.
Hence batteries and capacitors have different use cases, that seldom overlap. If you need
- high capacity => batteries
- fixed voltage => batteries
- quick response => capacitors
- 'infinite' (component) lifetime => capacitors
In fact batteries are often too slow for electronics, but capacitors would not be able to store enough energy, so in practice you often want
- high capacity + quick response => use batteries + capacitors
Energy density is how much energy can be stored in a given weight of product. Power density is how quickly you can get that energy out. So you can see that aluminum electrolytic caps can deliver orders of magnitude more power than any battery technology on the chart, and the energy stored by batteries is orders of magnitude higher than aluminum electrolytics. Ultracaps are somewhere in between.
The power density of the capacitor is limited by the ESR. Most capacitors can survive a dead short being placed across them (at least once), but the total available current is limited largely (though not entirely) by the interconnections within the capacitor itself.
Suppose our load has a drop-out voltage of two volts. The lithium ion battery will support that load until it's almost completely discharged; a bigger concern is discharging the battery so far that it destroys the battery. The ultracap, however, will drop from 3V to 2V and still have almost half the total charged energy still in the capacitor, unavailable to us because of the drop-out voltage of the phone. So not only is the total energy density of the capacitor much lower than that of the battery, we can't even use all the energy that's there.
So we can't effectively use capacitors in our cell phones because the phone would either last a tenth as long (probably less), or it would be ten times as large (probably more).
Other answers talk about practical use of capacitors for energy storage, but in theory, capacitors and batteries are very different.
An ideal capacitor is a circuit element with the property that the voltage across its terminals is proportional to the integral of the current that flows through the device:
A battery, on the other hand, is a good approximation of a small-valued resistor in series with an ideal voltage source. That is to say, the voltage across a battery's terminals is mostly independent of the current. (except for the small, proportional dip due to the internal resistance.)