integration of differential equation for wind profile I'm trying to calculate the vertical wind speed gradient with some equations and am having trouble with the integration. From the book I'm using, the wind profile is calculated according to
$$\frac{kz}{u_*}\frac{\partial u}{\partial z}=\phi_m(\zeta),$$
where k is the von karman constant, z is height, u* is the air friction velocity, du/dz is the change in wind speed with change in height i.e. the wind profile, and psi_m(zeta) is an atmospheric stability function where
$$\zeta=\frac{z}{L}$$
and L is the Monin obukhov length scale which is just an expression of atmospheric stability. The book states that psi_m(zeta) can be integrated between z1 and z2 i.e. two different heights to obtain the wind gradient as
$$u_2-u_1=\frac{u_*}{k}\left[\ln\left(\frac{z_2}{z_1}\right)-\psi_m\left(\frac{z_2}{L}\right)+\psi_m\left(\frac{z_1}{L}\right)\right]$$
where 
$$\psi_m(\zeta)=\int_{z_0/L}^{\zeta}\frac{[1-\psi_m(x)]}{x}\text{d}x$$
Im finding it really hard to make the link between these equations and coming up with a step by step solution to the wind profile. Could anyone explain what the author has done and how the step by step process should look like? I havent posted this on the physics stack exchange seeing as it is a problem with the mathematical procedure I am having and not in understanding the process.
 A: The equation for the wind profile should be
$$\frac{kz}{u_*}\frac{\partial \bar{U}}{\partial z}=\phi_m(\zeta),$$
where $\bar{U}$ is the mean wind-speed profile. The trick will be writing $\phi_m=1-(1-\phi_m)$. Thus, dividing by $z$ and integrating gives:
$$\frac{k}{u_*}\left.\bar{U}\right|_{z_1}^{z_2}=\int_{z_1}^{z_2}\frac{\phi_m(\zeta)}{z}dz=\int_{z_1}^{z_2}\frac{1-(1-\phi_m(\zeta))}{z}dz=\int_{z_1}^{z_2}\frac{dz}{z}-\int_{z_1}^{z_2}\frac{(1-\phi_m(\zeta))}{z}dz$$
so upon substituting $z=x L$, to give:
$$\int_{z_1}^{z_2}\frac{(1-\phi_m(z/L))}{z}dz=\int_{z_1/L}^{z_2/L}\frac{1-\phi_m(x)}{xL}Ldx=\psi_m(z_2/L)-\psi_m(z_1/L)$$
where you now use the correct definition of the momentum influence function:
$$\psi_m(\zeta):=\int_{z_{0,m}/L}^\zeta\frac{1-\phi_m(x)}{x}dx$$
where $z_{0,m}$ is some base value. Then 
$$\frac{k}{u_*}(u_2-u_1)=\ln\left(\frac{z_2}{z_1}\right)-\psi_m\left(\frac{z_2}{L}\right)+\psi_m\left(\frac{z_1}{L}\right).$$
As an aside, the point of writing $\psi_m$ is to quantify the difference of the windprofile when you are in the stable vs unstable regime. For example, if $\phi_m(x)=1$, then you are in the perfectly stable regime, $\psi_m=0$ so you get back the usual log-wind profile law.
