For the following function S(z), I would like to know the nature of it's derivative. I calculated the first derivative wrt to z but it assumes monstrous proportions when it comes to the second derivative. I was wondering whether there is any easier way. (Including perhaps even plotting the function...and how would you plot them)
\begin{equation} S(z)=\frac{p.(\alpha_H+z.\alpha_W)}{p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W} \end{equation} \begin{eqnarray} S'(z)&=&p.\left[\frac{([p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W].(\alpha_W)-(\alpha_H+z.\alpha_W).(p.\alpha_W+\beta_W)}{(p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W)^2}\right]\\ &=&p.\left[\frac{([\beta_H].(\alpha_W)-(\alpha_H).(\beta_W)}{(p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W)^2}\right] \end{eqnarray}
PS. I realized that one could split the numerator...the first part is concave but still not sure about the second part
You can rewrite your function by combining constants and $z$ terms to get something like this: $$S(z)=\frac{a+bz}{c+dz}\ .$$ Then a bit of easy algebra gives $$S(z)=\frac{1}{d}\,\frac{ad+bdz}{c+dz} =\frac{1}{d}\,\frac{(ad-bc)+(bc+bdz)}{c+dz} =\frac{ad-bc}{d}\,\frac{1}{c+dz}+\frac{b}{d}$$ which is now fairly easy to differentiate as many times as you need. Of course you will have to substitute $a,b,c,d$ back in terms of your original constants and this could get pretty messy, but hopefully not too much so. Good luck!