Active (P), Reactive (Q, D) and Apparent (S) Power from Instantaneous Power (p)
Starting with the definition for active power

\$P = \frac{1}{T} \int_0^T v(t) \cdot i(t) \cdot dt = \frac{1}{T} \int_0^T p(t) \cdot dt\$ 

one gets the following expression for the power for linear networks (containing R, L, C, all constant):

\$P = \sum_{k=1}^\infty  V_{k,RMS} \cdot I_{k,RMS} \cdot cos(φ_{V,k}-φ_{I,k})\$ 

For a single (pure) sinewave there is 

\$P = V_{RMS} \cdot I_{RMS} \cdot cos(φ_{V}-φ_{I})\$ 

Above expressions have the meaning of power consumed (e.g. in form of heat). 

Now there is the definition of reactive power as 

\$Q = \sum_{k=1}^\infty  V_{k,RMS} \cdot I_{k,RMS} \cdot sin(φ_{V,k}-φ_{I,k})\$ 

The important point is that this is a definition, not something derived. In case of linear networks it has physical meaning, in case of nonlinear networks (containing switches, diodes, nonlinear inductors ...) is has not. 

Same is true for the apparent power which is also a definition which cannot be derived, and which is defined as 

\$S = V_{RMS} \cdot I_{RMS}\$ 

It allows to compare size of rotating machines and/or transformers in a grid (of fixed frequency e.g. 0 Hz or 60 Hz) which is very useful for the power engineer. 

For linear networks one can easily show from the equations (definitions) above that

\$S^2 = P^2 + Q^2\$

In case of nonlinear networks the above equation does not work and another power term is added as 

\$S^2 = P^2 + Q^2 + D^2\$

This gives the definition of D as

\$D = \sqrt {S^2 - P^2 - Q^2}\$

I found this argumentation in my old university textbook (Franz Zach, 'Leistungselektronik: Bauelemente, Leistungskreise, Steuerungskreise, Beeinflussungen', ISBN-10: 3709144590, Springer, Oct. 1980).

Short answer: 


Instantaneous power p(t) results in P which is easy to show for linear networks. 
Q is defined, not derived from p(t), with the background of linear networks. 
S is defined, not derived from p(t), with the background of electrical machines in the grid. 
D is defined, not derived from p(t), in order to bring together P, Q, and S in nonlinear networks.