Recommended Resources:
Dimensional Analysis in Quantum Field Theory:
see http://math.ucr.edu/home/baez/renormalizability.html for how dimensional analysis is used in quantum field theory and also:
Looking at the Lagrangian density in (1), we can easily work out what the units of the constant e, $\mu$, G, etc., are. All terms in the Lagrangian density must have units [mass]$^4$, because length and time have units of inverse mass and the Lagrangian density integrated over spacetime must have no units. From the $m\bar{\Psi}\Psi$ term, we see that the electron field must have units [mass]$^{3/2}$, because $\frac{3}{2}+\frac{3}{2}+1 = 4$. The derivative operator (the rate of change operator) has units of [mass]$^1$, and so the photon field also has units [mass]$^1$. Now we can work out what the units of the coupling constants are. As I said before, the electric charge turns out to be a pure number, to have no units. But then as you add more and more powers of fields, more and more derivatives, you are adding more and more quantities that have units of positive powers of mass, and since the Lagrangian density has to have fixed units of [mass]$^4$, therefore the mass dimensions of the associated coupling constants must get lower and lower, until eventually you come to constants like $\mu$ and G which have negative units of mass. (Specifically, $\mu$ has the units of [mass]$^{-1}$, while G has the units [mass]$^{-2}$.) Such terms in (1) would completely spoil the agreement between theory and experiment for the magnetic moment of the electron, so experimentally we can say that they are not there to a fantastic order of precision, and for many years it seems that this could be explained by saying that such terms must be excluded because they would give infinite results, as in (4).
Of course, that is exactly what we are looking for: a theoretical framework based on quantum mechanics, and a few symmetry principles, in which the specific dynamical principle, the Lagrangian, is only mathematically consistent if it takes one particular form. At the end of the day, we want to have the feeling that "it could not have been any other way".
Towards the final laws of physics by Steven Weinberg
Examples
We search for a velocity, which has units [meters/seconds]. Hence, the solutions must be proportional to $\sqrt{gh}$, because this is the only possible combination with units [meters/seconds]. The full correct solution is indeed $v_f = - 2 \sqrt{gh}$.
This example is from page 4 of Mahajan's "Street-fighting Mathematics" book.
We want to understand the behavior of pendulums. […] [W]e would like to understand why the following relation generally holds for the periods, $\theta$, of pendulums exhibiting small oscillations:
$$ \theta = 2 \pi \sqrt{l/g} . \tag{Eq. 2.1} $$
(Here "l" denotes the length of the rod and "g" is the acceleration due to gravity.)
One usually obtains this equation by solving a differential equation for the pendulum system. The argument can be found near the beginning of just about every elementary text on classical mechanics. In one sense this is an entirely satisfactory account. We have a theory—a well-confirmed theory at that— which through its equations tells us that the relevant features for the behavior of pendulum systems are the gravitational acceleration and the length of the bob. In a moment, we will see how it is possible to derive this relationship without any appeal to the differential equations of motion.
[…]
[S]uppose we are in a state of knowledge where we believe or can make an educated guess that the period of the pendulum's swing depends only on the mass of the bob, the length of the pendulum, and the gravitational acceleration. In other words, we know something about classical mechanics—for instance, we have progressed beyond having to worry about color as a possible variable to be considered.
We have a set of objects that represent units of length, mass, and time. These are standards everyone agrees upon—one gram, for instance, is 1/1000 of the mass of a special standard mass in a vault in the Bureau of Weights and Measures in Paris. Given these standards we will have a system of units for length, mass, and time (where L is the dimension of length, M is the dimension of mass, and T is the dimension of time). For our pendulum problem we have guessed that only the length / of the pendulum, its mass m, and the gravitational acceleration g should be relevant to its period $\theta$. Note that $l$, $m$, and $g$ are numbers holding for a particular choice of a system of units of measurement (e.g., centimeters, grams, and seconds). But in some sense that choice is arbitrary. Dimensional analysis exploits this fundamental fact—namely, that the physics should be invariant across a change of fundamental units of measurement. The dimensions for the quantities involved in our problem are the following:
$$ [\theta] = T; \quad [l] = L; \quad [m]= M; \quad [g]=LT^{-2} . $$
Now, consider the quantity $l/g$. If the unit of length is decreased by a factor of $a$, and the unit of time is decreased by a factor of $b$, then the numerical value of length in the numerator increases by a factor of $a$ and the numerical value of acceleration in the denominator increases by a factor $ab^{-2}$. This implies that the value of the ratio $l/g$ increases by a factor of $b^2$. Hence, the numerical value of $l/g$ increases by a factor of $b$. Since the numerical value for the period, $\theta$, would also increase by a factor of $b$ under this scenario (decreasing the unit of time by a factor of $b$), we know the quantity
$$ \Pi = \frac{\theta}{\sqrt{l/g}}$$
remains invariant under a change in the fundamental units. This quantity $\Pi$ is dimensionless. In the jargon of dimensional analysis, we have "nondimensionalized" the problem.
In principle, $\Pi$ depends (just like $\theta$ under our guess) upon the quantities $l$, $m$, and $g$: $\Pi = \Pi(l,m,g)$. If we decrease the unit of mass by some factor c, of course, the numerical value for mass will increase by that same factor c. But, in so doing, neither $\Pi$ nor $l$ nor $g$ will change in value. In particular, $\Pi(l,m,g)$ is independent of $m$. What happens to $\Pi$ if we decrease the unit of length by some factor a leaving the unit of time unchanged? While the value for length will increase by a factor of $a$, the quantity $\Pi$ , as it is dimensionless, remains unchanged. Hence, $\Pi(l,m,g)$ is independent of $l$. Finally, what happens to $\Pi$ if we decrease the unit of time by a factor of $b$ while leaving the unit of length invariant. We have seen that this results in the numerical value for acceleration $g$ increasing by a factor of $b^{-2}$. However, $\Pi$ and $l$, and $m$ remain unchanged
This establishes the fact that $\Pi(l, m, g)$ is independent of all of its parameters. This is possible only if $\Pi$ is a constant:
$$ \Pi = \frac{\theta}{\sqrt{l/g}} = \text{constant}. $$
Hence $$ \theta = \text{constant} \sqrt{l/g} $$
which, apart from a constant, just is equation (2.1). The constant in (2.4) can be easily determined by a single measurement of the period of oscillation of a simple pendulum. This is indeed a remarkable result. To quote Barenblatt: "[I]t would seem that we have succeeded in obtaining an answer to an interesting problem from nothing—or, more precisely, only from a list of the quantities on which the period of oscillation of the pendulum is expected to depend, and a comparison (analysis) of their dimensions" (Barenblatt, 1996, p. 5). No details whatsoever about the nature of individual pendulums, what they are made of, and so on, played any role in obtaining the solution.
page 14ff in "The Devil in the Details" by Batterman
$$ \int_{-\infty}^\infty e^{- \alpha x^2} dx = ??? $$
No quantity here has units, because it's a pure math problem. However we are free, of course, to assign some as we wish.
First, we need to note that the argument of the exponential function is not allowed to have any units. This is necessary, because we can write the exponential function as a series (Taylor series): $e^y = 1 +y +y^2/2 + \ldots$. Thus, if $y$ had units, we would have to add objects with different units, which doesn't make sense. (Say $y$ had units $[L]$, then $y^2$ had units $[L^2]$ etc.)
With this in mind, we now assign dimensions to the quantities that appear in our integral. This is only a tool to analyse the integral and there is no physical meaning whatsoever involved here. You can assign any units that you want, as long as the argument of the exponential function has no units. A convenient choice for the units of $x$ is $[L]$. Then $\alpha$ mus have units $[L^{-2}]$, because then the exponent has no units.
Then $e^{- \alpha x^2}$ has no units. What about the rest of our expression? Well $\int_{-\infty}^\infty$ has no units, and $dx$ is simply a little bit of $x$ and hence has the same units as $x$. Therefore our solution on the right-hand side must have units $[L]$.
We integrate over $x$ and therefore, $x$ is not allowed to appear in the solution. Thus, we know immediately that our solution must be proportional to $1 / \sqrt{\alpha}$, because $\alpha$ has units $[L^{-2}]$ and therefore $1 / \sqrt{\alpha}$ has units $[L]$ as needed. Therefore:
$$ \int_{-\infty}^\infty e^{- \alpha x^2} dx \sim 1 / \sqrt{\alpha} .$$
We can find the missing constant, by considering a simple case like $\alpha = 1$. This well known integral is
$$ \int_{-\infty}^\infty e^{- x^2} dx = \sqrt{\pi} . $$
Our reasoning using dimensional analysis is of course valid for all values of $\alpha$ and thus also for $\alpha =1$. Thus, we can conclude that the full solution is
$$ \int_{-\infty}^\infty e^{- \alpha x^2} dx = \sqrt{\pi / \alpha} .$$
This example is from page 8 of Mahajan's "Street-fighting Mathematics" book.
(Take note that integrals are not always giving an area as a result. This really depends on the function $f(x)$ that appears in the integral $ \int_{-\infty}^\infty f(x) dx$. If $f(x)$ has units $[L]$, we get indeed an area: $[L^2]$. But if $f(x)$ has no units, as in the example above, we don't get an area as a result.)
Dimensional analysis is an extremely powerful tool that allows us to derive the solution for many complicated systems or equations, without doing any actual calculations.
For example, complicated Gaussian integrals can be "calculated" using dimensional analysis, up to some constant, using solely dimensional analysis. Another example, is the speed of an apple at the ground after being dropped from some height, or the frequency of a pendulum. For more details, see the "Examples" tab.
In addition, dimensional analysis is one of the most important tools in quantum field theory.