Why do we use capacitors and not batteries in defibrillator? Why do we use capacitors in defibrillators and not batteries?
I know that capacitors are used to store electrical energy but isn't the function of a battery just the same?
Moreover, I know that batteries are used to make capacitors work in a defibrillator, but isn't a battery just enough to make it work? Why is a capacitor so fundamental in a defibrillator? 
And the last thing that makes my doubts stronger is that a battery normally has a much higher voltage compared to a capacitor.
 A: Batteries usually use electro-chemical reactions to store energy. These reactions have a limit to how fast they can transfer that energy. For example, a typical lead acid car battery can only draw so much energy; after a certain point it begins to break down, producing hydrogen gas which then can ignite with free oxygen in the air. An analogy would be a gravity battery, like a large dam of water at a higher gravitational energy level. Opening a door would allow water to flow and could maybe run a circuit at some voltage for a month straight. However it might never be able to go past that voltage level if it is much higher because there is no way to harness all the energy - like if the dam just completely opened all at once. So there are clear limits to rate it can be discharged.
Capacitors can better store large potential differences; however they cannot often sustain the voltages for extended periods of time. This is because capacitors simply use an electric field and various geometry to store energy.
So if you need only a short burst of energy, you can reduce the size of battery required by using a capacitor. Basically the capacitor stores up a higher voltage than the battery terminals, and then releases it. A much larger battery would otherwise be required, but with the larger battery you would get a more sustained voltage than a capacitor. Look up the "Amp hours" of a battery. The battery contains more energy than the capacitor, yet the capacitor can out put a higher voltage. Also see specific energy or energy density of various types of batteries and then for capacitors.
Also due to the capacitor's limited energy, perhaps this prevents the possibility of some kind of stuck circuit where energy is allowed to continuously flow. Maybe more complex circuitry would be needed with a battery to get a short voltage spike, closing then opening quickly. You can get sparks and noise etc. With the capacitor once the circuit is closed it can be left closed and the capacitor will just dump its potential and that's it.
A: The defibrillator requires a high voltage to do its job. ordinarily this would require a very large battery stack (hundreds of individual cells) to achieve the voltage requirement. Instead, defibrillators use a smaller battery pack to drive a chopper circuit that steps the voltage up through a transformer, after which the result is rectified, filtered, and stored in a low-leakage capacitor bank. this minimizes the weight and bulk of the machine as well as its cost.  
A: The short answer is that although capacitors do not hold as much total energy as a battery the same size, they can release energy faster than batteries can.
In a portable defibrillator (or a taser!) a battery charges a capacitor, then the capacitor releases the the charge into the subject much, much faster than it could have been supplied directly from the battery.
The very large capacitors used in defibrillators can (briefly) supply 2000 to 6000 volts.
A: The ability to deliver energy relatively quickly is basically the distinction between a "capacitor" and a "rechargeable battery".  This isn't a physics factoid so much as just what the words mean.
For example, in the below plot:$
{\require{color}}
{\definecolor{capacitor}{RGB}{255,10,10}}
{\definecolor{lightCapacitor}{RGB}{255,131,131}}
{\definecolor{battery}{RGB}{186,138,20}}
{\definecolor{lightBattery}{RGB}{219,194,133}}
%
%\text{For example, in the below plot:} \\
\hskip{1em}
\lower{2.5ex}{
\begin{array}{l}
{\rlap{\color{capacitor}{\rule{15px}{15px}}}}
{\rlap{\raise{4px}{\hskip{4px} \color{lightCapacitor}{\rule{7px}{7px}}}}}
\hskip{21px}
{\raise{2px}{
{\color{capacitor}{\textbf{Li-ion capacitor}}}
~\text{has a higher discharge rate; though}
}}
\\
{\rlap{\color{battery}{\rule{15px}{15px}}}}
{\rlap{\raise{4px}{\hskip{4px} \color{lightBattery}{\rule{7px}{7px}}}}}
\hskip{21px}
{\raise{2px}{{\color{battery}{\textbf{Li-ion battery}}}
~\text{can store more energy.}}}
\end{array}
}
$$\hskip{50px}$$
{\require{cancel}}
{\def\place#1#2#3{\smash{\rlap{\hskip{#1px}\raise{#2px}{#3}}}}}
\place{305}{219}{\color{capacitor}{\bcancel{\phantom{\rule{97px}{25px}}}}}
\place{377}{191}{\color{battery}{\cancel{\phantom{\rule{25px}{7px}}}}}
$
Note that power has units of $\left[\frac{\text{energy}}{\text{time}}\right]$.  This is, power is the rate at which energy's delivered.
Conceptually, there seems to be a conflict-of-interest between storing energy and being able to rapidly lose it (i.e., deliver power).  As shown above, particular technologies tend to have a trade-off between their ability to store and deliver energy.
This conflict may be seen as similar to that with thermodynamic reversibility in which slower processes tend to have higher efficiencies.  For example, useful heating has the highest thermodynamic efficiencies when it flows down arbitrarily small temperature gradients, though the smaller the temperature gradient, the longer it takes for a finite amount of heat to move across it.

In thermodynamics, a reversible process is a process whose direction can be "reversed" by inducing infinitesimal changes to some property of the system via its surroundings, with no increase in entropy. Throughout the entire reversible process, the system is in thermodynamic equilibrium with its surroundings. Since it would take an infinite amount of time for the reversible process to finish, perfectly reversible processes are impossible.
–"Reversible process (thermodynamics)", Wikipedia [formatting and references omitted]

It's actually kinda fun to think about the information-theoretic aspects about why this is.  For example, you've probably heard about how entropy is a measure of disorder; it's perhaps more properly seen as a qualification of how states in an ensemble of possible states could flow.  When there're more unbound flow pathways, things can move faster; however, that also means that entropy grows, leaking useful work.
Also, that leaking of useful work comes out as thermal energy (heat), which can be pretty problematic when it comes to high-voltage electronics.
As a historical note, capacitors used to be more physical mechanisms for storing energy while batteries used to be more chemical mechanisms for storing energy (with some funny exceptions).  This continues to often be true today, though that's perhaps better seen as historical happenstance than as a basic concept to keep track of.  Stuff like supercapacitors and other technologies'll continue to blur the line, since there's really no reason for a well-engineered system to be limited to a single physical approach.
As a final note, a defibrillators could use batteries for their principal energy storage, using them to charge capacitors that could rapidly discharge.  This design pattern's called transient load decoupling, where the transient load is the electrical demand of the shock and the decoupling is how the battery has less direct exposure to it.
A: One aspect that hasn't been covered in the other answer is what is really needed to make a defibrillator work reliably and safely.
Defibrillating a heart isn't simply "OK, let's electrocute the patient"! In order not to damage the heart, a very careful application of energy is needed. That means that the defibrillator must create a "well behaved" electrical pulse, having some well defined electrical characteristics, which must also be adjustable according to the specific patient.
All this requires a fair amount of electronics. It is much easier, from an electronics design POV, to build a circuit that charges some capacitors to a well defined (high) voltage and then discharge them in a controlled manner into the body, all this using the energy stored in "standard" low voltage batteries which also power the entire circuitry. 
A: While batteries can store plenty of energy, they aren't able to release it quickly enough to deliver the necessary shock for defibrillation.  Since capacitors can discharge far more rapidly, they're used instead after being charged up to high voltage $\left(\approx3000\mathrm{V}\right)$.  By selecting the correct capacitor size, the strength of the shock can be controlled.
This article provides more information on how defibrillators work. 
 Basically, the capacitors cause a large voltage differential between the electrodes, causing a powerful shock when those electrodes come into contact with the body.
