Linearized Pitot system I am trying to create a linearized model of a compressible pitot tube system with altitude $h$ as the input and velocity as the output.
When I take the derivative and try and linearize around a point the derivative does not match (approximately) the delta between two points around it.
I have pitot tube velocity equation:
$T(h) =$ Temperature
$P(h) =$ static pressure
$P_o =$ stagnation pressure
------------------------------Constants-------------------------------
$P_s = 101$ KPa
$T_o = 290$ K
$\gamma = 1.4$
$M = 0.0289644$
----------------------- Governing Equations------------------------
$P = P_se^\frac{h*g*M}{RT}$
$ T = T_o-.0065*h$
$Mach = \sqrt{\frac{2}{(\gamma-1)}\biggr((\frac{P_o}{P(h)})^\frac{\gamma}{\gamma-1}-1\biggr)}$
$a = \sqrt{\gamma RT}$
$v = Mach*a$
My approach was to take the derivative (using chain rule) and add that to the nominal point
$dv = \frac{dv}{dT}\frac{dT}{dh} + \frac{dv}{dP}\frac{dP}{dh}$
so that:
$v = v_{nom} + dv$
I'm not sure about my method or my derivation using the chain rule.
 A: We have
$$
P -P_se^\frac{h*g*M}{RT} = 0\\
M - \sqrt{\frac{2}{(\gamma-1)}\biggr(\left(\frac{P_o}{P(h)}\right)^\frac{\gamma}{\gamma-1}-1\biggr)}= 0
$$
$$
f_1(P,M,h)=0\\
f_2(P,M,h)=0
$$
then
$$
\frac{df_1}{dh}=\frac{\partial f_1}{\partial P}P'+\frac{\partial f_1}{\partial M}M'+\frac{\partial f_1}{\partial h}=0\\
\frac{df_2}{dh}=\frac{\partial f_2}{\partial P}P'+\frac{\partial f_2}{\partial M}M'+\frac{\partial f_2}{\partial h}=0
$$
and solving for $P', M'$ we have
$$
P' = \frac{2 g (\gamma -1)^2 M(h) P(h) \left(T(h)-h T'(h)\right) \sqrt{\frac{\left(\frac{\text{P0}}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}-1}{\gamma
   -1}}}{T(h) \left(\sqrt{2} g \gamma  h \left(\frac{P_0}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}+2 (\gamma -1)^2 R T(h)
   \sqrt{\frac{\left(\frac{P_0}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}-1}{\gamma -1}}\right)}\\
M' = -\frac{\sqrt{2} g \gamma  M(h) \left(T(h)-h T'(h)\right) \left(\frac{\text{P0}}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}}{T(h) \left(\sqrt{2} g
   \gamma  h \left(\frac{P_0}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}+2 (\gamma -1)^2 R T(h)
   \sqrt{\frac{\left(\frac{P_0}{P(h)}\right)^{\frac{\gamma }{\gamma -1}}-1}{\gamma -1}}\right)}
$$
