The difference between Pitot and Static is q, which is calculated as ½.Rho.V²
So, V in this case is identical to TAS.
So, q = ½.Rho.TAS²
Re-arranging this, you get TAS = (q / ½.Rho)^½
So that is the relationship between TAS and q. But the difference between TAS and CAS is given by...
CAS = TAS * Sigma^½
or
CAS = TAS * (Rho/Rho_0)^½
or
TAS = CAS * (Rho/Rho_0)^-½
[Reminding you, Rho = local air density, Rho_0 = sea level air density]
So substituting this into the earlier result, you get...
CAS.(Rho/Rho_0)^-½ = (q/½Rho)^½
This is easier to digest if you square the lot...
CAS² * Rho_0 / Rho = 2q / Rho
Multiply through by Rho and you've eliminated anything altitude dependent from the equation, and you get
CAS² = 2q / Rho_0
Which is fairly close to a relationship for IAS, since for any CofA aeroplane CAS and IAS are supposed to be within 5 knots of each other from 1.3Vs to Vne.
Hope this helps, the formula will work with either of the two main unit systems, viz...
Airspeed in m/s, pressure in N/m², density in kg/m^3
or
Airspeed in fps, pressure in lb/ft², density in slugs/ft^3 (Pretty certain I got the units right in the latter, I tend to think in metric when doing sums)
G