Some lecture notes I was reading through claimed that a pressure pulse propagates through a liquid-filled tube (blood in a vein) with the speed

$$c=\sqrt{\frac{A}{\rho}\frac{dP}{dA}},$$

where $A$ is the cross-sectional area, $\rho$ the density and $P$ the pressure (which pressure?).

How can this result be derived? Why would the pressure vary with area? I suppose I'm missing some assumptions or misunderstand the expression.

FYI, the expression is also written, without explanation of the variables, as

$$c=\sqrt{\frac{Eh}{2\rho R}}$$

-

The sound speed $c_s$ of any fluid in which the fluid pressure $P$ is a function of the fluid density $\rho$ is going to be given by $c_s^2 = \frac{dP}{d\rho}$. If that expression is not already familiar to you, it's a good exercise to write down the fluid equations for conservation of mass and momentum in one dimension and then write down what happens when the density and velocity are perturbed from their equilibrium, static values. You'll get the wave equation for the perturbed values with the wave speed given by the above equation.
If $\rho$ can be treated as a function of $A$, then applying the chain rule gives $c_s = \sqrt{\frac{dP}{dA} \,\frac{dA}{d\rho}}$. If $A$ is proportional to $\rho$ with the same proportionality constant everywhere, you get the expression you've asked about.
Even if the relationship between $A$ and $\rho$ is not exactly that simple, you'd expect to get the same answer to order of magnitude since $A$ and $\rho$ should change by values comparable to themselves.
EDIT: It turns out that you can get the same expression for the sound speed if $A$ is inversely proportional to $\rho$. In that case both $\frac{dP}{dA}$ and $\frac{dA}{d\rho}$ are negative, which might be useful to keep in mind. And an inverse relationship is exactly what you'd expect if the flow is steady or nearly so ($\rho$ and $u$ at each position do not vary with time). In that case conservation of mass implies that $\rho u A$ is a constant at each position. And if $u$ is not varying much with position, then you indeed get $A \propto 1/\rho$.